| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class SoapDateTimeSanitizerEventSubscriber implements EventSubscriberInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * {@inheritDoc} |
||
| 16 | */ |
||
| 17 | 12 | public static function getSubscribedEvents() |
|
| 18 | { |
||
| 19 | return [ |
||
| 20 | [ |
||
| 21 | 12 | 'event' => 'serializer.pre_deserialize', |
|
| 22 | 'method' => 'sanitizeDateTime', |
||
| 23 | 'format' => 'soap', |
||
| 24 | ] |
||
| 25 | ]; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Fix the datetime format, before it is deserialized. |
||
| 30 | * |
||
| 31 | * @param PreDeserializeEvent $event |
||
| 32 | * @throws RuntimeException |
||
| 33 | */ |
||
| 34 | 13 | public function sanitizeDateTime(PreDeserializeEvent $event) |
|
| 50 | } |
||
| 51 | } |
||
| 52 | } |