| Conditions | 4 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function __invoke( |
||
| 33 | string $resourceClass, |
||
| 34 | string $operation, |
||
| 35 | array $groups, |
||
| 36 | int $recursion, |
||
| 37 | SchemaGenerator $generator |
||
| 38 | ) { |
||
| 39 | if (!ContextualNormalizer::isNormalizerEnabled(ApieObjectNormalizer::class) && $recursion > 0 && $operation === 'get') { |
||
| 40 | return new Schema([ |
||
| 41 | 'type' => 'string', |
||
| 42 | 'format' => 'path', |
||
| 43 | 'nullable' => true, |
||
| 44 | 'example' => '/' . $this->classResourceConverter->normalize($resourceClass) . '/12345', |
||
| 45 | ]); |
||
| 46 | } |
||
| 47 | return $generator->createSchema($resourceClass, $operation, $groups); |
||
| 48 | } |
||
| 50 |