Skip to content

Commit b5fabaa

Browse files
committed
each() replaced with current() and next()
https://wiki.php.net/rfc/deprecations_php_7_2
1 parent a7f9308 commit b5fabaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Utils/Reflection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ private static function parseUseStatements(string $code, string $forClass = NULL
186186
$namespace = $class = $classLevel = $level = NULL;
187187
$res = $uses = [];
188188

189-
while (list(, $token) = each($tokens)) {
189+
while ($token = current($tokens)) {
190+
next($tokens);
190191
switch (is_array($token) ? $token[0] : $token) {
191192
case T_NAMESPACE:
192193
$namespace = ltrim(self::fetch($tokens, [T_STRING, T_NS_SEPARATOR]) . '\\', '\\');

0 commit comments

Comments
 (0)