Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
20 | public function pipe($resource, Context $context, Path $path, $data) |
||
21 | { |
||
22 | if (! $context instanceof HasTimezone) { |
||
23 | return $data; |
||
24 | } |
||
25 | |||
26 | if (! $resource instanceof DateTime) { |
||
27 | return $data; |
||
28 | } |
||
29 | |||
30 | $resource->setTimezone($context->getTimezone()); |
||
31 | |||
32 | return $data; |
||
33 | } |
||
35 |