File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 */
1111class Webhook
1212{
13- private static $ eventSubscriptions = [] ;
13+ private static $ eventSubscriptions = array () ;
1414 private static $ receivedWebhook = false ;
1515
1616 /**
@@ -21,7 +21,7 @@ class Webhook
2121 */
2222 public static function subscribe ($ event , callable $ callback )
2323 {
24- if (!isset (self ::$ eventSubscriptions [$ event ])) self ::$ eventSubscriptions [$ event ] = [] ;
24+ if (!isset (self ::$ eventSubscriptions [$ event ])) self ::$ eventSubscriptions [$ event ] = array () ;
2525 self ::$ eventSubscriptions [$ event ][] = $ callback ;
2626
2727 self ::receive ();
@@ -81,7 +81,7 @@ private static function dispatchWebhookEvent($event, $data)
8181 $ callback ($ data );
8282 }
8383 // reset subscriptions
84- self ::$ eventSubscriptions [$ event ] = [] ;
84+ self ::$ eventSubscriptions [$ event ] = array () ;
8585 }
8686 }
8787}
You can’t perform that action at this time.
0 commit comments