Skip to content

Commit fd98505

Browse files
committed
cs
1 parent 3dfe3ee commit fd98505

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/Hydra/Serializer/CollectionNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
*/
3333
final class CollectionNormalizer extends AbstractCollectionNormalizer
3434
{
35+
use HydraOperationsTrait;
3536
use HydraPrefixTrait;
3637
use JsonLdContextTrait;
37-
use HydraOperationsTrait;
3838

3939
public const FORMAT = 'jsonld';
4040
public const IRI_ONLY = 'iri_only';

src/Hydra/Tests/Serializer/CollectionNormalizerTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use ApiPlatform\Metadata\IriConverterInterface;
2323
use ApiPlatform\Metadata\Operations;
2424
use ApiPlatform\Metadata\Post;
25-
use ApiPlatform\Metadata\Patch;
2625
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2726
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
2827
use ApiPlatform\Metadata\ResourceClassResolverInterface;
@@ -507,7 +506,7 @@ public function testNormalizeCollectionWithHydraOperations(): void
507506
$this->assertIsArray($actual['supportedOperation']);
508507
$this->assertNotEmpty($actual['supportedOperation']);
509508

510-
$methods = array_map(fn($op) => $op['method'] ?? null, $actual['supportedOperation']);
509+
$methods = array_map(static fn ($op) => $op['method'] ?? null, $actual['supportedOperation']);
511510
$this->assertContains('GET', $methods);
512511
$this->assertContains('POST', $methods);
513512

@@ -576,7 +575,7 @@ public function testNormalizeCollectionWithMultipleApiResourcesAndHydraOperation
576575

577576
$this->assertCount(2, $actual['supportedOperation']);
578577

579-
$methods = array_map(fn($op) => $op['method'] ?? null, $actual['supportedOperation']);
578+
$methods = array_map(static fn ($op) => $op['method'] ?? null, $actual['supportedOperation']);
580579
$this->assertContains('GET', $methods);
581580
$this->assertContains('POST', $methods);
582581

0 commit comments

Comments
 (0)