Passed
Push — master ( 60a913...f69939 )
by Sreedev
02:21
created
src/Api/Api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $this->Slack = $Slack;
39 39
         $this->setfunctionSet($functionSet);
40
-        $json = file_get_contents(__DIR__. '/Slack.json');
40
+        $json = file_get_contents(__DIR__.'/Slack.json');
41 41
         $this->endPoints = json_decode($json, true);
42 42
         return $this->sendRequest($method, $data);
43 43
     }
Please login to merge, or discard this patch.
src/Slack.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@
 block discarded – undo
62 62
     }
63 63
    
64 64
 
65
-     /**
66
-     * Performs the underlying HTTP request. Not very exciting.
67
-     *
68
-     * @param  string $http_verb The HTTP verb to use: get, post, put, patch, delete
69
-     * @param  string $method    The API method to be called
70
-     * @param  array  $args      Assoc array of parameters to be passed
71
-     * @param int     $timeout
72
-     *
73
-     * @return array|false Assoc array of decoded result
74
-     */
65
+        /**
66
+         * Performs the underlying HTTP request. Not very exciting.
67
+         *
68
+         * @param  string $http_verb The HTTP verb to use: get, post, put, patch, delete
69
+         * @param  string $method    The API method to be called
70
+         * @param  array  $args      Assoc array of parameters to be passed
71
+         * @param int     $timeout
72
+         *
73
+         * @return array|false Assoc array of decoded result
74
+         */
75 75
     public function makeRequest($http_verb, $method, $args = array(), $timeout = self::TIMEOUT)
76 76
     {
77 77
         if( $this->api_token == '')
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,22 +74,22 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function makeRequest($http_verb, $method, $args = array(), $timeout = self::TIMEOUT)
76 76
     {
77
-        if( $this->api_token == '')
77
+        if ($this->api_token == '')
78 78
         {
79 79
             throw new Exception('\Exception');
80 80
         }
81
-        $url = $this->api_endpoint . '/' . $method;
81
+        $url = $this->api_endpoint.'/'.$method;
82 82
 
83 83
         $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout);
84 84
 
85 85
         $httpHeader = array(
86 86
             'Content-type: application/json',
87
-            'Authorization: Bearer '. $this->api_token
87
+            'Authorization: Bearer '.$this->api_token
88 88
         );
89 89
 
90 90
 
91 91
         if (isset($args["language"])) {
92
-            $httpHeader[] = "Accept-Language: " . $args["language"];
92
+            $httpHeader[] = "Accept-Language: ".$args["language"];
93 93
         }
94 94
 
95 95
         if ($http_verb === 'put') {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
             case 'GET':
118 118
                 $query = http_build_query($args, '', '&');
119
-                curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
119
+                curl_setopt($ch, CURLOPT_URL, $url.'?'.$query);
120 120
                 break;
121 121
 
122 122
             case 'DELETE':
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
     private function findHTTPStatus($response, $formattedResponse)
346 346
     {
347 347
         if (!empty($response['headers']) && isset($response['headers']['http_code'])) {
348
-            return (int)$response['headers']['http_code'];
348
+            return (int) $response['headers']['http_code'];
349 349
         }
350 350
 
351 351
         if (!empty($response['body']) && isset($formattedResponse['status'])) {
352
-            return (int)$formattedResponse['status'];
352
+            return (int) $formattedResponse['status'];
353 353
         }
354 354
 
355 355
         return 418;
Please login to merge, or discard this patch.