src/Standards/BestIt/Sniffs/DocTags/ParamTagSniff.php
private function loadAndCheckVarPositions(): array
    {
        $varPositions = $this->findAllVariablePositions();

        if (!$varPositions) {
            throw (new CodeError(
                static::CODE_TAG_MISSING_VARIABLES,
                self::MESSAGE_TAG_MISSING_VARIABLES,
                $this->stackPos
            ))->setToken($this->token);
        }

        $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool {
            return in_array($token['pointer'], $varPositions, true);
        });

        return $varPositions;
    }
private function loadAndCheckVarPositions(): array
    {
        $varPositions = $this->findAllVariablePositions();

        if (!$varPositions) {
            throw (new CodeError(
                static::CODE_TAG_MISSING_VARIABLES,
                self::MESSAGE_TAG_MISSING_VARIABLES,
                $this->stackPos
            ))->setToken($this->token);
        }

        $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool {
            return in_array($token['pointer'], $varPositions, true);
        });

        return $varPositions;
    }
private function loadAndCheckVarPositions ( ) : array { $ varPositions = $ this -> findAllVariablePositions ( ) ; if ( ! $ varPositions ) { throw ( new CodeError ( static :: CODE_TAG_MISSING_VARIABLES , self :: MESSAGE_TAG_MISSING_VARIABLES , $ this -> stackPos ) ) -> setToken ( $ this -> token ) ; } $ this -> varTokens = array_filter ( $ this -> tokens , function ( array $ token ) use ( $ varPositions ) : bool { return in_array ( $ token [ 'pointer' ] , $ varPositions , true ) ; } ) ; return $ varPositions ; }
Loads and checks the variables of the following method.

@throws CodeWarning We have param tags, so there should be variables in the method.

@return array The positions of the methods variables if there are any.
Loads and checks the variables of the following method .