protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $end = \count($tokens) - 3; // min. number of tokens to form a class candidate to fix
        for ($index = 0; $index < $end; ++$index) {
            if (!$tokens[$index]->isGivenKind(T_CLASS)) {
                continue;
            }

            $classOpen = $tokens->getNextTokenOfKind($index, ['{']);
            $classClose = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpen);

            if (!$this->skipClass($tokens, $index, $classOpen, $classClose)) {
                $this->fixClass($tokens, $classOpen, $classClose);
            }

            $index = $classClose;
        }
    }
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $end = \count($tokens) - 3; 
        for ($index = 0; $index < $end; ++$index) {
            if (!$tokens[$index]->isGivenKind(T_CLASS)) {
                continue;
            }

            $classOpen = $tokens->getNextTokenOfKind($index, ['{']);
            $classClose = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpen);

            if (!$this->skipClass($tokens, $index, $classOpen, $classClose)) {
                $this->fixClass($tokens, $classOpen, $classClose);
            }

            $index = $classClose;
        }
    }
protected function applyFix ( \ SplFileInfo $ file , Tokens $ tokens ) { $ end = \ count ( $ tokens ) - 3 ; // min. number of tokens to form a class candidate to fix for ( $ index = 0 ; $ index < $ end ; ++ $ index ) { if ( ! $ tokens [ $ index ] -> isGivenKind ( T_CLASS ) ) { continue ; } $ classOpen = $ tokens -> getNextTokenOfKind ( $ index , [ '{' ] ) ; $ classClose = $ tokens -> findBlockEnd ( Tokens :: BLOCK_TYPE_CURLY_BRACE , $ classOpen ) ; if ( ! $ this -> skipClass ( $ tokens , $ index , $ classOpen , $ classClose ) ) { $ this -> fixClass ( $ tokens , $ classOpen , $ classClose ) ; } $ index = $ classClose ; } }
{@inheritdoc}
{