Skip to content

Commit 9367fa8

Browse files
committed
Add T_NAME_FULLY_QUALIFIED token
Enable nightly fix namespace fix name qualified
1 parent 4bc4378 commit 9367fa8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ matrix:
1919
env:
2020
- MINIMUM_STABILITY=dev
2121
- PACKAGE_VERSION=high
22+
- php: nightly
23+
env:
24+
- MINIMUM_STABILITY=dev
25+
- PACKAGE_VERSION=high
2226

2327
before_script:
2428
- composer selfupdate

lib/MigratorUtil.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public static function getClassNameFromFile($file)
4747
for (;$i < count($tokens);$i++) {
4848
if ($tokens[$i][0] === T_NAMESPACE) {
4949
for ($j = $i + 1;$j < count($tokens); $j++) {
50-
if ($tokens[$j][0] === T_STRING) {
50+
if (\defined('T_NAME_QUALIFIED') && $tokens[$j][0] === T_NAME_QUALIFIED) {
51+
$namespace .= '\\' . $tokens[$j][1];
52+
} elseif ($tokens[$j][0] === T_STRING) {
5153
$namespace .= '\\' . $tokens[$j][1];
5254
} elseif ($tokens[$j] === '{' || $tokens[$j] === ';') {
5355
break;

0 commit comments

Comments
 (0)