I have some problem with PhpStorm.
When I have part of query, it tells me, that I have unexpected end of file. For example, in this code:
$data = [
['aaa', 'bbb', 'ccc'],
['ddd', 'eee', 'fff']
];
$query = "INSERT INTO some_table (col_a,col_b,col_c) VALUES"; // "(" expected, unexpected end of file
$comma = FALSE;
foreach ($data as $row)
{
if ($comma) $query .= ',';
$comma = FALSE;
$query .= '(';
foreach ($row as $column)
{
$query .= quote($column);
}
$query .= ')';
}
I've tried to disable all MySQL inspections but error is still shown.
Of course code works fine.
Of course I could rewrite all queries, use prepared statements and other good solutions, but this is project with over 30 MB of php files (not counting external libraries) written in 10 years, so i can't just rewrite everything :) and this is quite annoying problem.
Is there any way to disable this inspection? What inspection is it?
This is not execution problem. Code runs just fine. It's just PhpStorm problem informing me that I have unexpected end of file in this string.
[edit] This is screen with info what is the problem for me :) http://scr.hu/6i5j/3spz6