@@ -60,7 +60,7 @@ class Pusher implements LoggerAwareInterface, PusherInterface
6060 *
6161 * @throws PusherException Throws exception if any required dependencies are missing
6262 */
63- public function __construct (string $ auth_key , string $ secret , string $ app_id , array $ options = [], ClientInterface $ client = null )
63+ public function __construct (string $ auth_key , string $ secret , string $ app_id , array $ options = [], ? ClientInterface $ client = null )
6464 {
6565 $ this ->check_compatibility ();
6666
@@ -287,7 +287,7 @@ public static function build_auth_query_params(
287287 string $ request_path ,
288288 array $ query_params = [],
289289 string $ auth_version = '1.0 ' ,
290- string $ auth_timestamp = null
290+ ? string $ auth_timestamp = null
291291 ): array {
292292 $ params = [];
293293 $ params ['auth_key ' ] = $ auth_key ;
@@ -884,7 +884,7 @@ public function authenticateUser(string $socket_id, array $user_data): string
884884 * @return string Json encoded authentication string.
885885 * @throws PusherException Throws exception if $channel is invalid or above or $socket_id is invalid
886886 */
887- public function authorizeChannel (string $ channel , string $ socket_id , string $ custom_data = null ): string
887+ public function authorizeChannel (string $ channel , string $ socket_id , ? string $ custom_data = null ): string
888888 {
889889 $ this ->validate_channel ($ channel );
890890 $ this ->validate_socket_id ($ socket_id );
@@ -949,15 +949,15 @@ public function authorizePresenceChannel(string $channel, string $socket_id, str
949949 /**
950950 * @deprecated in favour of authorizeChannel
951951 */
952- public function socketAuth (string $ channel , string $ socket_id , string $ custom_data = null ): string
952+ public function socketAuth (string $ channel , string $ socket_id , ? string $ custom_data = null ): string
953953 {
954954 return $ this ->authorizeChannel ($ channel , $ socket_id , $ custom_data );
955955 }
956956
957957 /**
958958 * @deprecated in favour of authorizeChannel
959959 */
960- public function socket_auth (string $ channel , string $ socket_id , string $ custom_data = null ): string
960+ public function socket_auth (string $ channel , string $ socket_id , ? string $ custom_data = null ): string
961961 {
962962 return $ this ->authorizeChannel ($ channel , $ socket_id , $ custom_data );
963963 }
0 commit comments