| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | 1 | public function deserialize(array $data) |
|
| 22 | { |
||
| 23 | 1 | $data = new Dictionary($data); |
|
| 24 | |||
| 25 | 1 | $collection = new Dictionary(); |
|
| 26 | 1 | $serializer = new ToggleSerializer(new OperatorConditionSerializer(new OperatorSerializer())); |
|
| 27 | 1 | foreach ($data as $name => $serializedToggle) { |
|
| 28 | 1 | $toggle = $serializer->deserialize($serializedToggle); |
|
| 29 | 1 | $collection->set($serializedToggle->get('name'), $toggle); |
|
| 30 | 1 | } |
|
| 31 | |||
| 32 | 1 | return $collection; |
|
| 33 | } |
||
| 34 | |||
| 50 | } |