Conditions | 4 |
Paths | 5 |
Total Lines | 26 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public static function getSubscribingMethods() |
||
21 | { |
||
22 | $methods = []; |
||
23 | $deserializationTypes = ['DateTime', 'DateTimeImmutable', 'DateInterval']; |
||
24 | $serialisationTypes = ['DateTime', 'DateTimeImmutable', 'DateInterval']; |
||
25 | |||
26 | foreach (['array'] as $format) { |
||
27 | foreach ($deserializationTypes as $type) { |
||
28 | $methods[] = [ |
||
29 | 'type' => $type, |
||
30 | 'direction' => GraphNavigator::DIRECTION_DESERIALIZATION, |
||
31 | 'format' => $format, |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | foreach ($serialisationTypes as $type) { |
||
36 | $methods[] = [ |
||
37 | 'type' => $type, |
||
38 | 'format' => $format, |
||
39 | 'direction' => GraphNavigator::DIRECTION_SERIALIZATION, |
||
40 | 'method' => 'serialize'.$type, |
||
41 | ]; |
||
42 | } |
||
43 | } |
||
44 | |||
45 | return $methods; |
||
46 | } |
||
48 |