| Conditions | 4 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4.25 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 1 | public function normalize($object, $format = null, array $context = array()) |
|
| 36 | { |
||
| 37 | 1 | 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 | 1 | return $object->format('c'); |
|
| 42 | } |
||
| 43 | |||
| 52 |