File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ final class CorsMiddleware implements MiddlewareInterface
1919 * @param array<string> $exposeHeaders
2020 */
2121 public function __construct (
22- private ResponseFactoryInterface $ responseFactory ,
23- private OriginNegotiatorInterface $ originNegotiator ,
24- private MethodNegotiatorInterface $ methodNegotiator ,
25- private HeadersNegotiatorInterface $ headersNegotiator ,
26- private array $ exposeHeaders = [],
27- private bool $ allowCredentials = false ,
28- private int $ maxAge = 600
22+ private readonly ResponseFactoryInterface $ responseFactory ,
23+ private readonly OriginNegotiatorInterface $ originNegotiator ,
24+ private readonly MethodNegotiatorInterface $ methodNegotiator ,
25+ private readonly HeadersNegotiatorInterface $ headersNegotiator ,
26+ private readonly array $ exposeHeaders = [],
27+ private readonly bool $ allowCredentials = false ,
28+ private readonly int $ maxAge = 600
2929 ) {}
3030
3131 public function process (ServerRequestInterface $ request , RequestHandlerInterface $ handler ): ResponseInterface
Original file line number Diff line number Diff line change 66
77final class AllowOriginExact implements AllowOriginInterface
88{
9- public function __construct (private string $ value ) {}
9+ public function __construct (private readonly string $ value ) {}
1010
1111 public function match (string $ origin ): bool
1212 {
Original file line number Diff line number Diff line change 66
77final class AllowOriginRegex implements AllowOriginInterface
88{
9- public function __construct (private string $ pattern ) {}
9+ public function __construct (private readonly string $ pattern ) {}
1010
1111 public function match (string $ origin ): bool
1212 {
You can’t perform that action at this time.
0 commit comments