Skip to content

Commit 89c5145

Browse files
soyukaalanpoulain
authored andcommitted
crap php 7
1 parent 2467d47 commit 89c5145

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/Symfony/Routing/ApiLoader.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace ApiPlatform\Symfony\Routing;
1515

1616
use ApiPlatform\Exception\RuntimeException;
17-
use ApiPlatform\Metadata\CollectionOperationInterface;
1817
use ApiPlatform\Metadata\HttpOperation;
1918
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2019
use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface;
@@ -91,7 +90,7 @@ public function load($data, $type = null): RouteCollection
9190

9291
$path = str_replace(sprintf('{%s}', $parameterName), $expandedValue, $path);
9392
}
94-
93+
9594
if ($controller = $operation->getController()) {
9695
if (!$this->container->has($controller)) {
9796
throw new RuntimeException(sprintf('There is no builtin action for the "%s" operation. You need to define the controller yourself.', $operationName));

tests/JsonApi/Serializer/CollectionNormalizerTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testNormalizePaginator()
7070
$resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadataCollection('Foo', [
7171
(new ApiResource())
7272
->withShortName('Foo')
73-
->withOperations(new Operations(['get' => (new GetCollection())]))
73+
->withOperations(new Operations(['get' => (new GetCollection())])),
7474
]));
7575

7676
$itemNormalizer = $this->prophesize(NormalizerInterface::class);
@@ -147,7 +147,7 @@ public function testNormalizePartialPaginator()
147147
$resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadataCollection('Foo', [
148148
(new ApiResource())
149149
->withShortName('Foo')
150-
->withOperations(new Operations(['get' => (new GetCollection())]))
150+
->withOperations(new Operations(['get' => (new GetCollection())])),
151151
]));
152152

153153
$itemNormalizer = $this->prophesize(NormalizerInterface::class);
@@ -211,7 +211,7 @@ public function testNormalizeArray()
211211
$resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadataCollection('Foo', [
212212
(new ApiResource())
213213
->withShortName('Foo')
214-
->withOperations(new Operations(['get' => (new GetCollection())]))
214+
->withOperations(new Operations(['get' => (new GetCollection())])),
215215
]));
216216
$itemNormalizer = $this->prophesize(NormalizerInterface::class);
217217
$itemNormalizer->normalize('foo', CollectionNormalizer::FORMAT, [
@@ -268,7 +268,7 @@ public function testNormalizeIncludedData()
268268
$resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadataCollection('Foo', [
269269
(new ApiResource())
270270
->withShortName('Foo')
271-
->withOperations(new Operations(['get' => (new GetCollection())]))
271+
->withOperations(new Operations(['get' => (new GetCollection())])),
272272
]));
273273

274274
$itemNormalizer = $this->prophesize(NormalizerInterface::class);
@@ -349,7 +349,7 @@ public function testNormalizeWithoutDataKey()
349349
$resourceMetadataFactoryProphecy->create('Foo')->willReturn(new ResourceMetadataCollection('Foo', [
350350
(new ApiResource())
351351
->withShortName('Foo')
352-
->withOperations(new Operations(['get' => (new GetCollection())]))
352+
->withOperations(new Operations(['get' => (new GetCollection())])),
353353
]));
354354

355355
$itemNormalizer = $this->prophesize(NormalizerInterface::class);

tests/Symfony/Routing/ApiLoaderTest.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313

1414
namespace ApiPlatform\Tests\Symfony\Routing;
1515

16-
use ApiPlatform\Core\Api\IdentifiersExtractorInterface;
17-
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
18-
use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
19-
use ApiPlatform\Metadata\Property\PropertyNameCollection;
2016
use ApiPlatform\Metadata\ApiProperty;
2117
use ApiPlatform\Metadata\ApiResource;
2218
use ApiPlatform\Metadata\Delete;
2319
use ApiPlatform\Metadata\Get;
2420
use ApiPlatform\Metadata\GetCollection;
2521
use ApiPlatform\Metadata\Link;
2622
use ApiPlatform\Metadata\Operations;
23+
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
24+
use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
25+
use ApiPlatform\Metadata\Property\PropertyNameCollection;
2726
use ApiPlatform\Metadata\Put;
2827
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2928
use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface;

0 commit comments

Comments
 (0)