Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHS1b3 New push.admin.device_registrations.save #65

Merged
merged 2 commits into from
Feb 7, 2019
Merged

RHS1b3 New push.admin.device_registrations.save #65

merged 2 commits into from
Feb 7, 2019

Conversation

jdavid
Copy link
Contributor

@jdavid jdavid commented Feb 6, 2019

RHS1b3 New push.admin.device_registrations.save

Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good but please see comments.


class DeviceDetails extends BaseOptions {

const DevicePushTransportType = ['fcm', 'gcm', 'apns', 'web'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've tended not to include this kind of validation check in the library, because then if we do add support for new types it's not possible to access that functionality without having a new library. I think it's best that the backend performs this validation.

/**
* @var string
*/
public $metadata;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the IDL this is declared to be of type JsonObject

/**
* @var string
*/
public $push;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the IDL this is declared to be of type DevicePushDetails


if ($this->platform && ! in_array($this->platform, self::DevicePlatform)) {
throw new \InvalidArgumentException(
sprintf('unexpected form factor %s', $this->platform)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/form factor/platform, but I guess this code is being removed anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, could you check?

Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@jdavid jdavid merged commit cc34dac into push Feb 7, 2019
@jdavid jdavid deleted the RHS1b3 branch February 7, 2019 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants