src/Tokenizer/Transformer/ClassConstantTransformer.php
public function process(Tokens $tokens, Token $token, $index)
    {
        if (!$token->equalsAny([
            [T_CLASS, 'class'],
            [T_STRING, 'class'],
        ], false)) {
            return;
        }

        $prevIndex = $tokens->getPrevMeaningfulToken($index);
        $prevToken = $tokens[$prevIndex];

        if ($prevToken->isGivenKind(T_DOUBLE_COLON)) {
            $tokens[$index] = new Token([CT::T_CLASS_CONSTANT, $token->getContent()]);
        }
    }
public function process(Tokens $tokens, Token $token, $index)
    {
        if (!$token->equalsAny([
            [T_CLASS, 'class'],
            [T_STRING, 'class'],
        ], false)) {
            return;
        }

        $prevIndex = $tokens->getPrevMeaningfulToken($index);
        $prevToken = $tokens[$prevIndex];

        if ($prevToken->isGivenKind(T_DOUBLE_COLON)) {
            $tokens[$index] = new Token([CT::T_CLASS_CONSTANT, $token->getContent()]);
        }
    }
public function process ( Tokens $ tokens , Token $ token , $ index ) { if ( ! $ token -> equalsAny ( [ [ T_CLASS , 'class' ] , [ T_STRING , 'class' ] , ] , false ) ) { return ; } $ prevIndex = $ tokens -> getPrevMeaningfulToken ( $ index ) ; $ prevToken = $ tokens [ $ prevIndex ] ; if ( $ prevToken -> isGivenKind ( T_DOUBLE_COLON ) ) { $ tokens [ $ index ] = new Token ( [ CT :: T_CLASS_CONSTANT , $ token -> getContent ( ) ] ) ; } }
{@inheritdoc}
{