Total Complexity | 9 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 92.86% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | abstract class PhpEnumType extends EnumType |
||
16 | { |
||
17 | /** |
||
18 | * Returns the FQCN of the native PHP enum. |
||
19 | * |
||
20 | * @return class-string<BackedEnum> |
||
1 ignored issue
–
show
|
|||
21 | */ |
||
22 | abstract protected function getEnumType(): string; |
||
23 | |||
24 | 2 | protected function getPossibleValues(): array |
|
25 | { |
||
26 | 2 | return array_map(fn (BackedEnum $str) => $str->value, $this->getEnumType()::cases()); |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param ?string $value |
||
31 | */ |
||
32 | 3 | public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?BackedEnum |
|
43 | } |
||
44 | |||
45 | 4 | public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string |
|
58 |
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