From f2e8ced089549eda2288c780893bf4b4065449ee Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Feb 2017 15:40:36 +0100 Subject: [PATCH] each() replaced with current() and next() https://wiki.php.net/rfc/deprecations_php_7_2 --- src/DI/PhpReflection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DI/PhpReflection.php b/src/DI/PhpReflection.php index fedbc5622..36b73227f 100644 --- a/src/DI/PhpReflection.php +++ b/src/DI/PhpReflection.php @@ -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]) . '\\', '\\');