Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1ed86a5

Browse files
Fixed compatibility with PHPStan 0.11
1 parent 77a68c4 commit 1ed86a5

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

‎src/Rules/Deprecations/AccessDeprecatedStaticPropertyRule.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function processNode(Node $node, Scope $scope): array
5959
$node->class,
6060
'', // We don't care about the error message
6161
function (Type $type) use ($propertyName): bool {
62-
return $type->canAccessProperties()->yes() && $type->hasProperty($propertyName);
62+
return $type->canAccessProperties()->yes() && $type->hasProperty($propertyName)->yes();
6363
}
6464
);
6565

‎src/Rules/Deprecations/CallToDeprecatedStaticMethodRule.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function processNode(Node $node, Scope $scope): array
5959
$node->class,
6060
'', // We don't care about the error message
6161
function (Type $type) use ($methodName): bool {
62-
return $type->canCallMethods()->yes() && $type->hasMethod($methodName);
62+
return $type->canCallMethods()->yes() && $type->hasMethod($methodName)->yes();
6363
}
6464
);
6565

‎src/Rules/Deprecations/FetchingClassConstOfDeprecatedClassRule.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function processNode(Node $node, Scope $scope): array
5959
$node->class,
6060
'', // We don't care about the error message
6161
function (Type $type) use ($constantName): bool {
62-
return $type->canAccessConstants()->yes() && $type->hasConstant($constantName);
62+
return $type->canAccessConstants()->yes() && $type->hasConstant($constantName)->yes();
6363
}
6464
);
6565

‎tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ public function testDeprecatedMethodCall(): void
2121
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Foo.',
2222
7,
2323
],
24+
[
25+
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Bar.',
26+
10,
27+
],
2428
[
2529
'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedMethodCall\Foo.',
2630
11,

‎tests/Rules/Deprecations/CallToDeprecatedStaticMethodRuleTest.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public function testDeprecatedStaticMethodCall(): void
2525
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.',
2626
6,
2727
],
28+
[
29+
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Bar.',
30+
8,
31+
],
2832
[
2933
'Call to deprecated method deprecatedFoo2() of class CheckDeprecatedStaticMethodCall\Foo.',
3034
9,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /