| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function passes(string $attribute, mixed $value): bool |
||
| 17 | { |
||
| 18 | if (! enum_exists($this->enum)) { |
||
| 19 | return false; |
||
| 20 | } |
||
| 21 | |||
| 22 | if (! in_array(EnumTraits::class, trait_uses_recursive($this->enum))) { |
||
| 23 | return false; |
||
| 24 | } |
||
| 25 | |||
| 26 | if ($value instanceof $this->enum) { |
||
| 27 | return true; |
||
| 28 | } |
||
| 29 | |||
| 30 | return ! is_null($this->enum::tryFrom($value)); |
||
| 31 | } |
||
| 40 |
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