1 | <?php |
||
14 | class ExceptionHandler |
||
15 | { |
||
16 | /** |
||
17 | * @var Negotiator |
||
18 | */ |
||
19 | private $negotiator; |
||
20 | |||
21 | /** |
||
22 | * @var ExceptionHandlerPreferences |
||
23 | */ |
||
24 | private $preferences; |
||
25 | |||
26 | /** |
||
27 | * @var ResolverInterface |
||
28 | */ |
||
29 | private $resolver; |
||
30 | |||
31 | /** |
||
32 | * @var Whoops |
||
33 | */ |
||
34 | private $whoops; |
||
35 | |||
36 | /** |
||
37 | * @param ExceptionHandlerPreferences $preferences |
||
38 | * @param Negotiator $negotiator |
||
39 | * @param ResolverInterface $resolver |
||
40 | * @param Whoops $whoops |
||
41 | */ |
||
42 | 12 | public function __construct( |
|
53 | |||
54 | /** |
||
55 | * @param ServerRequestInterface $request |
||
56 | * @param ResponseInterface $response |
||
57 | * @param callable $next |
||
58 | * |
||
59 | * @return ResponseInterface |
||
60 | */ |
||
61 | 12 | public function __invoke( |
|
95 | |||
96 | /** |
||
97 | * Determine the preferred content type for the current request |
||
98 | * |
||
99 | * @param ServerRequestInterface $request |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | 12 | private function type(ServerRequestInterface $request) |
|
118 | |||
119 | /** |
||
120 | * Retrieve the handler to use for the given type |
||
121 | * |
||
122 | * @param string $type |
||
123 | * |
||
124 | * @return \Whoops\Handler\HandlerInterface |
||
125 | */ |
||
126 | 12 | private function handler($type) |
|
130 | } |
||
131 |
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.