1 | <?php |
||
10 | class TransitionMiddleware |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var Config |
||
15 | */ |
||
16 | private $config; |
||
17 | /** |
||
18 | * @var TransitionFactory |
||
19 | */ |
||
20 | private $factory; |
||
21 | |||
22 | 12 | public function __construct(Config $config, TransitionFactory $factory) |
|
28 | |||
29 | 12 | public function handle(Request $request, Closure $next) : Response |
|
35 | |||
36 | 12 | private function transformRequest(Request $request) : Request |
|
44 | |||
45 | 12 | private function transformResponse(Request $request, Response $response) : Response |
|
53 | |||
54 | /** |
||
55 | * @param string|int $version |
||
56 | * @return Generator|Transition[] |
||
57 | */ |
||
58 | 12 | private function transitions($version) : Generator |
|
65 | } |
||
66 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.