| Total Complexity | 8 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | trait SplEnumTrait |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Generates a list of cases on an enum |
||
| 23 | * |
||
| 24 | * @return array An array of all defined cases of this enumeration, in order of declaration. |
||
| 25 | */ |
||
| 26 | public static function cases(): array |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Maps a scalar to an enum instance |
||
| 42 | * |
||
| 43 | * @param int|string $value The scalar value to map to an enum case. |
||
| 44 | * |
||
| 45 | * @return SplEnum A case instance of this enumeration. |
||
| 46 | */ |
||
| 47 | final public static function from($value): self |
||
| 48 | { |
||
| 49 | $case = static::tryFrom($value); |
||
| 50 | |||
| 51 | if (null === $case) { |
||
| 52 | throw new \ValueError( |
||
| 53 | sprintf('%s is not a valid backing value for enum "%s"', \json_encode($value), static::class) |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | |||
| 57 | return $case; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Maps a scalar to an enum instance or null |
||
| 62 | * |
||
| 63 | * @param int|string $value e scalar value to map to an enum case. |
||
| 64 | * |
||
| 65 | * @return SplEnum|null A case instance of this enumeration, or null if not found. |
||
| 66 | */ |
||
| 67 | final public static function tryFrom($value): ?self |
||
| 77 | } |
||
| 78 | } |
||
| 79 |
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