Configurable::loadConfig()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 2
c 1
b 0
f 1
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace ChurakovMike\EasyGrid\Traits;
4
5
/**
6
 * Use this trait to configurate your object.
7
 *
8
 * Trait Configurable
9
 */
10
trait Configurable
11
{
12
    /**
13
     * @param array $config
14
     */
15
    public function loadConfig(array $config)
16
    {
17
        foreach ($config as $property => $value) {
18
            $this->$property = $value;
19
        }
20
    }
21
}
22