| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function getStationsForTerm() { |
||
| 23 | $html = $this->getHtmlResponse(); |
||
|
|
|||
| 24 | $stationObjects = []; |
||
| 25 | phpQuery::newDocumentHTML($html); |
||
| 26 | $listItems = pq('li a'); |
||
| 27 | foreach ($listItems as $listItem) { |
||
| 28 | $stationObject = new \stdClass(); |
||
| 29 | $stationObject->name = trim(pq($listItem)->html()); |
||
| 30 | $stationObjects[] = $stationObject; |
||
| 31 | } |
||
| 32 | return $stationObjects; |
||
| 33 | } |
||
| 34 | } |
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.