| Conditions | 5 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 2 | public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?Chronos |
|
| 35 | { |
||
| 36 | 2 | if ($value === null || $value instanceof Chronos) { |
|
| 37 | 1 | return $value; |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | if (!is_string($value) && !$value instanceof DateTimeInterface) { |
|
| 41 | 1 | throw ConversionException::conversionFailedFormat( |
|
| 42 | 1 | $value, |
|
| 43 | 1 | $this->getName(), |
|
| 44 | 1 | $platform->getDateTimeFormatString(), |
|
| 45 | 1 | ); |
|
| 46 | } |
||
| 47 | |||
| 48 | 1 | $val = new Chronos($value); |
|
| 49 | |||
| 50 | 1 | return $val; |
|
| 51 | } |
||
| 53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths