| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 90% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 9 | class PapParser extends AbstractParser |
||
| 10 | { |
||
| 11 | protected const PROVIDER = Provider::PAP; |
||
| 12 | |||
| 13 | protected const SELECTOR_AD_WRAPPER = 'table tr:nth-child(n+3):not(:last-child)'; |
||
| 14 | protected const SELECTOR_LOCATION = 'td:nth-child(2) b'; |
||
| 15 | protected const SELECTOR_BUILDING_NAME = 'td:nth-child(2)'; |
||
| 16 | protected const SELECTOR_DESCRIPTION = 'td:nth-child(2)'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritDoc} |
||
| 20 | */ |
||
| 21 | 1 | protected function createCrawler(string $html): Crawler |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritDoc} |
||
| 32 | */ |
||
| 33 | 1 | protected function parsePrice(Crawler $crawler): ?float |
|
| 34 | { |
||
| 35 | 1 | return NumericUtil::parsePrice(str_replace('.', '', $crawler->html())); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritDoc} |
||
| 40 | */ |
||
| 41 | 1 | protected function parseBuildingName(Crawler $crawler): ?string |
|
| 48 | } |
||
| 49 | } |
||
| 50 |