src/TokenAwareTrait.php
protected function _setToken($token)
    {
        if ($token !== null && !($token instanceof TokenInterface)) {
            throw $this->_createInvalidArgumentException($this->__('Invalid token'), null, null, $token);
        }

        $this->token = $token;
    }
protected function _setToken($token)
    {
        if ($token !== null && !($token instanceof TokenInterface)) {
            throw $this->_createInvalidArgumentException($this->__('Invalid token'), null, null, $token);
        }

        $this->token = $token;
    }
protected function _setToken ( $ token ) { if ( $ token !== null && ! ( $ token instanceof TokenInterface ) ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Invalid token' ) , null , null , $ token ) ; } $ this -> token = $ token ; }
Assigns a token to this instance.

@since [*next-version*]

@param TokenInterface|null $token The token.
Assigns a token to this instance .