| Conditions | 5 | 
| Paths | 4 | 
| Total Lines | 21 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 12 | public function buildCell(Cell $cell, array $options)  | 
            ||
| 13 |     { | 
            ||
| 14 | $value = $cell->value;  | 
            ||
| 15 | |||
| 16 |         if (null === $value) { | 
            ||
| 17 | return;  | 
            ||
| 18 | }  | 
            ||
| 19 | |||
| 20 |         if (false === $value instanceof \DateTime) { | 
            ||
| 21 |             if (strtotime($value)) { | 
            ||
| 22 | $cell->value = new \DateTime($value);  | 
            ||
| 23 |             } else { | 
            ||
| 24 | throw new \InvalidArgumentException(sprintf(  | 
            ||
| 25 | 'The DateTime column requires a \DateTime value at "%s", but got "%s"',  | 
            ||
| 26 | $options['property'], is_object($value) ? get_class($value) : gettype($value)  | 
            ||
| 27 | ));  | 
            ||
| 28 | }  | 
            ||
| 29 | }  | 
            ||
| 30 | |||
| 31 | $cell->parameters['format'] = $options['format'];  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 44 |