diff --git a/CodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php b/CodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php
index <HASH>..<HASH> 100644
--- a/CodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php
+++ b/CodingStandard/Sniffs/Classes/ClassCreateInstanceSniff.php
@@ -60,7 +60,8 @@ class ClassCreateInstanceSniff implements Sniff
 
         if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
             // New in PHP 5.4: allow to instantiate class and immediately call method on it.
-            list (, $scopeEnd) = each($tokens[$stackPtr]['nested_parenthesis']);
+            $scopeStart = key($tokens[$stackPtr]['nested_parenthesis']);
+            $scopeEnd = $tokens[$stackPtr]['nested_parenthesis'][$scopeStart];
         }
 
         $nextParenthesis = $phpcsFile->findNext(
Fixed "each" function deprication in PHP 7.x