From 2e193a07651a6f4be3baa44ddb21d822681f5918 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 19 Apr 2024 17:08:17 +0200 Subject: [PATCH] ArrayFilterStrictRule - get rid of different behavour with `treatPhpDocTypesAsCertain: false` --- src/Rules/Functions/ArrayFilterStrictRule.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Rules/Functions/ArrayFilterStrictRule.php b/src/Rules/Functions/ArrayFilterStrictRule.php index 3f562b4..e8574da 100644 --- a/src/Rules/Functions/ArrayFilterStrictRule.php +++ b/src/Rules/Functions/ArrayFilterStrictRule.php @@ -83,12 +83,7 @@ public function processNode(Node $node, Scope $scope): array } if (count($args) === 1) { - if ($this->treatPhpDocTypesAsCertain) { - $arrayType = $scope->getType($args[0]->value); - } else { - $arrayType = $scope->getNativeType($args[0]->value); - } - + $arrayType = $scope->getType($args[0]->value); $itemType = $arrayType->getIterableValueType(); if ($itemType instanceof UnionType) { $hasTruthy = false;