@@ -465,24 +465,28 @@ public function deleteEndpoint($deviceArn) {
465465
466466 return true ;
467467 }
468-
469- /**
470- * Push a message to an Endpoint
471- *
472- * @link http://docs.amazonwebservices.com/sns/latest/api/API_Publish.html
473- * @param string $deviceArn
474- * @param string $message
475- * @return string
476- * @throws InvalidArgumentException
477- */
478- public function pushToEndpoint ($ deviceArn , $ message ) {
479- if (empty ($ deviceArn ) || empty ($ message )) {
480- throw new InvalidArgumentException ('Must supply DeviceArn and Message ' );
481- }
482- $ params = array ('TargetArn ' => $ deviceArn , 'Message ' => $ message );
483- $ resultXml = $ this -> _request ('Publish ' , $ params );
484- return strval ($ resultXml -> PublishResult -> MessageId );
485- }
468+
469+ /**
470+ * Push a message to an Endpoint
471+ *
472+ * @link http://docs.amazonwebservices.com/sns/latest/api/API_Publish.html
473+ * @param string $deviceArn
474+ * @param string $message
475+ * @return string
476+ * @throws InvalidArgumentException
477+ */
478+ public function pushToEndpoint ($ deviceArn , $ message ) {
479+ if (empty ($ deviceArn ) || empty ($ message )) {
480+ throw new InvalidArgumentException ('Must supply DeviceArn and Message ' );
481+ }
482+
483+ $ resultXml = $ this ->_request ('Publish ' , array (
484+ 'TargetArn ' => $ deviceArn ,
485+ 'Message ' => $ message )
486+ );
487+
488+ return strval ($ resultXml ->PublishResult ->MessageId );
489+ }
486490
487491 //
488492 // Private functions
0 commit comments