Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 325 | public function __construct(array $properties = array()) |
|
25 | { |
||
26 | 325 | foreach ($properties as $property => $value) { |
|
27 | 279 | if (property_exists($this, $property)) { |
|
28 | 278 | $this->$property = $value; |
|
29 | } else { |
||
30 | 279 | throw new PropertyNotFoundException($property, get_class($this)); |
|
31 | } |
||
32 | } |
||
33 | 325 | } |
|
34 | |||
67 |