CrawlerContinue::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2.0185

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
nc 2
nop 3
dl 0
loc 12
ccs 5
cts 6
cp 0.8333
crap 2.0185
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace PiedWeb\SeoPocketCrawler;
4
5
class CrawlerContinue extends Crawler
6
{
7
    public function __construct(string $id, bool $debug = true, ?string $dataDirectory = null)
8
    {
9
        $this->config = CrawlerConfig::loadFrom($id, $dataDirectory);
10 3
11
        //$this->recorder = new Recorder($this->config->getDataFolder(), $this->config->getCacheMethod());
12 3
13 3
        $this->debug = $debug;
14
15 3
        $dataFromPreviousCrawl = $this->config->getDataFromPreviousCrawl();
16 3
17
        foreach ($dataFromPreviousCrawl as $k => $v) {
18
            $this->$k = $v;
19 3
        }
20
    }
21
}
22