OuestFranceImmoParser::parsePhoto()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Parser;
4
5
use App\Enum\Provider;
6
use Symfony\Component\DomCrawler\Crawler;
7
8
class OuestFranceImmoParser extends AbstractParser
9
{
10
    protected const PROVIDER = Provider::OUESTFRANCE_IMMO;
11
12
    protected const SELECTOR_AD_WRAPPER  = 'td[style*="padding:5px 0;"]';
13
    protected const SELECTOR_LOCATION    = '.mj-column-per-50:nth-child(2) tr:nth-child(3) div';
14
15
    /**
16
     * {@inheritDoc}
17
     */
18 1
    protected function parsePhoto(Crawler $crawler): ?string
19
    {
20 1
        return str_replace('375-180', '1200-900', parent::parsePhoto($crawler));
21
    }
22
}
23