zendframework/ZendService_Google_Gcm — pull request #5 by phindmarsh (2014-06-12 23:32:28+00:00)
Title: Fixed string interpolation and array key checks

String interpolation only works with double quoted strings and the exception messages have variables included, but are single quoted. This caused exception messages like `$key must be a non-empty string`.

`in_array` in the `addData` method should be `array_key_exists`, since the purpose of the method is to ensure existing `$this->data` keys are not overwritten. `in_array` checks if a value is present in an array, not a key.

Also, using `in_array` without strict checking can cause some unpredictable results (see [docs](http://us1.php.net//manual/en/function.in-array.php#106319)). In this case, I think it is better to use the strict flag in the `addRegistrationId` method.