Skip to content

Commit

Permalink
PHP 5.3 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
drewm committed Apr 23, 2016
1 parent a09f814 commit 0553b8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class Webhook
{
private static $eventSubscriptions = [];
private static $eventSubscriptions = array();
private static $receivedWebhook = false;

/**
Expand All @@ -21,7 +21,7 @@ class Webhook
*/
public static function subscribe($event, callable $callback)
{
if (!isset(self::$eventSubscriptions[$event])) self::$eventSubscriptions[$event] = [];
if (!isset(self::$eventSubscriptions[$event])) self::$eventSubscriptions[$event] = array();
self::$eventSubscriptions[$event][] = $callback;

self::receive();
Expand Down Expand Up @@ -81,7 +81,7 @@ private static function dispatchWebhookEvent($event, $data)
$callback($data);
}
// reset subscriptions
self::$eventSubscriptions[$event] = [];
self::$eventSubscriptions[$event] = array();
}
}
}

0 comments on commit 0553b8a

Please sign in to comment.