1 | <?php |
||
14 | class LivePricePostProcessor |
||
15 | { |
||
16 | use LoggerAwareTrait; |
||
17 | |||
18 | const MAX_PARSED_DEALS = 50; |
||
19 | |||
20 | /** |
||
21 | * @var PriceFormatter |
||
22 | */ |
||
23 | private $priceFormatter; |
||
24 | |||
25 | /** |
||
26 | * @var NotifiableInterface[] |
||
27 | */ |
||
28 | private $notifiers = []; |
||
29 | /** |
||
30 | * @var SessionParameters |
||
31 | */ |
||
32 | private $sessionParameters; |
||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $agents = []; |
||
37 | |||
38 | public function __construct(PriceFormatter $priceFormatter) |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @param \Jeancsil\FlightSpy\Notifier\NotifiableInterface $notifier |
||
46 | */ |
||
47 | public function addNotifier(NotifiableInterface $notifier) |
||
51 | |||
52 | /** |
||
53 | * @param Deal[] $deals |
||
54 | */ |
||
55 | public function notifyAll(array $deals) |
||
61 | |||
62 | /** |
||
63 | * @param array $responses |
||
64 | */ |
||
65 | public function multiProcess(array $responses) |
||
79 | |||
80 | /** |
||
81 | * @param \stdClass $response |
||
82 | */ |
||
83 | public function singleProcess(\stdClass $response) |
||
87 | |||
88 | /** |
||
89 | * @param SessionParameters $sessionParameters |
||
90 | * @return $this |
||
91 | */ |
||
92 | public function setSessionParameters(SessionParameters $sessionParameters) |
||
98 | |||
99 | /** |
||
100 | * @param \stdClass $response |
||
101 | * @return Deal[] |
||
102 | */ |
||
103 | private function doProcess(\stdClass $response) |
||
135 | |||
136 | /** |
||
137 | * @param \stdClass $pricingOptions |
||
138 | * @return string |
||
139 | */ |
||
140 | private function getDeepLinkUrl($pricingOptions) |
||
146 | |||
147 | /** |
||
148 | * @param \stdClass $pricingOptions |
||
149 | * @return string |
||
150 | */ |
||
151 | private function getPrice($pricingOptions) |
||
155 | |||
156 | /** |
||
157 | * @param \stdClass $pricingOptions |
||
158 | * @return string |
||
159 | */ |
||
160 | private function getAgentName($pricingOptions) |
||
175 | } |
||
176 |
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.