Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | final class StdClassHandler implements SubscribingHandlerInterface |
||
16 | { |
||
17 | 329 | /** |
|
18 | * {@inheritdoc} |
||
19 | 329 | */ |
|
20 | 329 | public static function getSubscribingMethods() |
|
21 | { |
||
22 | 329 | $methods = []; |
|
23 | 329 | $formats = ['json', 'xml']; |
|
24 | 329 | ||
25 | 329 | foreach ($formats as $format) { |
|
26 | 329 | $methods[] = [ |
|
27 | 329 | 'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION, |
|
28 | 'type' => \stdClass::class, |
||
29 | 'format' => $format, |
||
30 | 'method' => 'serializeStdClass', |
||
31 | 329 | ]; |
|
32 | } |
||
33 | |||
34 | 7 | return $methods; |
|
35 | } |
||
36 | 7 | ||
37 | 7 | /** |
|
38 | * @return mixed |
||
39 | 7 | */ |
|
40 | 4 | public function serializeStdClass(SerializationVisitorInterface $visitor, \stdClass $stdClass, array $type, SerializationContext $context) |
|
51 | } |
||
52 | } |
||
53 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.