src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php
private function getIssetInfo(Tokens $tokens, $index)
    {
        $openIndex = $tokens->getNextMeaningfulToken($index);

        $braceOpenCount = 1;
        $meaningfulTokenIndexes = [$openIndex];

        for ($i = $openIndex + 1;; ++$i) {
            if ($tokens[$i]->isWhitespace() || $tokens[$i]->isComment()) {
                continue;
            }

            $meaningfulTokenIndexes[] = $i;

            if ($tokens[$i]->equals(')')) {
                --$braceOpenCount;
                if (0 === $braceOpenCount) {
                    break;
                }
            } elseif ($tokens[$i]->equals('(')) {
                ++$braceOpenCount;
            }
        }

        return $meaningfulTokenIndexes;
    }
private function getIssetInfo(Tokens $tokens, $index)
    {
        $openIndex = $tokens->getNextMeaningfulToken($index);

        $braceOpenCount = 1;
        $meaningfulTokenIndexes = [$openIndex];

        for ($i = $openIndex + 1;; ++$i) {
            if ($tokens[$i]->isWhitespace() || $tokens[$i]->isComment()) {
                continue;
            }

            $meaningfulTokenIndexes[] = $i;

            if ($tokens[$i]->equals(')')) {
                --$braceOpenCount;
                if (0 === $braceOpenCount) {
                    break;
                }
            } elseif ($tokens[$i]->equals('(')) {
                ++$braceOpenCount;
            }
        }

        return $meaningfulTokenIndexes;
    }
private function getIssetInfo ( Tokens $ tokens , $ index ) { $ openIndex = $ tokens -> getNextMeaningfulToken ( $ index ) ; $ braceOpenCount = 1 ; $ meaningfulTokenIndexes = [ $ openIndex ] ; for ( $ i = $ openIndex + 1 ; ; ++ $ i ) { if ( $ tokens [ $ i ] -> isWhitespace ( ) || $ tokens [ $ i ] -> isComment ( ) ) { continue ; } $ meaningfulTokenIndexes [ ] = $ i ; if ( $ tokens [ $ i ] -> equals ( ')' ) ) { -- $ braceOpenCount ; if ( 0 === $ braceOpenCount ) { break ; } } elseif ( $ tokens [ $ i ] -> equals ( '(' ) ) { ++ $ braceOpenCount ; } } return $ meaningfulTokenIndexes ; }
@param Tokens $tokens
@param int    $index  of T_ISSET

@return int[] indexes of meaningful tokens belonging to the isset statement
@param Tokens $tokens @param int $index of T_ISSET