Skip to content

Commit

Permalink
Fixed trailing comma in group-use
Browse files Browse the repository at this point in the history
  • Loading branch information
msarca committed Dec 16, 2018
1 parent 24e2c1e commit 73b2cf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ReflectionClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ protected function fetchItems()
$state = 'alias';
break;
}
} elseif ($token[0] === '}') {
$name = '';
$state = 'start';
} else {
if ($name[0] !== '\\' && $prefix === '') {
$name = '\\' . $name;
Expand All @@ -792,7 +795,7 @@ protected function fetchItems()
$classes[strtolower($alias)] = $prefix . $name;
}
$name = '';
$state = $token == ',' ? 'use' : 'start';
$state = 'use';
}
}
break;
Expand Down

0 comments on commit 73b2cf6

Please sign in to comment.