public function findTokenByParams($userId, $code, $type)
    {
        return $this->findToken([
            'user_id' => $userId,
            'code'    => $code,
            'type'    => $type,
        ])->one();
    }
public function findTokenByParams($userId, $code, $type)
    {
        return $this->findToken([
            'user_id' => $userId,
            'code'    => $code,
            'type'    => $type,
        ])->one();
    }
public function findTokenByParams ( $ userId , $ code , $ type ) { return $ this -> findToken ( [ 'user_id' => $ userId , 'code' => $ code , 'type' => $ type , ] ) -> one ( ) ; }
Finds a token by params.

@param integer $userId
@param string  $code
@param integer $type

@return Token
Finds a token by params .