updated packages
This commit is contained in:
@@ -23,7 +23,7 @@ class AccessDeniedHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(403, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class BadRequestHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(400, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class ConflictHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(409, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ class ControllerDoesNotReturnResponseException extends \LogicException
|
||||
$this->line = $controllerDefinition['line'];
|
||||
$r = new \ReflectionProperty(\Exception::class, 'trace');
|
||||
$r->setAccessible(true);
|
||||
$r->setValue($this, array_merge(array(
|
||||
array(
|
||||
$r->setValue($this, array_merge([
|
||||
[
|
||||
'line' => $line,
|
||||
'file' => $file,
|
||||
),
|
||||
), $this->getTrace()));
|
||||
],
|
||||
], $this->getTrace()));
|
||||
}
|
||||
|
||||
private function parseControllerDefinition(callable $controller): ?array
|
||||
@@ -46,10 +46,10 @@ class ControllerDoesNotReturnResponseException extends \LogicException
|
||||
try {
|
||||
$r = new \ReflectionMethod($controller[0], $controller[1]);
|
||||
|
||||
return array(
|
||||
return [
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getEndLine(),
|
||||
);
|
||||
];
|
||||
} catch (\ReflectionException $e) {
|
||||
return null;
|
||||
}
|
||||
@@ -58,19 +58,19 @@ class ControllerDoesNotReturnResponseException extends \LogicException
|
||||
if ($controller instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($controller);
|
||||
|
||||
return array(
|
||||
return [
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getEndLine(),
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
if (\is_object($controller)) {
|
||||
$r = new \ReflectionClass($controller);
|
||||
|
||||
return array(
|
||||
return [
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getEndLine(),
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -22,7 +22,7 @@ class GoneHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(410, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface
|
||||
private $statusCode;
|
||||
private $headers;
|
||||
|
||||
public function __construct(int $statusCode, string $message = null, \Exception $previous = null, array $headers = array(), ?int $code = 0)
|
||||
public function __construct(int $statusCode, string $message = null, \Exception $previous = null, array $headers = [], ?int $code = 0)
|
||||
{
|
||||
$this->statusCode = $statusCode;
|
||||
$this->headers = $headers;
|
||||
|
||||
@@ -22,7 +22,7 @@ class LengthRequiredHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(411, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class MethodNotAllowedHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(array $allow, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array())
|
||||
public function __construct(array $allow, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
$headers['Allow'] = strtoupper(implode(', ', $allow));
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class NotAcceptableHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(406, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class NotFoundHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(404, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class PreconditionFailedHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(412, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class PreconditionRequiredHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(428, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class ServiceUnavailableHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array())
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
|
||||
@@ -25,7 +25,7 @@ class TooManyRequestsHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array())
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
|
||||
@@ -23,7 +23,7 @@ class UnauthorizedHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $challenge, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array())
|
||||
public function __construct(string $challenge, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
$headers['WWW-Authenticate'] = $challenge;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class UnprocessableEntityHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(422, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class UnsupportedMediaTypeHttpException extends HttpException
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array())
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(415, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user