Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class AttributeCollection implements AttributeCollectionInterface |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var AttributeInterface[] |
||
15 | * @psalm-var array<string,AttributeInterface> |
||
16 | */ |
||
17 | private $attributeMap = []; |
||
18 | |||
19 | /** |
||
20 | * @param AttributeInterface[] $attributeMap |
||
21 | * @psalm-param array<string,AttributeInterface> $attributeMap |
||
22 | */ |
||
23 | 4 | public function __construct(array $attributeMap = []) |
|
24 | { |
||
25 | 4 | $this->attributeMap = $attributeMap; |
|
26 | 4 | } |
|
27 | |||
28 | /** |
||
29 | * @param string $name |
||
30 | * @return AttributeInterface |
||
31 | * @psalm-pure |
||
32 | */ |
||
33 | 2 | public function get(string $name): AttributeInterface |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param string $name |
||
44 | * @return bool |
||
45 | * @psalm-pure |
||
46 | */ |
||
47 | 2 | public function has(string $name): bool |
|
50 | } |
||
51 | } |
||
52 |