Completed
Pull Request — master (#904)
by Antoine
03:10
created
src/Bridge/Symfony/Routing/ApiLoader.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,6 @@
 block discarded – undo
133 133
      * @param string          $operationName
134 134
      * @param array           $operation
135 135
      * @param string          $resourceShortName
136
-     * @param bool            $collection
137 136
      *
138 137
      * @throws RuntimeException
139 138
      */
Please login to merge, or discard this patch.
src/Bridge/Doctrine/Orm/SubcollectionDataProvider.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
      * @param ManagerRegistry                        $managerRegistry
38 38
      * @param PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory
39 39
      * @param PropertyMetadataFactoryInterface       $propertyMetadataFactory
40
-     * @param QueryItemExtensionInterface[]          $itemExtensions
41 40
      */
42 41
     public function __construct(ManagerRegistry $managerRegistry, PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, array $collectionExtensions = [])
43 42
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 use ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
20 20
 use ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
21 21
 use Doctrine\Common\Persistence\ManagerRegistry;
22
-use Doctrine\ORM\EntityManagerInterface;
23 22
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
24 23
 
25 24
 /**
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
117 117
             $queryBuilder->expr()->in('o', $previousQueryBuilder->getDQL())
118 118
         );
119 119
 
120
-		foreach ($this->collectionExtensions as $extension) {
121
-			$extension->applyToCollection($queryBuilder, $queryNameGenerator, $resourceClass, $operationName);
120
+        foreach ($this->collectionExtensions as $extension) {
121
+            $extension->applyToCollection($queryBuilder, $queryNameGenerator, $resourceClass, $operationName);
122 122
 
123
-			if ($extension instanceof QueryResultCollectionExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) {
124
-				return $extension->getResult($queryBuilder);
125
-			}
126
-		}
123
+            if ($extension instanceof QueryResultCollectionExtensionInterface && $extension->supportsResult($resourceClass, $operationName)) {
124
+                return $extension->getResult($queryBuilder);
125
+            }
126
+        }
127 127
 
128 128
         return $queryBuilder->getQuery()->getResult();
129 129
     }
Please login to merge, or discard this patch.
src/Api/ResourceClassResolver.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function getResourceClassFromContext($value, array $context = null, bool $strict = false): string
67 67
     {
68
-		$resourceClass = $context['resource_class'] ?? null;
68
+        $resourceClass = $context['resource_class'] ?? null;
69 69
 
70 70
         if (isset($context['subcollection_resource_class']) && null !== $context['subcollection_resource_class']) {
71 71
             $resourceClass = $context['subcollection_resource_class'];
Please login to merge, or discard this patch.
src/Util/RequestAttributesExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
             }
62 62
         }
63 63
 
64
-        throw new RuntimeException('One of the following request attribute must be defined: '.implode(', ', array_map(function ($operationType) {
64
+        throw new RuntimeException('One of the following request attribute must be defined: '.implode(', ', array_map(function($operationType) {
65 65
             return "_api_{$operationType}_operation_name";
66 66
         }, OperationTypes::TYPES)));
67 67
     }
Please login to merge, or discard this patch.