public function getReceiver(TwitterOAuth $twitter)
    {
        if (is_int($this->to)) {
            return $this->to;
        }

        $user = $twitter->get('users/show', [
            'screen_name' => $this->to,
            'include_user_entities' => false,
            'skip_status' => true,
        ]);

        if ($twitter->getLastHttpCode() === 404) {
            throw CouldNotSendNotification::userWasNotFound($twitter->getLastBody());
        }

        return $user->id;
    }
public function getReceiver(TwitterOAuth $twitter)
    {
        if (is_int($this->to)) {
            return $this->to;
        }

        $user = $twitter->get('users/show', [
            'screen_name' => $this->to,
            'include_user_entities' => false,
            'skip_status' => true,
        ]);

        if ($twitter->getLastHttpCode() === 404) {
            throw CouldNotSendNotification::userWasNotFound($twitter->getLastBody());
        }

        return $user->id;
    }
public function getReceiver ( TwitterOAuth $ twitter ) { if ( is_int ( $ this -> to ) ) { return $ this -> to ; } $ user = $ twitter -> get ( 'users/show' , [ 'screen_name' => $ this -> to , 'include_user_entities' => false , 'skip_status' => true , ] ) ; if ( $ twitter -> getLastHttpCode ( ) === 404 ) { throw CouldNotSendNotification :: userWasNotFound ( $ twitter -> getLastBody ( ) ) ; } return $ user -> id ; }
Get Twitter direct message receiver.

@param TwitterOAuth $twitter
@return  string
@throws CouldNotSendNotification
Get Twitter direct message receiver .