private function inspectForeach(Stmt\Foreach_ $foreachStmt, Context $context) { if ($foreachStmt->valueVar->name === 'this') { $context->notice('unexpected_use.this', 'Foreach loop can not use a value variable named "this".', $foreachStmt->valueVar); return true; } return false; }