Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
EmitterInterface $emitter,
MiddlewarePipelineInterface $pipeline,
MiddlewareResolverInterface $resolver,
RequestHandlerInterface $default = null
?RequestHandlerInterface $default = null
) {
$this->router = $router;
$this->emitter = $emitter;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/BadRequestHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BadRequestHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_BAD_REQUEST, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ForbiddenHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ForbiddenHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_FORBIDDEN, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HttpException extends Exception
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(int $statusCode, string $reasonPhrase = null, Throwable $previous = null)
public function __construct(int $statusCode, ?string $reasonPhrase = null, ?Throwable $previous = null)
{
$reasonPhrase ??= '';

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InternalServerErrorHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class InternalServerErrorHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_INTERNAL_SERVER_ERROR, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/MethodNotAllowedHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MethodNotAllowedHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_METHOD_NOT_ALLOWED, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/NotFoundHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NotFoundHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_NOT_FOUND, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/NotImplementedHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NotImplementedHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_NOT_IMPLEMENTED, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/UnauthorizedHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UnauthorizedHttpException extends HttpException
* @param string|null $reasonPhrase
* @param Throwable|null $previous
*/
public function __construct(string $reasonPhrase = null, Throwable $previous = null)
public function __construct(?string $reasonPhrase = null, ?Throwable $previous = null)
{
parent::__construct(ErrorResponseGeneratorInterface::STATUS_UNAUTHORIZED, $reasonPhrase, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Response/CustomResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class CustomResponseFactory implements ResponseFactoryInterface
* @param StreamInterface|string|resource $body
* @param string $protocol
*/
public function __construct(array $headers = null, $body = 'php://temp', string $protocol = '1.1')
public function __construct(?array $headers = null, $body = 'php://temp', string $protocol = '1.1')
{
$this->headers = $headers ?? ['Content-Type' => 'text/html; charset=UTF-8'];
$this->body = $body;
Expand Down
Loading