1 | <?php |
||
21 | class ClassResolver |
||
22 | { |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $class; |
||
27 | |||
28 | /** |
||
29 | * ClassResolver constructor. |
||
30 | * |
||
31 | * @param string $class |
||
32 | */ |
||
33 | public function __construct(string $class) |
||
37 | |||
38 | /** |
||
39 | * @param array $args |
||
40 | * |
||
41 | * @return object |
||
42 | */ |
||
43 | public function resolve(array $args = []) |
||
55 | |||
56 | /** |
||
57 | * @param \ReflectionClass $reflected |
||
58 | * @param array $inputArgs |
||
59 | * |
||
60 | * @return array |
||
61 | */ |
||
62 | protected function resolveConstructorArgs(ReflectionClass $reflected, array $inputArgs) |
||
86 | |||
87 | /** |
||
88 | * @param array $input |
||
89 | * @param string $name |
||
90 | * |
||
91 | * @return mixed |
||
92 | */ |
||
93 | public function tryToGetArgsFromInput(array $input, string $name) |
||
97 | } |
||
98 |
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.