| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class EnumCollection extends Collection |
||
| 8 | { |
||
| 9 | 4 | public function identifiers() |
|
| 10 | { |
||
| 11 | 2 | return $this->map(function (Enum $enum) { |
|
| 12 | 4 | return $enum->identifier(); |
|
| 13 | 2 | }); |
|
| 14 | } |
||
| 15 | |||
| 16 | 34 | public function byIdentifier($identifier) |
|
| 17 | { |
||
| 18 | 17 | return $this->first(function (Enum $enum) use ($identifier) { |
|
| 19 | 34 | return $enum->identifier() == $identifier; |
|
| 20 | 17 | }); |
|
| 21 | } |
||
| 22 | |||
| 23 | 19 | public function hasIdentifier($identifier) |
|
| 27 | 19 | }); |
|
| 28 | } |
||
| 29 | } |
||
| 30 |