Skip to content

Commit dd8ceae

Browse files
committed
cs: keep strict type declarations
1 parent 7cc01a6 commit dd8ceae

6 files changed

Lines changed: 6 additions & 5 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
'phpdoc_trim_consecutive_blank_line_separation' => true,
110110
'phpdoc_var_annotation_correct_order' => true,
111111
'return_assignment' => true,
112+
'declare_strict_types' => true,
112113
'strict_param' => true,
113114
'visibility_required' => [
114115
'elements' => [

src/State/SerializerAwareProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ interface SerializerAwareProviderInterface
2727
/**
2828
* @return void
2929
*/
30-
public function setSerializerLocator(ContainerInterface $serializerLocator);
30+
public function setSerializerLocator(ContainerInterface $serializerLocator): void;
3131
}

tests/Fixtures/TestBundle/ApiResource/IsGrantedTestResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function provide(Operation $operation, array $uriVariables = [], a
3939
return new self();
4040
}
4141

42-
public static function provideShouldNotBeCalled(Operation $operation, array $uriVariables = [], array $context = [])
42+
public static function provideShouldNotBeCalled(Operation $operation, array $uriVariables = [], array $context = []): void
4343
{
4444
throw new \RuntimeException('provider should not get called');
4545
}

tests/Fixtures/TestBundle/Entity/MappedResourceWithRelationRelatedEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getId(): ?int
3232
return $this->id;
3333
}
3434

35-
public function setId(?int $id = null)
35+
public function setId(?int $id = null): void
3636
{
3737
$this->id = $id;
3838
}

tests/Functional/JsonSchema/JsonSchemaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function testReadOnlySchema(): void
224224
$this->assertTrue($schema['definitions']['Resource']['properties']['resourceRelated']['readOnly'] ?? false);
225225
}
226226

227-
public function testGenIdFalse()
227+
public function testGenIdFalse(): void
228228
{
229229
$schema = $this->schemaFactory->buildSchema(Product::class, 'jsonld', Schema::TYPE_OUTPUT, $this->operationMetadataFactory->create('_api_/json-stream-products_get_collection'));
230230
$this->assertThat(['member' => [['aggregateRating' => ['ratingValue' => '1.0', 'reviewCount' => 1]]]], new MatchesJsonSchema($schema));

tests/Functional/ListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function getResources(): array
3232
];
3333
}
3434

35-
public function testListener()
35+
public function testListener(): void
3636
{
3737
self::createClient()->request('PATCH', '/original_data_with_listeners/123/verify', [
3838
'headers' => ['content-type' => 'application/merge-patch+json'],

0 commit comments

Comments
 (0)