@@ -14,7 +14,7 @@ class Pusher implements LoggerAwareInterface, PusherInterface
1414 /**
1515 * @var string Version
1616 */
17- public static $ VERSION = '6.0.0 ' ;
17+ public static $ VERSION = '6.0.1 ' ;
1818
1919 /**
2020 * @var null|PusherCrypto
@@ -337,10 +337,10 @@ public static function array_implode($glue, $separator, $array)
337337 *
338338 * @throws PusherException Throws PusherException if $channels is an array of size 101 or above or $socket_id is invalid
339339 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
340+ * @throws GuzzleException
340341 *
341- * @return object
342342 */
343- public function trigger ($ channels , $ event , $ data , $ params = array (), $ already_encoded = false )
343+ public function trigger ($ channels , $ event , $ data , $ params = array (), $ already_encoded = false ) : object
344344 {
345345 if (is_string ($ channels ) === true ) {
346346 $ channels = array ($ channels );
@@ -431,10 +431,10 @@ public function trigger($channels, $event, $data, $params = array(), $already_en
431431 * @param bool $already_encoded [optional]
432432 *
433433 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
434+ * @throws GuzzleException
434435 *
435- * @return object
436436 */
437- public function triggerBatch ($ batch = array (), $ already_encoded = false )
437+ public function triggerBatch ($ batch = array (), $ already_encoded = false ) : object
438438 {
439439 foreach ($ batch as $ key => $ event ) {
440440 $ this ->validate_channel ($ event ['channel ' ]);
@@ -497,10 +497,10 @@ public function triggerBatch($batch = array(), $already_encoded = false)
497497 *
498498 * @throws PusherException If $channel is invalid
499499 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
500+ * @throws GuzzleException
500501 *
501- * @return object
502502 */
503- public function get_channel_info ($ channel , $ params = array ())
503+ public function get_channel_info ($ channel , $ params = array ()) : object
504504 {
505505 $ this ->validate_channel ($ channel );
506506
@@ -513,10 +513,10 @@ public function get_channel_info($channel, $params = array())
513513 * @param array $params Additional parameters for the query e.g. $params = array( 'info' => 'connection_count' )
514514 *
515515 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
516+ * @throws GuzzleException
516517 *
517- * @return object
518518 */
519- public function get_channels ($ params = array ())
519+ public function get_channels ($ params = array ()) : object
520520 {
521521 $ result = $ this ->get ('/channels ' , $ params );
522522
@@ -531,10 +531,10 @@ public function get_channels($params = array())
531531 * @param string $channel The name of the channel
532532 *
533533 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
534+ * @throws GuzzleException
534535 *
535- * @return object
536536 */
537- public function get_users_info ($ channel )
537+ public function get_users_info ($ channel ) : object
538538 {
539539 return $ this ->get ('/channels/ ' .$ channel .'/users ' );
540540 }
@@ -548,6 +548,7 @@ public function get_users_info($channel)
548548 * @param bool $associative When true, return the response body as an associative array, else return as an object
549549 *
550550 * @throws ApiErrorException Throws ApiErrorException if the Channels HTTP API responds with an error
551+ * @throws GuzzleException
551552 *
552553 * @return mixed See Pusher API docs
553554 */
@@ -590,7 +591,7 @@ public function get($path, $params = array(), $associative = false)
590591 *
591592 * @return string Json encoded authentication string.
592593 */
593- public function socket_auth ($ channel , $ socket_id , $ custom_data = null )
594+ public function socket_auth ($ channel , $ socket_id , $ custom_data = null ) : string
594595 {
595596 $ this ->validate_channel ($ channel );
596597 $ this ->validate_socket_id ($ socket_id );
@@ -628,9 +629,8 @@ public function socket_auth($channel, $socket_id, $custom_data = null)
628629 *
629630 * @throws PusherException Throws exception if $channel is invalid or above or $socket_id is invalid
630631 *
631- * @return string
632632 */
633- public function presence_auth ($ channel , $ socket_id , $ user_id , $ user_info = null )
633+ public function presence_auth ($ channel , $ socket_id , $ user_id , $ user_info = null ) : string
634634 {
635635 $ user_data = array ('user_id ' => $ user_id );
636636 if ($ user_info ) {
@@ -650,7 +650,7 @@ public function presence_auth($channel, $socket_id, $user_id, $user_info = null)
650650 *
651651 * @return Webhook marshalled object with the properties time_ms (an int) and events (an array of event objects)
652652 */
653- public function webhook ($ headers , $ body )
653+ public function webhook ($ headers , $ body ) : object
654654 {
655655 $ this ->ensure_valid_signature ($ headers , $ body );
656656
0 commit comments