src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $tokensCount = \count($tokens);
        for ($index = 0; $index < $tokensCount; ++$index) {
            if (!$tokens[$index]->isGivenKind(T_CLASS)) {
                continue;
            }

            $classOpen = $tokens->getNextTokenOfKind($index, ['{']);
            $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
            $classIsFinal = $prevToken->isGivenKind(T_FINAL);

            $this->fixClass($tokens, $classOpen, $classIsFinal);
        }
    }
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
    {
        $tokensCount = \count($tokens);
        for ($index = 0; $index < $tokensCount; ++$index) {
            if (!$tokens[$index]->isGivenKind(T_CLASS)) {
                continue;
            }

            $classOpen = $tokens->getNextTokenOfKind($index, ['{']);
            $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
            $classIsFinal = $prevToken->isGivenKind(T_FINAL);

            $this->fixClass($tokens, $classOpen, $classIsFinal);
        }
    }
{@inheritdoc}