Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php
namespace WP_Ultimo\Dependencies\GuzzleHttp\Exception;
use WP_Ultimo\Dependencies\Psr\Http\Message\RequestInterface;
use WP_Ultimo\Dependencies\Psr\Http\Message\ResponseInterface;
/**
* Exception when an HTTP error occurs (4xx or 5xx error)
*/
class BadResponseException extends RequestException
{
public function __construct(string $message, RequestInterface $request, ResponseInterface $response, \Throwable $previous = null, array $handlerContext = [])
{
parent::__construct($message, $request, $response, $previous, $handlerContext);
}
/**
* Current exception and the ones that extend it will always have a response.
*/
public function hasResponse() : bool
{
return \true;
}
/**
* This function narrows the return type from the parent class and does not allow it to be nullable.
*/
public function getResponse() : ResponseInterface
{
/** @var ResponseInterface */
return parent::getResponse();
}
}