1 | <?php |
||
10 | class Deal |
||
11 | { |
||
12 | /** |
||
13 | * @var SessionParameters |
||
14 | */ |
||
15 | private $sessionParameters; |
||
16 | |||
17 | /** |
||
18 | * @var float |
||
19 | */ |
||
20 | private $price; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $agentName; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $deepLinkUrl; |
||
31 | |||
32 | public function __construct(SessionParameters $sessionParameters, $price, $agentName, $deepLinkUrl) |
||
39 | |||
40 | /** |
||
41 | * @return float |
||
42 | */ |
||
43 | public function getPrice() |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getAgentName() |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getDeepLinkUrl() |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getIdentifier() |
||
78 | } |
||
79 |
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.