Skip to content

Commit

Permalink
Closes #282: Issue with grouped use statements …
Browse files Browse the repository at this point in the history
… when only a single level namespace prefix was used.
  • Loading branch information
Manuel Pichler committed Jan 11, 2017
1 parent 0bbad70 commit 3e523f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ protected function parseQualifiedNameElement(array $previousElements)
if (Tokens::T_CURLY_BRACE_OPEN !== $this->tokenizer->peek()) {
return parent::parseQualifiedNameElement($previousElements);
}
if (count($previousElements) > 2 && '\\' === end($previousElements)) {
if (count($previousElements) >= 2 && '\\' === end($previousElements)) {
return null;
}
$this->throwUnexpectedTokenException($this->tokenizer->next());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

use my\math\{ const SINDELFINGEN };

use my\ { ClassE, ClassF, ClassG, ClassH as Bofiz };

class ExtendingClass extends ClassB
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

use my\math\{ const SINDELFINGEN };

use my\ { ClassE, ClassF, ClassG, ClassH as Bofiz };

class ExtendingClass extends ClassB
{

Expand Down

0 comments on commit 3e523f5

Please sign in to comment.