| Conditions | 6 |
| Paths | 6 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function passes(string $attribute, mixed $value): bool |
||
| 18 | { |
||
| 19 | if (! enum_exists($this->enum)) { |
||
| 20 | return false; |
||
| 21 | } |
||
| 22 | |||
| 23 | if ($value instanceof $this->enum) { |
||
| 24 | return true; |
||
| 25 | } |
||
| 26 | |||
| 27 | if (! in_array(EnumTraits::class, trait_uses_recursive($this->enum))) { |
||
| 28 | return false; |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($this->meta) { |
||
| 32 | if (! is_subclass_of($this->meta, Meta::class)) { |
||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 36 | $value = new $this->meta($value); |
||
| 37 | } |
||
| 38 | |||
| 39 | return ! is_null($this->enum::tryFromMeta($value, $attribute)); |
||
| 40 | } |
||
| 49 |
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