| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function convertToEnumSet($serialized): ISet |
||
| 34 | { |
||
| 35 | 4 | $serialized = (string) $serialized; |
|
| 36 | 4 | $stringList = unserialize($serialized); |
|
| 37 | |||
| 38 | 4 | $set = []; |
|
| 39 | 4 | foreach ($stringList as $value) { |
|
| 40 | 3 | $set[] = call_user_func([$this->enumClass, 'instance'], $value); |
|
| 41 | } |
||
| 42 | 4 | return new ImmutableSet($this->enumClass, $set); |
|
| 43 | } |
||
| 54 |