Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function denormalize($data, $class, $format = null, array $context = []) |
||
31 | { |
||
32 | if (!array_key_exists(ConfigurationDto::PROPERTY_KEY, $data)) { |
||
33 | throw new UnexpectedValueException( |
||
34 | 'Value for roadmap configuration key property is not exists for hydration.' |
||
35 | ); |
||
36 | } |
||
37 | |||
38 | $configurationDto = new ConfigurationDto(); |
||
39 | $configurationDto->setKey($data[ConfigurationDto::PROPERTY_KEY]); |
||
40 | |||
41 | return $configurationDto; |
||
42 | } |
||
52 |