public function visitForeach(Node $node) : Context
{
$expression_type = UnionType::fromNode($this->context, $this->code_base, $node->children['expr']);
// Check the expression type to make sure its
// something we can iterate over
if ($expression_type->isScalar()) {
$this->emitIssue(Issue::TypeMismatchForeach, $node->lineno ?? 0, (string) $expression_type);
}
return $this->context;
}