Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit e925fb2

Browse files
committed
Merge branch 'hotfix/35'
Close #35
2 parents 7c17f7f + 899e11b commit e925fb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ClassFileLocator.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public function accept()
8080
$contents = file_get_contents($file->getRealPath());
8181
$tokens = token_get_all($contents);
8282
$count = count($tokens);
83-
$t_trait = defined('T_TRAIT') ? T_TRAIT : -1; // For preserve PHP 5.3 compatibility
8483
for ($i = 0; $i < $count; $i++) {
8584
$token = $tokens[$i];
8685
if (! is_array($token)) {
@@ -117,7 +116,7 @@ public function accept()
117116
$savedNamespace = $namespace;
118117
}
119118
break;
120-
case $t_trait:
119+
case T_TRAIT:
121120
case T_CLASS:
122121
// ignore T_CLASS after T_DOUBLE_COLON to allow PHP >=5.5 FQCN scalar resolution
123122
if ($i > 0 && is_array($tokens[$i - 1]) && $tokens[$i - 1][0] === T_DOUBLE_COLON) {

0 commit comments

Comments
 (0)