I have this code and get an error reported for the two "undefined" variables
$tables = [
'foo',
'bar',
'baz'
];
foreach ($tables as $table) {
$$table = $this->setUpTables($table, $prefix);
}
$all = $this->getBaz($foo,$bar); // those two are reported as undefined
Is it possible to tell PhpStorm to not report this "error"?
EDIT:
/** @var foo $foo */
/** @var bar $bar */
$all = $this->getBaz($foo,$bar);
$result[$table] = $this->setUpTables($table, $prefix);