src/TwitterDriver.php
public function getUser(IncomingMessage $matchingMessage)
    {
        $sender_id = $matchingMessage->getRecipient();

        $user = Collection::make($this->payload->get('users'))->first(function ($user) use ($sender_id) {
            return $user['id'] === $sender_id;
        });

        return new User($user['id'], null, null, $user['name'], $user);
    }
public function getUser(IncomingMessage $matchingMessage)
    {
        $sender_id = $matchingMessage->getRecipient();

        $user = Collection::make($this->payload->get('users'))->first(function ($user) use ($sender_id) {
            return $user['id'] === $sender_id;
        });

        return new User($user['id'], null, null, $user['name'], $user);
    }
public function getUser ( IncomingMessage $ matchingMessage ) { $ sender_id = $ matchingMessage -> getRecipient ( ) ; $ user = Collection :: make ( $ this -> payload -> get ( 'users' ) ) -> first ( function ( $ user ) use ( $ sender_id ) { return $ user [ 'id' ] === $ sender_id ; } ) ; return new User ( $ user [ 'id' ] , null , null , $ user [ 'name' ] , $ user ) ; }
Retrieve User information.
@param \BotMan\BotMan\Messages\Incoming\IncomingMessage $matchingMessage
@return User
Retrieve User information .