for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CodeCloud\Bundle\ShopifyBundle\Api\Response;
use Psr\Http\Message\ResponseInterface as PsrResponse;
class HtmlResponse implements ResponseInterface
{
/**
* @var PsrResponse
*/
private $response;
* @param PsrResponse $response
public function __construct(PsrResponse $response)
$this->response = $response;
}
* @return PsrResponse
public function getHttpResponse()
return $this->response;
* @param null $item
$item
null
* @param null $default
$default
* @return mixed
public function get($item = null, $default = null)
return $this->response->getBody()->getContents();
* @return bool
public function successful()
return preg_match('/^2[\d]{2,}/', $this->getHttpResponse()->getStatusCode());
return preg_match('/^2[\...nse()->getStatusCode())
integer
boolean