diff --git a/src/UseStatements.php b/src/UseStatements.php index e22030d..ce8b8ef 100644 --- a/src/UseStatements.php +++ b/src/UseStatements.php @@ -95,7 +95,8 @@ public static function parseUseStatements($code, $forClass = NULL) $namespace = $class = $classLevel = $level = NULL; $res = $uses = []; - while (list(, $token) = each($tokens)) { + while ($token = current($tokens)) { + next($tokens); switch (is_array($token) ? $token[0] : $token) { case T_NAMESPACE: $namespace = ltrim(self::fetch($tokens, [T_STRING, T_NS_SEPARATOR]) . '\\', '\\');