Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function denormalize($data, $class, $format = null, array $context = array()) |
||
32 | { |
||
33 | if (!$this->serializer instanceof DenormalizerInterface) { |
||
34 | throw new LogicException('Cannot denormalize because the injected serializer is not a denormalizer.'); |
||
35 | } |
||
36 | |||
37 | $display = null; |
||
38 | |||
39 | if (isset($data['display'])) { |
||
40 | $display = $this->serializer->denormalize($data['display'], 'Xabbuh\XApi\Model\LanguageMap', $format, $context); |
||
41 | } |
||
42 | |||
43 | return new Verb($data['id'], $display); |
||
44 | } |
||
45 | |||
54 |