Passed
Push — master ( 34097c...d55670 )
by pooya
02:44
created
src/BinanceAPI.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -102,14 +102,16 @@  discard block
 block discarded – undo
102 102
 
103 103
         //Get result
104 104
         $result = curl_exec($this->curl);
105
-        if ($result === false)
106
-            throw new Exception('CURL error: ' . curl_error($this->curl));
105
+        if ($result === false) {
106
+                    throw new Exception('CURL error: ' . curl_error($this->curl));
107
+        }
107 108
 
108 109
         // decode results
109 110
         $result = json_decode($result, true);
110 111
 
111
-        if (!is_array($result) || json_last_error())
112
-            throw new Exception('JSON decode error');
112
+        if (!is_array($result) || json_last_error()) {
113
+                    throw new Exception('JSON decode error');
114
+        }
113 115
 
114 116
         return $result;
115 117
 
@@ -230,13 +232,15 @@  discard block
 block discarded – undo
230 232
 
231 233
         //Get result
232 234
         $result = curl_exec($this->curl);
233
-        if ($result === false)
234
-            throw new Exception('CURL error: ' . curl_error($this->curl));
235
+        if ($result === false) {
236
+                    throw new Exception('CURL error: ' . curl_error($this->curl));
237
+        }
235 238
 
236 239
         // decode results
237 240
         $result = json_decode($result, true);
238
-        if (!is_array($result) || json_last_error())
239
-            throw new Exception('JSON decode error');
241
+        if (!is_array($result) || json_last_error()) {
242
+                    throw new Exception('JSON decode error');
243
+        }
240 244
 
241 245
         return $result;
242 246
 
@@ -414,13 +418,15 @@  discard block
 block discarded – undo
414 418
 
415 419
         //Get result
416 420
         $result = curl_exec($this->curl);
417
-        if ($result === false)
418
-            throw new Exception('CURL error: ' . curl_error($this->curl));
421
+        if ($result === false) {
422
+                    throw new Exception('CURL error: ' . curl_error($this->curl));
423
+        }
419 424
 
420 425
         // decode results
421 426
         $result = json_decode($result, true);
422
-        if (!is_array($result) || json_last_error())
423
-            throw new Exception('JSON decode error');
427
+        if (!is_array($result) || json_last_error()) {
428
+                    throw new Exception('JSON decode error');
429
+        }
424 430
 
425 431
         return $result;
426 432
 
Please login to merge, or discard this patch.
src/BinanceAPIFacade.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 
7 7
 class BinanceAPIFacade extends Facade {
8 8
 
9
-	protected static function getFacadeAccessor() {
10
-		return 'binance';
11
-	}
9
+    protected static function getFacadeAccessor() {
10
+        return 'binance';
11
+    }
12 12
 
13 13
 }
Please login to merge, or discard this patch.
src/BinanceServiceProvider.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
 
7 7
 class BinanceServiceProvider extends ServiceProvider {
8 8
 
9
-	public function boot()
10
-	{
11
-		$this->publishes([
12
-			__DIR__.'/../config/binance.php' => config_path('binance.php')
13
-		]);
14
-	}
9
+    public function boot()
10
+    {
11
+        $this->publishes([
12
+            __DIR__.'/../config/binance.php' => config_path('binance.php')
13
+        ]);
14
+    }
15 15
 
16
-	public function register()
17
-	{
18
-		$this->mergeConfigFrom(__DIR__.'/../config/binance.php', 'binance');
19
-		$this->app->bind('binance', function() {
20
-			return new BinanceAPI(config('binance'));
21
-		});
22
-	}
16
+    public function register()
17
+    {
18
+        $this->mergeConfigFrom(__DIR__.'/../config/binance.php', 'binance');
19
+        $this->app->bind('binance', function() {
20
+            return new BinanceAPI(config('binance'));
21
+        });
22
+    }
23 23
 
24 24
 }
Please login to merge, or discard this patch.