src/Viserio/Component/Translation/Extractor/PhpExtractor.php
private function skipMethodArgument(Iterator $tokenIterator): void
    {
        $openBraces = 0;

        for (; $tokenIterator->valid(); $tokenIterator->next()) {
            $token = $tokenIterator->current();

            if ($token[0] === '[' || $token[0] === '(') {
                $openBraces++;
            }

            if ($token[0] === ']' || $token[0] === ')') {
                $openBraces--;
            }

            if (($openBraces === 0 && $token[0] === ',') || ($openBraces === -1 && $token[0] === ')')) {
                break;
            }
        }
    }
private function skipMethodArgument(Iterator $tokenIterator): void
    {
        $openBraces = 0;

        for (; $tokenIterator->valid(); $tokenIterator->next()) {
            $token = $tokenIterator->current();

            if ($token[0] === '[' || $token[0] === '(') {
                $openBraces++;
            }

            if ($token[0] === ']' || $token[0] === ')') {
                $openBraces--;
            }

            if (($openBraces === 0 && $token[0] === ',') || ($openBraces === -1 && $token[0] === ')')) {
                break;
            }
        }
    }
@param \Iterator $tokenIterator

@return void