1 | <?php |
||
15 | class Notifier implements NotifiableInterface |
||
16 | { |
||
17 | use ElasticSearchWriterTrait; |
||
18 | |||
19 | /** |
||
20 | * @var ElasticSearchRequester |
||
21 | */ |
||
22 | private $elasticSearchRequester; |
||
23 | /** |
||
24 | * @var Client |
||
25 | */ |
||
26 | private $slackClient; |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $slackUserName; |
||
31 | |||
32 | public function __construct(Client $slackClient, $slackUserName) |
||
37 | |||
38 | /** |
||
39 | * @param Deal[] $deals |
||
40 | * @param SessionParameters $sessionParameters |
||
41 | */ |
||
42 | public function notify(array $deals, SessionParameters $sessionParameters) |
||
62 | |||
63 | /** @inheritdoc */ |
||
64 | public function wasNotified(Deal $deal, $notifyTo) |
||
72 | |||
73 | /** @inheritdoc */ |
||
74 | public function createNotifications(SessionParameters $parameters, array $deals = []) |
||
99 | |||
100 | /** |
||
101 | * @param ElasticSearchRequester $elasticSearchRequester |
||
102 | */ |
||
103 | public function setElasticSearchRequester(ElasticSearchRequester $elasticSearchRequester) |
||
107 | } |
||
108 |
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.