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