| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 1 | protected function parseBuildingName(Crawler $crawler): ?string |
|
| 33 | { |
||
| 34 | 1 | $title = parent::parseBuildingName($crawler); |
|
|
|
|||
| 35 | |||
| 36 | // E.g.: "Les Jardins d'Antoine (1 à 4 pièces, 32 à 78 m²)" (vs "Appartement 3 pièces 71 m²") |
||
| 37 | 1 | if (1 === preg_match('/(.+) \(.+\)/', $title, $matches)) { |
|
| 38 | return $matches[1]; |
||
| 39 | } |
||
| 40 | |||
| 41 | 1 | return null; |
|
| 42 | } |
||
| 44 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.