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.
Completed
Push — master ( 4711bc...e39385 )
by Romain
21:15
created
src/Strime/Slackify/Webhooks/Webhook.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
         if (isset($values["link"]) && ($values["link"] !== NULL)) {
97 97
             $values["message"] .= "\n";
98 98
             $values["message"] .= "<" . $values["link"]; 
99
-            if(isset($values["link_text"]) && ($values["link_text"] !== NULL)) {
99
+            if (isset($values["link_text"]) && ($values["link_text"] !== NULL)) {
100 100
                 $values["message"] .= "|" . $values["link_text"];
101 101
             }
102
-            $values["message"] .= ">" ;
102
+            $values["message"] .= ">";
103 103
         }
104 104
 
105 105
         // Set the parameters for the request
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
         try {
142 142
             $client = new \GuzzleHttp\Client();
143 143
             $json_response = $client->request('POST', $this->url, [
144
-                'body' => json_encode( $params )
144
+                'body' => json_encode($params)
145 145
             ]);
146 146
         }
147
-        catch(RequestException $e) {
148
-            throw new RuntimeException('The request to the webhook failed: '.$e->getMessage(), $e->getCode(), $e);
147
+        catch (RequestException $e) {
148
+            throw new RuntimeException('The request to the webhook failed: ' . $e->getMessage(), $e->getCode(), $e);
149 149
         }
150 150
 
151 151
         // We re-initialize the attachments to prevent any conflict with a future message.
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
                 // Create an array with the valid values
176 176
                 $valid_values = explode(",", self::SLACK_VALID_ATTACHMENTS);
177 177
 
178
-                if(!in_array($key, $valid_values)) {
178
+                if (!in_array($key, $valid_values)) {
179 179
                     unset($attachment[$key]);
180 180
                 }
181 181
             }
182 182
 
183 183
             // Check if a message has been defined
184
-            if(!isset($attachment["fallback"], $attachment["fields"], $attachment["fields"]["title"])) {
184
+            if (!isset($attachment["fallback"], $attachment["fields"], $attachment["fields"]["title"])) {
185 185
                 throw new InvalidArgumentException("Attachment fields are missing.");
186 186
             }
187 187
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,8 +162,7 @@
 block discarded – undo
162 162
      * @param  array $attachments
163 163
      * @return Webhook
164 164
      */
165
-    public function setAttachments($attachments)
166
-    {
165
+    public function setAttachments($attachments) {
167 166
         if (!is_array($attachments)) {
168 167
             throw new InvalidArgumentException('The attachments must be an array.');
169 168
         }
Please login to merge, or discard this patch.