Skip to content

Commit

Permalink
bug #25016 [HttpKernel] add type-hint for the requestType (Simperfit)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0-dev branch.

Discussion
----------

[HttpKernel] add type-hint for the requestType

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see sensiolabs/SensioFrameworkExtraBundle#530
| License       | MIT

#SymfonyConHackday2017

Commits
-------

62d933d [HttpKernel] add type-hint for the requestType
  • Loading branch information
nicolas-grekas committed Nov 19, 2017
2 parents 8eb97f5 + 62d933d commit 422c446
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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
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
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 422c446

Please sign in to comment.