BaseObject   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 3
1
<?php
2
declare(strict_types=1);
3
4
namespace kosuha606\HtmlUniParser;
5
6
/**
7
 * Configurable class
8
 * @package app\Parsers
9
 */
10
abstract class BaseObject
11
{
12
    /**
13
     * @param $config
14
     */
15
    public function __construct($config = [])
16
    {
17
        foreach ($config as $key => $value) {
18
            if (\property_exists($this, $key)) {
19
                $this->$key = $value;
20
            }
21
        }
22
    }
23
}
24