Passed
Push — master ( c34bce...f6db7f )
by Artem
01:28
created
src/Webhooks/Dispatcher.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,20 +29,20 @@
 block discarded – undo
29 29
      */
30 30
     public function handle(string $key, array $payload)
31 31
     {
32
-        if(!$this->has($key)) {
32
+        if (!$this->has($key)) {
33 33
             throw new WebhookException("Webhook with key \"{$key}\" cannot be found.");
34 34
         }
35 35
 
36 36
         $webhook = $this->instantiate($key);
37 37
 
38
-        if(!$webhook->validate($payload)) {
38
+        if (!$webhook->validate($payload)) {
39 39
             throw new WebhookValidationException($webhook->getValidator());
40 40
         }
41 41
 
42 42
         try {
43 43
             return $webhook->handle($payload);
44 44
         }
45
-        catch(\Exception $e) {
45
+        catch (\Exception $e) {
46 46
             throw new WebhookException(get_class($webhook) . ': ' . $e->getMessage());
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 
42 42
         try {
43 43
             return $webhook->handle($payload);
44
-        }
45
-        catch(\Exception $e) {
44
+        } catch(\Exception $e) {
46 45
             throw new WebhookException(get_class($webhook) . ': ' . $e->getMessage());
47 46
         }
48 47
     }
Please login to merge, or discard this patch.