1 | <?php |
||
12 | class CommandFactory |
||
13 | { |
||
14 | /** |
||
15 | * @param $action |
||
16 | * @return Command |
||
17 | */ |
||
18 | public static function createFromAction($action): Command |
||
24 | |||
25 | /** |
||
26 | * @param ServerRequestInterface|null $request |
||
27 | * @return Command |
||
28 | */ |
||
29 | public static function createFromRequest(ServerRequestInterface $request = null): Command |
||
35 | |||
36 | /** |
||
37 | * @param ForwardException $exception |
||
38 | * @return Command |
||
39 | */ |
||
40 | public static function createFromForwardExecption(ForwardException $exception) |
||
45 | } |
||
46 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):