Completed
Push — master ( aab78b...ac108f )
by Alexpts
02:15
created

AbstractPoint::__construct()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
cc 3
eloc 4
nc 3
nop 1
crap 3
1
<?php
2
namespace PTS\Routing\Point;
3
4
abstract class AbstractPoint
5
{
6
    /**
7
     * @param array $params
8
     */
9 5
    public function __construct(array $params = [])
10
    {
11 5
        foreach ($params as $name => $param) {
12 5
            if (property_exists($this, $name)) {
13 5
                $this->{$name} = $param;
14
            }
15
        }
16 5
    }
17
}
18