| 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 | 303 | public function __construct(array $properties = array()) |
|
| 25 | { |
||
| 26 | 303 | foreach ($properties as $property => $value) { |
|
| 27 | 266 | if (property_exists($this, $property)) { |
|
| 28 | 265 | $this->$property = $value; |
|
| 29 | } else { |
||
| 30 | 266 | throw new PropertyNotFoundException($property, get_class($this)); |
|
| 31 | } |
||
| 32 | } |
||
| 33 | 303 | } |
|
| 34 | |||
| 67 |