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 2e193a0

Browse files
ArrayFilterStrictRule - get rid of different behavour with treatPhpDocTypesAsCertain: false
1 parent 8afd4af commit 2e193a0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎src/Rules/Functions/ArrayFilterStrictRule.php‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,7 @@ public function processNode(Node $node, Scope $scope): array
8383
}
8484

8585
if (count($args) === 1) {
86-
if ($this->treatPhpDocTypesAsCertain) {
87-
$arrayType = $scope->getType($args[0]->value);
88-
} else {
89-
$arrayType = $scope->getNativeType($args[0]->value);
90-
}
91-
86+
$arrayType = $scope->getType($args[0]->value);
9287
$itemType = $arrayType->getIterableValueType();
9388
if ($itemType instanceof UnionType) {
9489
$hasTruthy = false;

0 commit comments

Comments
(0)

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