Skip to content

Commit dc74ea1

Browse files
committed
test fixes
1 parent e700e7e commit dc74ea1

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ parameters:
8686
- '#Method GraphQL\\Type\\Definition\\WrappingType::getWrappedType\(\) invoked with 1 parameter, 0 required\.#'
8787
- '#Access to an undefined property GraphQL\\Type\\Definition\\NamedType&GraphQL\\Type\\Definition\\Type::\$name\.#'
8888
- "#Call to function method_exists\\(\\) with GraphQL\\\\Type\\\\Definition\\\\Type&GraphQL\\\\Type\\\\Definition\\\\WrappingType and 'getInnermostType' will always evaluate to true\\.#"
89-
- "#Call to function method_exists\\(\\) with Symfony\\\\Component\\\\Console\\\\Application and 'addCommand' will always evaluate to false\\.#"
9089
- "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\PropertyInfo\\\\\\\\PropertyInfoExtractor' and 'getType' will always evaluate to true\\.#"
9190
- "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\HttpFoundation\\\\\\\\Request' and 'getContentTypeFormat' will always evaluate to true\\.#"
9291
- '#Call to an undefined method Symfony\\Component\\HttpFoundation\\Request::getContentType\(\)\.#'

src/Serializer/Tests/Mapping/Loader/PropertyMetadataLoaderTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public function testCreateMappingForASetOfProperties(): void
3030
$loader = new PropertyMetadataLoader($coll);
3131
$classMetadata = new ClassMetadata(HasRelation::class);
3232
$loader->loadClassMetadata($classMetadata);
33-
if (method_exists($classMetadata, 'getAttributesMetadata')) {
33+
if (method_exists($classMetadata, 'getAttributesMetadata')) { // @phpstan-ignore-line
3434
$attributesMetadata = $classMetadata->getAttributesMetadata();
3535
} else {
36-
$attributesMetadata = $classMetadata->attributesMetadata;
36+
$attributesMetadata = $classMetadata->attributesMetadata; // @phpstan-ignore-line
3737
}
3838

3939
$this->assertArrayHasKey('relation', $attributesMetadata);
@@ -47,12 +47,12 @@ public function testCreateMappingForAClass(): void
4747
$loader = new PropertyMetadataLoader($coll);
4848
$classMetadata = new ClassMetadata(Relation::class);
4949
$loader->loadClassMetadata($classMetadata);
50-
if (method_exists($classMetadata, 'getAttributesMetadata')) {
50+
if (method_exists($classMetadata, 'getAttributesMetadata')) { // @phpstan-ignore-line
5151
$attributesMetadata = $classMetadata->getAttributesMetadata();
5252
} else {
53-
$attributesMetadata = $classMetadata->attributesMetadata;
53+
$attributesMetadata = $classMetadata->attributesMetadata; // @phpstan-ignore-line
5454
}
55-
$this->assertArrayHasKey('name', $attributesMetadata->attributesMetadata);
56-
$this->assertEquals(['read'], $attributesMetadata->attributesMetadata['name']->getGroups());
55+
$this->assertArrayHasKey('name', $attributesMetadata);
56+
$this->assertEquals(['read'], $attributesMetadata['name']->getGroups());
5757
}
5858
}

tests/Fixtures/TestBundle/Mercure/TestHub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getUpdates(): array
4040
// @TODO: remove in 4.3
4141
public function getUrl(): string
4242
{
43-
if (!method_exists($this->hub, 'getUrl')) { // @phpstan-ignore-line
43+
if (!method_exists($this->hub, 'getUrl')) {
4444
throw new \RuntimeException();
4545
}
4646

@@ -54,7 +54,7 @@ public function getPublicUrl(): string
5454

5555
public function getProvider(): TokenProviderInterface
5656
{
57-
if (!method_exists($this->hub, 'getProvider')) { // @phpstan-ignore-line
57+
if (!method_exists($this->hub, 'getProvider')) {
5858
throw new \RuntimeException();
5959
}
6060

0 commit comments

Comments
 (0)