Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
20 | 7 | public function supportsDenormalization($data, $type, $format = null): bool |
|
21 | { |
||
22 | 7 | $supports = false; |
|
23 | |||
24 | 7 | if (class_exists($type)) { |
|
25 | 6 | $reflectionClass = new \ReflectionClass($type); |
|
26 | 6 | $inheritsClass = $reflectionClass->isSubclassOf(CollectionInterface::class); |
|
27 | 6 | $supports = is_array($data) && $inheritsClass; |
|
28 | } |
||
29 | |||
30 | 7 | return $supports; |
|
31 | } |
||
48 |