Passed
Push — master ( 60a913...f69939 )
by Sreedev
02:21
created
src/Api/Chat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * @param  mixed $Slack
14 14
      * @return void
15 15
      */
16
-    public function __construct( \Sreedev\Slack\Slack $Slack, $method, $data)
16
+    public function __construct(\Sreedev\Slack\Slack $Slack, $method, $data)
17 17
     {
18 18
         parent::__construct($Slack, $method, $data, $this->functionSet);
19 19
     }   
Please login to merge, or discard this patch.
src/SlackServiceProvider.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@
 block discarded – undo
16 16
         /**
17 17
          * Export the config file 
18 18
          * php artisan vendor:publish --provider="Sreedev\Slack\SlackServiceProvider" --tag="config"
19
-        **/
19
+         **/
20 20
         if ($this->app->runningInConsole()) {
21 21
 
22 22
             $this->publishes([
23
-              __DIR__.'/../config/config.php' => config_path('slack.php'),
23
+                __DIR__.'/../config/config.php' => config_path('slack.php'),
24 24
             ], 'config');
25 25
         
26
-          }
26
+            }
27 27
     }
28 28
     
29 29
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function register()
35 35
     {
36
-        $this->app->singleton('slack', function($app){
36
+        $this->app->singleton('slack', function($app) {
37 37
             return new Slack(config("slack.SLACK_API_TOKEN"));
38 38
         });
39 39
         $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'slack'); 
Please login to merge, or discard this patch.
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.