Closed
Description
Steps to reproduce
Run ForeachArrayMergeSniff against file that contains inline control structure.
foreach ([] as $item)
// inline foreach
$a = array_merge([], []);
foreach ([] as $item)
// array_merge after inline foreach
$a = array_merge([], []);
Expected result
Sniff detects nothing. There is no way to detect function scope without {}
.
Actual result
An error occurred during processing; checking has been aborted. The error message was: Undefined index: scope_opener in ...