| Conditions | 4 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function __invoke( |
||
| 16 | string $resourceClass, |
||
| 17 | string $operation, |
||
| 18 | array $groups, |
||
| 19 | int $recursion, |
||
| 20 | OpenApiSchemaGenerator $generator |
||
| 21 | ): ?Schema { |
||
| 22 | $enumValues = array_values(array_unique($resourceClass::getValues())); |
||
| 23 | if ($operation !== 'get') { |
||
| 24 | $enumKeys = $resourceClass::getKeys(); |
||
| 25 | $enumValues = array_values(array_unique(array_merge($enumValues, $enumKeys))); |
||
| 26 | } |
||
| 27 | return new Schema( |
||
| 28 | [ |
||
| 29 | 'type' => 'string', |
||
| 30 | 'enum' => $enumValues, |
||
| 31 | 'example' => reset($enumValues) ? : null, |
||
| 32 | 'default' => reset($enumValues) ? : null |
||
| 33 | ] |
||
| 37 |
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