Skip to content

Commit 702201d

Browse files
committed
Remove the visitor, not sure what it is for
1 parent 647132d commit 702201d

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

src/Parser/VoidCastVisitor.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/Rules/Methods/CallToMethodStatementWithNoDiscardRule.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PHPStan\Analyser\NullsafeOperatorHelper;
77
use PHPStan\Analyser\Scope;
88
use PHPStan\DependencyInjection\RegisteredRule;
9-
use PHPStan\Parser\VoidCastVisitor;
109
use PHPStan\Rules\Rule;
1110
use PHPStan\Rules\RuleErrorBuilder;
1211
use PHPStan\Rules\RuleLevelHelper;
@@ -42,9 +41,6 @@ public function processNode(Node $node, Scope $scope): array
4241
if (!$funcCall->name instanceof Node\Identifier) {
4342
return [];
4443
}
45-
if ($funcCall->hasAttribute(VoidCastVisitor::ATTRIBUTE_NAME)) {
46-
return [];
47-
}
4844
$methodName = $funcCall->name->toString();
4945

5046
$typeResult = $this->ruleLevelHelper->findTypeToCheck(

src/Rules/Methods/CallToStaticMethodStatementWithNoDiscardRule.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PHPStan\Analyser\NullsafeOperatorHelper;
77
use PHPStan\Analyser\Scope;
88
use PHPStan\DependencyInjection\RegisteredRule;
9-
use PHPStan\Parser\VoidCastVisitor;
109
use PHPStan\Reflection\ReflectionProvider;
1110
use PHPStan\Rules\Rule;
1211
use PHPStan\Rules\RuleErrorBuilder;
@@ -45,9 +44,6 @@ public function processNode(Node $node, Scope $scope): array
4544
if (!$funcCall->name instanceof Node\Identifier) {
4645
return [];
4746
}
48-
if ($funcCall->hasAttribute(VoidCastVisitor::ATTRIBUTE_NAME)) {
49-
return [];
50-
}
5147

5248
$methodName = $funcCall->name->toString();
5349
if ($funcCall->class instanceof Node\Name) {

0 commit comments

Comments
 (0)