AbstractDataCollector::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2.1481

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
ccs 2
cts 3
cp 0.6667
crap 2.1481
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Wszetko Sitemap.
7
 *
8
 * (c) Paweł Kłopotek-Główczewski <[email protected]>
9
 *
10
 * This source file is subject to the MIT license that is bundled
11
 * with this source code in the file LICENSE.
12
 */
13
14
namespace Wszetko\Sitemap\Drivers\DataCollectors;
15
16
use Wszetko\Sitemap\Interfaces\DataCollector;
17
18
/**
19
 * Class AbstractDataCollector.
20
 *
21
 * @package Wszetko\Sitemap\Drivers\DataCollectors
22
 */
23
abstract class AbstractDataCollector implements DataCollector
24
{
25
    /**
26
     * AbstractDataCollector constructor.
27
     *
28
     * @param array $config
29
     */
30 14
    public function __construct(array $config = [])
31
    {
32 14
        if (method_exists($this, 'setConfig')) {
33
            $this->setConfig($config);
34
        }
35 14
    }
36
}
37