Skip to content

Commit 331a5a3

Browse files
committed
[Code] More replacements
1 parent 2e6774e commit 331a5a3

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

src/Type/EntityQuery/EntityQueryType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function withAccessCheck(): self
2727
{
2828
// The constructor of ObjectType is under backward compatibility promise.
2929
// @see https://phpstan.org/developing-extensions/backward-compatibility-promise
30-
// @phpstan-ignore-next-line
30+
// @phpstan-ignore new.static
3131
$type = new static(
3232
$this->getClassName(),
3333
$this->getSubtractedType(),
@@ -40,7 +40,7 @@ public function withAccessCheck(): self
4040

4141
public function asCount(): self
4242
{
43-
// @phpstan-ignore-next-line
43+
// @phpstan-ignore new.static
4444
$type = new static(
4545
$this->getClassName(),
4646
$this->getSubtractedType(),

tests/src/DrushIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ final class DrushIntegrationTest extends DrupalRuleTestCase
99

1010
protected function getRule(): \PHPStan\Rules\Rule
1111
{
12-
// @phpstan-ignore-next-line
12+
// @phpstan-ignore phpstanApi.constructor
1313
return new CallToNonExistentFunctionRule(
1414
$this->createReflectionProvider(),
1515
true

tests/src/Reflection/EntityFieldMethodsViaMagicReflectionExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function dataHasMethod(): \Generator
4747

4848
// A content entity for sure does not have this method.
4949
yield 'Content entity: referencedEntities' => [
50-
// @phpstan-ignore-next-line
50+
// @phpstan-ignore class.notFound
5151
EntityTest::class,
5252
'referencedEntities',
5353
false,

tests/src/Reflection/EntityFieldsViaMagicReflectionExtensionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ public function testHasProperty(string $class, string $property, bool $result):
4343
public static function dataHasProperty(): \Generator
4444
{
4545
yield 'content entity supported' => [
46-
// @phpstan-ignore-next-line
46+
// @phpstan-ignore class.notFound
4747
EntityTest::class,
4848
'foobar',
4949
true
5050
];
5151
yield 'config entity not supported' => [
52-
// @phpstan-ignore-next-line
52+
// @phpstan-ignore class.notFound
5353
TestConfigType::class,
5454
'foobar',
5555
false
5656
];
5757
yield 'annotated properties are skipped on content entities' => [
58-
// @phpstan-ignore-next-line
58+
// @phpstan-ignore class.notFound
5959
ReflectionEntityTest::class,
6060
'user_id',
6161
false
@@ -92,7 +92,7 @@ public static function dataHasProperty(): \Generator
9292

9393
public function testGetPropertyEntity(): void
9494
{
95-
// @phpstan-ignore-next-line
95+
// @phpstan-ignore class.notFound
9696
$classReflection = $this->createReflectionProvider()->getClass(EntityTest::class);
9797
$propertyReflection = $this->extension->getProperty($classReflection, 'field_myfield');
9898
$readableType = $propertyReflection->getReadableType();

tests/src/Rules/AccessCheckImpossibleTypeCallRuleTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@ final class AccessCheckImpossibleTypeCallRuleTest extends DrupalRuleTestCase
1414

1515
protected function getRule(): Rule
1616
{
17-
// @phpstan-ignore-next-line
17+
// @phpstan-ignore phpstanApi.constructor
1818
return new ImpossibleCheckTypeMethodCallRule(
19-
// @phpstan-ignore-next-line
19+
// @phpstan-ignore phpstanApi.constructor
2020
new ImpossibleCheckTypeHelper(
2121
$this->createReflectionProvider(),
2222
$this->getTypeSpecifier(),
2323
[],
2424
false,
25-
true,
2625
),
2726
true,
2827
false,
2928
false,
30-
false,
3129
);
3230
}
3331

0 commit comments

Comments
 (0)