Add friendly help message for "unexpected end of file" errors (fix #2180)

This commit is contained in:
Kijin Sung 2023-09-16 18:45:17 +09:00
parent 31253cdb43
commit ec4d5f07df
3 changed files with 3 additions and 0 deletions

View file

@ -109,6 +109,7 @@ class MessageView extends Message
'/Undefined constant [\'"][^\'"]+?[\'"]/' => 'undef_constant',
'/Attempt to assign property [\'"][^\'"]+?[\'"] on null/' => 'undef_object',
'/Argument #\d+ \(\$\w+\) must be of type (Countable\|)?array, \w+ given ?/' => 'not_array',
'/Syntax error, unexpected end of file\b/i' => 'unexpected_eof',
];
foreach ($regexp_list as $regexp => $key)