diff --git a/src/TrailingSlash.php b/src/TrailingSlash.php index db5caa1..f247e31 100644 --- a/src/TrailingSlash.php +++ b/src/TrailingSlash.php @@ -33,7 +33,7 @@ public function __construct(bool $trailingSlash = false) /** * Whether returns a 301 response to the new path. */ - public function redirect(ResponseFactoryInterface $responseFactory = null): self + public function redirect(?ResponseFactoryInterface $responseFactory = null): self { $this->responseFactory = $responseFactory ?: Factory::getResponseFactory();