src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php
private function getUnsetsInfo(Tokens $tokens, $index)
    {
        $argumentsAnalyzer = new ArgumentsAnalyzer();

        $unsetStart = $tokens->getNextTokenOfKind($index, ['(']);
        $unsetEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $unsetStart);
        $isFirst = true;

        $unsets = [];
        foreach ($argumentsAnalyzer->getArguments($tokens, $unsetStart, $unsetEnd) as $startIndex => $endIndex) {
            $startIndex = $tokens->getNextMeaningfulToken($startIndex - 1);
            $endIndex = $tokens->getPrevMeaningfulToken($endIndex + 1);
            $unsets[] = [
                'startIndex' => $startIndex,
                'endIndex' => $endIndex,
                'isToTransform' => $this->isProperty($tokens, $startIndex, $endIndex),
                'isFirst' => $isFirst,
            ];
            $isFirst = false;
        }

        return $unsets;
    }
private function getUnsetsInfo(Tokens $tokens, $index)
    {
        $argumentsAnalyzer = new ArgumentsAnalyzer();

        $unsetStart = $tokens->getNextTokenOfKind($index, ['(']);
        $unsetEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $unsetStart);
        $isFirst = true;

        $unsets = [];
        foreach ($argumentsAnalyzer->getArguments($tokens, $unsetStart, $unsetEnd) as $startIndex => $endIndex) {
            $startIndex = $tokens->getNextMeaningfulToken($startIndex - 1);
            $endIndex = $tokens->getPrevMeaningfulToken($endIndex + 1);
            $unsets[] = [
                'startIndex' => $startIndex,
                'endIndex' => $endIndex,
                'isToTransform' => $this->isProperty($tokens, $startIndex, $endIndex),
                'isFirst' => $isFirst,
            ];
            $isFirst = false;
        }

        return $unsets;
    }
private function getUnsetsInfo ( Tokens $ tokens , $ index ) { $ argumentsAnalyzer = new ArgumentsAnalyzer ( ) ; $ unsetStart = $ tokens -> getNextTokenOfKind ( $ index , [ '(' ] ) ; $ unsetEnd = $ tokens -> findBlockEnd ( Tokens :: BLOCK_TYPE_PARENTHESIS_BRACE , $ unsetStart ) ; $ isFirst = true ; $ unsets = [ ] ; foreach ( $ argumentsAnalyzer -> getArguments ( $ tokens , $ unsetStart , $ unsetEnd ) as $ startIndex => $ endIndex ) { $ startIndex = $ tokens -> getNextMeaningfulToken ( $ startIndex - 1 ) ; $ endIndex = $ tokens -> getPrevMeaningfulToken ( $ endIndex + 1 ) ; $ unsets [ ] = [ 'startIndex' => $ startIndex , 'endIndex' => $ endIndex , 'isToTransform' => $ this -> isProperty ( $ tokens , $ startIndex , $ endIndex ) , 'isFirst' => $ isFirst , ] ; $ isFirst = false ; } return $ unsets ; }
@param Tokens $tokens
@param int    $index

@return array<array<string, bool|int>>
@param Tokens $tokens @param int $index