Conditions | 4 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function normalize($object, $format = null, array $context = array()) |
||
36 | { |
||
37 | if (!($object instanceof \DateTime || $object instanceof \DateTimeInterface)) { |
||
38 | throw new InvalidArgumentException(sprintf('Expected \DateTime object or object implementing \DateTimeInterface (got "%s").', is_object($object) ? get_class($object) : gettype($object))); |
||
39 | } |
||
40 | |||
41 | return $object->format('c'); |
||
42 | } |
||
43 | |||
52 |