Skip to content

Commit

Permalink
[HttpKernel] add type-hint for the requestType
Browse files Browse the repository at this point in the history
  • Loading branch information
Amrouche Hamza committed Nov 18, 2017
1 parent 453e799 commit 62d933d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FilterControllerArgumentsEvent extends FilterControllerEvent
{
private $arguments;

public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, int $requestType)
public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, ?int $requestType)
{
parent::__construct($kernel, $controller, $request, $requestType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FilterControllerEvent extends KernelEvent
{
private $controller;

public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, int $requestType)
public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, ?int $requestType)
{
parent::__construct($kernel, $request, $requestType);

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpKernel/Event/KernelEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class KernelEvent extends Event
* @param int $requestType The request type the kernel is currently processing; one of
* HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST
*/
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType)
public function __construct(HttpKernelInterface $kernel, Request $request, ?int $requestType)
{
$this->kernel = $kernel;
$this->request = $request;
Expand Down

0 comments on commit 62d933d

Please sign in to comment.