1 | <?php |
||
10 | class ArrayLogger extends Logger |
||
11 | { |
||
12 | const COLOR_NONE = "[0m"; |
||
13 | const COLOR_RED = "[31m"; |
||
14 | const COLOR_GREEN = "[32m"; |
||
15 | const COLOR_YELLOW = "[33m"; |
||
16 | |||
17 | public function debug($items, array $context = []) |
||
23 | |||
24 | public function info($items, array $context = []) |
||
30 | |||
31 | public function notice($items, array $context = []) |
||
37 | |||
38 | public function warn($items, array $context = []) |
||
44 | |||
45 | public function error($items, array $context = []) |
||
51 | |||
52 | public function critical($items, array $context = []) |
||
58 | |||
59 | public function alert($items, array $context = []) |
||
65 | |||
66 | public function emergency($items, array $context = []) |
||
72 | |||
73 | private function format($message, $color = self::COLOR_GREEN) |
||
77 | } |
||
78 |
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.