GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( a2e6f2...3aefac )
by Toby
08:48
created
app/Typeform/Client.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
     public function webhookExists(Webhook $webhook)
23 23
     {
24 24
         try {
25
-            $this->connector->request('GET', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag);
25
+            $this->connector->request('GET', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag);
26 26
             return true;
27 27
         } catch (ClientException $e) {
28
-            if($e->getCode() === 404){
28
+            if ($e->getCode() === 404) {
29 29
                 return false;
30 30
             }
31 31
             throw $e;
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function webhookEnabled(Webhook $webhook)
36 36
     {
37
-        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag);
37
+        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag);
38 38
         $response = json_decode((string) $response->getBody(), true);
39
-        return (isset($response['enabled'])?$response['enabled']:false);
39
+        return (isset($response['enabled']) ? $response['enabled'] : false);
40 40
     }
41 41
 
42 42
     public function webhookCreate(Webhook $webhook)
43 43
     {
44
-        $this->connector->request('PUT', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag, [
44
+        $this->connector->request('PUT', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag, [
45 45
             'json' => [
46 46
                 'url' => $webhook->url(),
47 47
                 'enabled' => true
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function webhookDelete(Webhook $webhook)
53 53
     {
54
-        $this->connector->request('DELETE', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag);
54
+        $this->connector->request('DELETE', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag);
55 55
     }
56 56
 
57 57
     public function webhookEnable(Webhook $webhook)
58 58
     {
59 59
         try {
60
-            $this->connector->request('PUT', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag, [
60
+            $this->connector->request('PUT', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag, [
61 61
                 'json' => [
62 62
                     'enabled' => true
63 63
                 ]
64 64
             ]);
65 65
         } catch (ClientException $e) {
66
-            if($e->getCode() !== 504 && $e->getCode() !== 502) {
66
+            if ($e->getCode() !== 504 && $e->getCode() !== 502) {
67 67
                 throw $e;
68 68
             }
69 69
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function webhookDisable(Webhook $webhook)
73 73
     {
74
-        $this->connector->request('PUT', 'https://api.typeform.com/forms/'. $webhook->form_id .'/webhooks/' . $webhook->tag, [
74
+        $this->connector->request('PUT', 'https://api.typeform.com/forms/'.$webhook->form_id.'/webhooks/'.$webhook->tag, [
75 75
             'json' => [
76 76
                 'enabled' => false
77 77
             ]
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function allResponses(string $formId)
82 82
     {
83
-        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'.  $formId .'/responses', [
83
+        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'.$formId.'/responses', [
84 84
             'query' => [
85 85
                 'page_size' => 1000
86 86
             ]
87 87
         ]);
88 88
         $responses = json_decode((string) $response->getBody(), true);
89
-        if($responses && array_key_exists('items', $responses)) {
89
+        if ($responses && array_key_exists('items', $responses)) {
90 90
             return $responses['items'];
91 91
         }
92 92
         return [];
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 
95 95
     public function allFields(string $formId)
96 96
     {
97
-        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'.  $formId);
97
+        $response = $this->connector->request('GET', 'https://api.typeform.com/forms/'.$formId);
98 98
         $responses = json_decode((string) $response->getBody(), true);
99
-        if($responses && array_key_exists('fields', $responses)) {
99
+        if ($responses && array_key_exists('fields', $responses)) {
100 100
             return $responses['fields'];
101 101
         }
102 102
         return [];
Please login to merge, or discard this patch.