Skip to content

Commit

Permalink
Add argument types.
Browse files Browse the repository at this point in the history
  • Loading branch information
longwave committed Nov 13, 2023
1 parent 2f7e9bc commit 58c061d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(HttpKernelInterface $app, array $options = [])
$this->cors = new CorsService(array_merge($this->defaultOptions, $options));
}

public function handle(Request $request, $type = HttpKernelInterface::MAIN_REQUEST, $catch = true): Response
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
{
if ($this->cors->isPreflightRequest($request)) {
$response = $this->cors->handlePreflightRequest($request);
Expand Down
2 changes: 1 addition & 1 deletion tests/MockApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(array $responseHeaders)
$this->responseHeaders = $responseHeaders;
}

public function handle(Request $request, $type = HttpKernelInterface::MAIN_REQUEST, $catch = true): Response
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
{
$response = new Response();

Expand Down

0 comments on commit 58c061d

Please sign in to comment.