| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 14 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 37 | 5 | public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string  | 
            |
| 38 |     { | 
            ||
| 39 | 5 |         if (null === $value) { | 
            |
| 40 | 1 | return $value;  | 
            |
| 41 | }  | 
            ||
| 42 | |||
| 43 | 4 |         if ($value instanceof DateTimeInterface) { | 
            |
| 44 | 3 | return $value->format($platform->getDateTimeFormatString());  | 
            |
| 45 | }  | 
            ||
| 46 | |||
| 47 | 1 | throw ConversionException::conversionFailedInvalidType(  | 
            |
| 48 | 1 | $value,  | 
            |
| 49 | 1 | $this->getName(),  | 
            |
| 50 | 1 | ['null', DateTimeInterface::class]  | 
            |
| 51 | );  | 
            ||
| 54 |