1 | <?php declare(strict_types = 1); |
||
19 | final class Router implements RouterContract |
||
20 | { |
||
21 | /** |
||
22 | * @var RouteDispatcherFactoryContract |
||
23 | */ |
||
24 | private $dispatcherFactory; |
||
25 | |||
26 | /** |
||
27 | * @var RouteMatcherContract |
||
28 | */ |
||
29 | private $matcher; |
||
30 | |||
31 | /** |
||
32 | * @var MiddlewarePipelineFactoryContract |
||
33 | */ |
||
34 | private $pipelineFactory; |
||
35 | |||
36 | /** |
||
37 | * @var RequestRouteCollectionFactory |
||
38 | */ |
||
39 | private $routeCollectionFactory; |
||
40 | |||
41 | /** |
||
42 | * @var RouteCollectionContract |
||
43 | */ |
||
44 | private $routes; |
||
45 | |||
46 | /** |
||
47 | * Router constructor. |
||
48 | * |
||
49 | * @param RouteDispatcherFactoryContract $dispatcherFactory |
||
50 | * @param RouteMatcherContract $matcher |
||
51 | * @param MiddlewarePipelineFactoryContract $pipelineFactory |
||
52 | * @param RouteCollectionContract $routes |
||
53 | * @param RequestRouteCollectionFactory $routeCollectionFactory |
||
54 | */ |
||
55 | 2 | public function __construct( |
|
68 | |||
69 | /** |
||
70 | * @inheritDoc |
||
71 | */ |
||
72 | 1 | public function next(ServerRequestInterface $request): ResponseInterface |
|
85 | |||
86 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.