| Conditions | 5 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | public function onPreSerializeEnum(PreSerializeEvent $event): void |
||
| 13 | { |
||
| 14 | $type = $event->getType(); |
||
| 15 | |||
| 16 | if (isset($type['name']) && ('enum' === $type['name'] || !is_a($type['name'], \UnitEnum::class, true))) { |
||
|
|
|||
| 17 | return; |
||
| 18 | } |
||
| 19 | |||
| 20 | $object = $event->getObject(); |
||
| 21 | $params = [get_class($object), $object instanceof \BackedEnum ? 'value' : 'name']; |
||
| 22 | $event->setType('enum', $params); |
||
| 23 | } |
||
| 35 |
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