Open mwgamble opened 5 years ago
The loop performance error MEQP1.Performance.Loop.ArraySize should not trigger when the variable that count() is being called on is declared inside that same loop. For example:
MEQP1.Performance.Loop.ArraySize
count()
foreach ($productIds as $productId) { $images = getImages($productId); echo count($images) . "\n"; }
In this case, it isn't possible to call count() outside the loop, and therefore the warning is invalid.
The loop performance error
MEQP1.Performance.Loop.ArraySize
should not trigger when the variable thatcount()
is being called on is declared inside that same loop. For example:In this case, it isn't possible to call
count()
outside the loop, and therefore the warning is invalid.