Skip to content

Commit

Permalink
each() replaced with current() and next()
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 4, 2017
1 parent 187ebc0 commit f2e8ced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DI/PhpReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,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]) . '\\', '\\');
Expand Down

0 comments on commit f2e8ced

Please sign in to comment.