| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 6 | public function __construct(array $data) |
|
| 38 | { |
||
| 39 | 6 | foreach ($data as $name => $value) { |
|
| 40 | 6 | $this->{$name} = $value; |
|
| 41 | } |
||
| 42 | |||
| 43 | 6 | if (empty($this->alternativeAttributes)) { |
|
| 44 | 2 | $this->alternativeAttributes = $this->attributes; |
|
| 45 | } else { |
||
| 46 | 4 | $this->alternativeAttributes = array_merge($this->attributes, $this->alternativeAttributes); |
|
| 47 | } |
||
| 79 |