Skip to content

Commit 63cd476

Browse files
authored
Merge branch refs/heads/2.1.x into 2.2.x
2 parents 2bb2575 + ea53224 commit 63cd476

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4536,7 +4536,7 @@ private function inferForLoopExpressions(For_ $stmt, Expr $lastCondExpr, Mutatin
45364536
&& $lastCondExpr->left instanceof Variable
45374537
&& $lastCondExpr->right instanceof FuncCall
45384538
&& $lastCondExpr->right->name instanceof Name
4539-
&& $lastCondExpr->right->name->toLowerString() === 'count'
4539+
&& in_array($lastCondExpr->right->name->toLowerString(), ['count', 'sizeof'], true)
45404540
&& count($lastCondExpr->right->getArgs()) > 0
45414541
&& $lastCondExpr->right->getArgs()[0]->value instanceof Variable
45424542
&& is_string($stmt->init[0]->var->name)
@@ -4557,7 +4557,7 @@ private function inferForLoopExpressions(For_ $stmt, Expr $lastCondExpr, Mutatin
45574557
&& $lastCondExpr->right instanceof Variable
45584558
&& $lastCondExpr->left instanceof FuncCall
45594559
&& $lastCondExpr->left->name instanceof Name
4560-
&& $lastCondExpr->left->name->toLowerString() === 'count'
4560+
&& in_array($lastCondExpr->left->name->toLowerString(), ['count', 'sizeof'], true)
45614561
&& count($lastCondExpr->left->getArgs()) > 0
45624562
&& $lastCondExpr->left->getArgs()[0]->value instanceof Variable
45634563
&& is_string($stmt->init[0]->var->name)

0 commit comments

Comments
 (0)