From cbb562f1053d77fdc02b68c60f19fa0d88e1ba25 Mon Sep 17 00:00:00 2001 From: Jan Klat Date: Mon, 26 Oct 2015 15:03:23 +0100 Subject: [PATCH 1/2] add constants for error messages --- library/ZendService/Google/Gcm/Response.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/library/ZendService/Google/Gcm/Response.php b/library/ZendService/Google/Gcm/Response.php index e1646a4..f20bc42 100644 --- a/library/ZendService/Google/Gcm/Response.php +++ b/library/ZendService/Google/Gcm/Response.php @@ -40,6 +40,24 @@ class Response */ const RESULT_CANONICAL = 'registration_id'; + /** + * Error field responses + * @link https://developers.google.com/cloud-messaging/http-server-ref#error-codes + * @var string + */ + const ERROR_MISSING_REGISTRATION = 'MissingRegistration'; + const ERROR_INVALID_REGISTRATION = 'InvalidRegistration'; + const ERROR_NOT_REGISTERED = 'NotRegistered'; + const ERROR_INVALID_PACKAGE_NAME = 'InvalidPackageName'; + const ERROR_MISMATCH_SENDER_ID = 'MismatchSenderId'; + const ERROR_MESSAGE_TOO_BIG = 'MessageTooBig'; + const ERROR_INVALID_DATA_KEY = 'InvalidDataKey'; + const ERROR_INVALID_TTL = 'InvalidTtl'; + const ERROR_UNAVAILABLE = 'Unavailable'; + const ERROR_INTERNAL_SERVER_ERROR = 'InternalServerError'; + const ERROR_DEVICE_MESSAGE_RATE_EXCEEDED = 'DeviceMessageRateExceeded'; + const ERROR_TOPICS_MESSAGE_RATE_EXCEEDED = 'TopicsMessageRateExceeded'; + /** * @var int */ From cd21402a8b103f43ca6ef62e3cf4fe26be30fa97 Mon Sep 17 00:00:00 2001 From: Jan Klat Date: Mon, 10 Apr 2017 16:45:14 +0200 Subject: [PATCH 2/2] align assignments (CR request) --- library/Gcm/Response.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/Gcm/Response.php b/library/Gcm/Response.php index ec8b3c1..3f3197d 100644 --- a/library/Gcm/Response.php +++ b/library/Gcm/Response.php @@ -42,16 +42,16 @@ class Response * @link https://developers.google.com/cloud-messaging/http-server-ref#error-codes * @var string */ - const ERROR_MISSING_REGISTRATION = 'MissingRegistration'; - const ERROR_INVALID_REGISTRATION = 'InvalidRegistration'; - const ERROR_NOT_REGISTERED = 'NotRegistered'; - const ERROR_INVALID_PACKAGE_NAME = 'InvalidPackageName'; - const ERROR_MISMATCH_SENDER_ID = 'MismatchSenderId'; - const ERROR_MESSAGE_TOO_BIG = 'MessageTooBig'; - const ERROR_INVALID_DATA_KEY = 'InvalidDataKey'; - const ERROR_INVALID_TTL = 'InvalidTtl'; - const ERROR_UNAVAILABLE = 'Unavailable'; - const ERROR_INTERNAL_SERVER_ERROR = 'InternalServerError'; + const ERROR_MISSING_REGISTRATION = 'MissingRegistration'; + const ERROR_INVALID_REGISTRATION = 'InvalidRegistration'; + const ERROR_NOT_REGISTERED = 'NotRegistered'; + const ERROR_INVALID_PACKAGE_NAME = 'InvalidPackageName'; + const ERROR_MISMATCH_SENDER_ID = 'MismatchSenderId'; + const ERROR_MESSAGE_TOO_BIG = 'MessageTooBig'; + const ERROR_INVALID_DATA_KEY = 'InvalidDataKey'; + const ERROR_INVALID_TTL = 'InvalidTtl'; + const ERROR_UNAVAILABLE = 'Unavailable'; + const ERROR_INTERNAL_SERVER_ERROR = 'InternalServerError'; const ERROR_DEVICE_MESSAGE_RATE_EXCEEDED = 'DeviceMessageRateExceeded'; const ERROR_TOPICS_MESSAGE_RATE_EXCEEDED = 'TopicsMessageRateExceeded';