api-platform / core

@@ -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%
phpunit-php8.1
Build #3043076104 -
phpunit
behat-php8
Build #3043076104 -
behat
behat-php8.1
Build #3043076104 -
behat

No yaml found.

Create your codecov.yml to customize your Codecov experience

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.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading