mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-03 17:57:59 +01:00
3da189769c
The UseUse::$alias node can now be null if an alias is not explicitly given. As such "use Foo\Bar" and "use Foo\Bar as Bar" are now represented differently. The UseUse->getAlias() method replicates the previous semantics, by returning "Bar" in both cases.
28 lines
617 B
Plaintext
28 lines
617 B
Plaintext
Ensure correct file position attributes for group use prefix
|
|
-----
|
|
<?php
|
|
use Foo\Bar\{Baz};
|
|
-----
|
|
!!positions
|
|
array(
|
|
0: Stmt_GroupUse[2:1 - 2:17](
|
|
type: TYPE_UNKNOWN (0)
|
|
prefix: Name[2:5 - 2:11](
|
|
parts: array(
|
|
0: Foo
|
|
1: Bar
|
|
)
|
|
)
|
|
uses: array(
|
|
0: Stmt_UseUse[2:14 - 2:16](
|
|
type: TYPE_NORMAL (1)
|
|
name: Name[2:14 - 2:16](
|
|
parts: array(
|
|
0: Baz
|
|
)
|
|
)
|
|
alias: null
|
|
)
|
|
)
|
|
)
|
|
) |