LogicImmoNeufParser::parseLocation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
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 LogicImmoNeufParser extends AbstractParser
9
{
10
    protected const PROVIDER = Provider::LOGIC_IMMO_NEUF;
11
12
    protected const SELECTOR_AD_WRAPPER    = '.contentads1';
13
    protected const SELECTOR_LOCATION      = '.adscustom3';
14
    protected const SELECTOR_BUILDING_NAME = '.adscustom3 span:first-child';
15
16
    /**
17
     * {@inheritDoc}
18
     */
19 1
    public function parseLocation(Crawler $crawler): ?string
20
    {
21 1
        $str = $crawler->filter(static::SELECTOR_LOCATION)->html();
22
23 1
        return trim(explode('<br>', $str)[1]);
24
    }
25
}
26