src/Tokenizer/Transformer/ArrayTypehintTransformer.php
public function process(Tokens $tokens, Token $token, $index)
    {
        if (!$token->isGivenKind(T_ARRAY)) {
            return;
        }

        $nextIndex = $tokens->getNextMeaningfulToken($index);
        $nextToken = $tokens[$nextIndex];

        if (!$nextToken->equals('(')) {
            $tokens[$index] = new Token([CT::T_ARRAY_TYPEHINT, $token->getContent()]);
        }
    }
public function process(Tokens $tokens, Token $token, $index)
    {
        if (!$token->isGivenKind(T_ARRAY)) {
            return;
        }

        $nextIndex = $tokens->getNextMeaningfulToken($index);
        $nextToken = $tokens[$nextIndex];

        if (!$nextToken->equals('(')) {
            $tokens[$index] = new Token([CT::T_ARRAY_TYPEHINT, $token->getContent()]);
        }
    }
public function process ( Tokens $ tokens , Token $ token , $ index ) { if ( ! $ token -> isGivenKind ( T_ARRAY ) ) { return ; } $ nextIndex = $ tokens -> getNextMeaningfulToken ( $ index ) ; $ nextToken = $ tokens [ $ nextIndex ] ; if ( ! $ nextToken -> equals ( '(' ) ) { $ tokens [ $ index ] = new Token ( [ CT :: T_ARRAY_TYPEHINT , $ token -> getContent ( ) ] ) ; } }
{@inheritdoc}
{