Bouss /
boussimmo
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Parser; |
||||
| 4 | |||||
| 5 | use App\Enum\Provider; |
||||
| 6 | use Symfony\Component\DomCrawler\Crawler; |
||||
| 7 | |||||
| 8 | class LogicImmoPartnerParser extends AbstractParser |
||||
| 9 | { |
||||
| 10 | protected const PROVIDER = Provider::LOGIC_IMMO; |
||||
| 11 | |||||
| 12 | protected const SELECTOR_AD_WRAPPER = 'table[bgcolor="#f1f1f1"] > tr:nth-child(n+6):not(:nth-last-child(-n+8)) table[width=600][bgcolor="#ffffff"]'; |
||||
| 13 | protected const SELECTOR_LOCATION = 'td.mea_txt_ad3'; |
||||
| 14 | protected const SELECTOR_DESCRIPTION = 'td[style*="font-size:12px"]'; |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * {@inheritDoc} |
||||
| 18 | */ |
||||
| 19 | 1 | protected function parseLocation(Crawler $crawler): ?string |
|||
| 20 | { |
||||
| 21 | 1 | $data = parent::parseLocation($crawler); |
|||
|
0 ignored issues
–
show
|
|||||
| 22 | |||||
| 23 | 1 | return trim(explode('|', $data)[0]); |
|||
|
0 ignored issues
–
show
$data of type null is incompatible with the type string expected by parameter $string of explode().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 24 | } |
||||
| 25 | } |
||||
| 26 |
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.