Skip to content

Commit 7a2af63

Browse files
committed
Cosmetics
1 parent 3351c97 commit 7a2af63

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Rules/Functions/ArrayFilterRule.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPStan\Type\VerbosityLevel;
1515
use function count;
1616
use function sprintf;
17-
use function strtolower;
1817

1918
/**
2019
* @implements Rule<Node\Expr\FuncCall>

src/Rules/Functions/ArrayValuesRule.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPStan\Type\VerbosityLevel;
1515
use function count;
1616
use function sprintf;
17-
use function strtolower;
1817

1918
/**
2019
* @implements Rule<Node\Expr\FuncCall>
@@ -44,13 +43,14 @@ public function processNode(Node $node, Scope $scope): array
4443
return [];
4544
}
4645

47-
$functionName = $this->reflectionProvider->resolveFunctionName($node->name, $scope);
48-
49-
if ($functionName === null || strtolower($functionName) !== 'array_values') {
46+
if (!$this->reflectionProvider->hasFunction($node->name, $scope)) {
5047
return [];
5148
}
5249

5350
$functionReflection = $this->reflectionProvider->getFunction($node->name, $scope);
51+
if ($functionReflection->getName() !== 'array_values') {
52+
return [];
53+
}
5454

5555
$parametersAcceptor = ParametersAcceptorSelector::selectFromArgs(
5656
$scope,

0 commit comments

Comments
 (0)