We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 785311d commit 8474005Copy full SHA for 8474005
src/JsPhpize/Parser/Parser.php
@@ -279,19 +279,19 @@ protected function parseFunction($token)
279
{
280
$function = new Block('function');
281
$token = $this->get(0);
282
- if ($token->type === 'variable') {
+ if ($token && $token->type === 'variable') {
283
$this->skip();
284
285
}
286
287
- if (!$token->is('(')) {
+ if ($token && !$token->is('(')) {
288
throw $this->unexpected($token);
289
290
291
292
$function->setValue($this->parseParentheses());
293
294
- if (!$token->is('{')) {
+ if ($token && !$token->is('{')) {
295
296
297
0 commit comments