1 | <?php |
||
18 | abstract class AbstractClient { |
||
19 | |||
20 | /** |
||
21 | * @var StreamInterface |
||
22 | */ |
||
23 | protected $stream; |
||
24 | |||
25 | /** |
||
26 | * @var LoggerInterface |
||
27 | */ |
||
28 | protected $log; |
||
29 | |||
30 | /** |
||
31 | * @var EventDispatcherInterface |
||
32 | 39 | */ |
|
33 | private $dispatcher; |
||
34 | 39 | ||
35 | 39 | ||
36 | 39 | /** |
|
37 | * @param StreamInterface $stream |
||
38 | 39 | * @param LoggerInterface|null $log Logger instance. |
|
39 | 39 | */ |
|
40 | 39 | public function __construct( |
|
57 | 25 | ||
58 | |||
59 | /** |
||
60 | * @return EventDispatcherInterface |
||
61 | */ |
||
62 | public function getDispatcher() |
||
66 | |||
67 | 8 | ||
68 | 8 | /** |
|
69 | 8 | * Send request and retrieve response to the connected disque node. |
|
70 | 7 | * |
|
71 | 7 | * @param array $args |
|
72 | 7 | * |
|
73 | 8 | * @return array|int|null|string |
|
74 | * |
||
75 | 8 | * @throws CommandException |
|
76 | * @throws StreamException |
||
77 | */ |
||
78 | protected function send(array $args = []) |
||
86 | |||
87 | |||
88 | /** |
||
89 | * Map Disque's job responses to Job objects. |
||
90 | * |
||
91 | * @param array $list Job response array from the disque server. |
||
92 | * |
||
93 | * @return Job[] |
||
94 | */ |
||
95 | protected function mapJobs(array $list) |
||
108 | } |
||
109 |
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.