Showing 1 of 1 files from the diff.
@@ -14,11 +14,9 @@
Loading
14 | 14 | namespace ApiPlatform\Metadata\Resource\Factory; |
|
15 | 15 | ||
16 | 16 | use ApiPlatform\Metadata\ApiResource; |
|
17 | - | use ApiPlatform\Metadata\CollectionOperationInterface; |
|
18 | - | use ApiPlatform\Metadata\GraphQl\Operation as GraphQlOperation; |
|
17 | + | use ApiPlatform\Metadata\Get; |
|
19 | 18 | use ApiPlatform\Metadata\HttpOperation; |
|
20 | 19 | use ApiPlatform\Metadata\NotExposed; |
|
21 | - | use ApiPlatform\Metadata\Operations; |
|
22 | 20 | use ApiPlatform\Metadata\Resource\ResourceMetadataCollection; |
|
23 | 21 | use ApiPlatform\Symfony\Routing\SkolemIriConverter; |
|
24 | 22 |
@@ -59,13 +57,10 @@
Loading
59 | 57 | $operations = $resource->getOperations(); |
|
60 | 58 | ||
61 | 59 | foreach ($operations as $operation) { |
|
62 | - | // Ignore collection and GraphQL operations |
|
63 | - | if ($operation instanceof CollectionOperationInterface || $operation instanceof GraphQlOperation) { |
|
64 | - | continue; |
|
65 | - | } |
|
66 | - | ||
67 | 60 | // An item operation has been found, nothing to do anymore in this factory |
|
68 | - | return $resourceMetadataCollection; |
|
61 | + | if ($operation instanceof Get || ($operation->getExtraProperties()['is_legacy_resource_metadata'] ?? false)) { |
|
62 | + | return $resourceMetadataCollection; |
|
63 | + | } |
|
69 | 64 | } |
|
70 | 65 | } |
|
71 | 66 |
Files | Complexity | Coverage |
---|---|---|
src | 4,127 | 76.53% |
Project Totals (829 files) | 4127 | 76.53% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.