| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct(array $attributes = []) |
||
| 20 | { |
||
| 21 | 10 | $this->init(array_reduce($attributes, function (array $carry, AttributeInterface $attribute) { |
|
| 22 | 10 | $carry[$attribute->getName()] = $attribute; // enforce consistent attribute keys |
|
| 23 | 10 | return $carry; |
|
| 24 | 10 | }, []), AttributeInterface::class); |
|
| 25 | 10 | } |
|
| 26 | |||
| 40 |