Passed
Branch main (00d2aa)
by Pouya
03:55 queued 01:48
created
src/Enums/Operation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 namespace Appino\Blockchain\Interfaces;
5 5
 
6 6
 
7
-abstract class Operation{
7
+abstract class Operation {
8 8
 
9 9
     const SPEND = 'SPEND';
10 10
     const RECEIVE = 'RECEIVE';
Please login to merge, or discard this patch.
src/Enums/Notification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 namespace Appino\Blockchain\Interfaces;
5 5
 
6 6
 
7
-abstract class Notification{
7
+abstract class Notification {
8 8
 
9 9
     const KEEP = 'KEEP';
10 10
     const DELETE = 'DELETE';
Please login to merge, or discard this patch.
src/BlockchainServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
         $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'blockchain');
56 56
 
57 57
         // Register the main class to use with the facade
58
-        $this->app->singleton('blockchain', function () {
58
+        $this->app->singleton('blockchain', function() {
59 59
             $config = app('config')->get('blockchain');
60 60
             return new Blockchain($config);
61 61
         });
62
-        $this->app->singleton('receive', function () {
62
+        $this->app->singleton('receive', function() {
63 63
             $config = app('config')->get('blockchain');
64 64
             return new Receive($config);
65 65
         });
Please login to merge, or discard this patch.
src/Objects/ReceiveResponse.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 namespace Appino\Blockchain\Objects;
5 5
 
6 6
 
7
-class ReceiveResponse{
7
+class ReceiveResponse {
8 8
     /**
9 9
      * @var string
10 10
      */
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public $callback;
20 20
 
21
-    public function __construct($json){
22
-        if(array_key_exists('address',$json))
23
-            $this->address = data_get($json,'address');
24
-        if(array_key_exists('index',$json))
25
-            $this->index = data_get($json,'index');
26
-        if(array_key_exists('callback',$json))
27
-            $this->callback = data_get($json,'callback');
21
+    public function __construct($json) {
22
+        if (array_key_exists('address', $json))
23
+            $this->address = data_get($json, 'address');
24
+        if (array_key_exists('index', $json))
25
+            $this->index = data_get($json, 'index');
26
+        if (array_key_exists('callback', $json))
27
+            $this->callback = data_get($json, 'callback');
28 28
     }
29 29
 
30 30
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,12 +19,15 @@
 block discarded – undo
19 19
     public $callback;
20 20
 
21 21
     public function __construct($json){
22
-        if(array_key_exists('address',$json))
23
-            $this->address = data_get($json,'address');
24
-        if(array_key_exists('index',$json))
25
-            $this->index = data_get($json,'index');
26
-        if(array_key_exists('callback',$json))
27
-            $this->callback = data_get($json,'callback');
22
+        if(array_key_exists('address',$json)) {
23
+                    $this->address = data_get($json,'address');
24
+        }
25
+        if(array_key_exists('index',$json)) {
26
+                    $this->index = data_get($json,'index');
27
+        }
28
+        if(array_key_exists('callback',$json)) {
29
+                    $this->callback = data_get($json,'callback');
30
+        }
28 31
     }
29 32
 
30 33
 }
Please login to merge, or discard this patch.
src/Objects/WalletResponse.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Appino\Blockchain\Objects;
4 4
 
5
-class WalletResponse{
5
+class WalletResponse {
6 6
 
7 7
     /**
8 8
      * @var string
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
      * @param $json array|object
23 23
      */
24 24
 
25
-    public function __construct($json){
26
-        if(array_key_exists('guid',$json))
27
-            $this->guid = data_get($json,'balance');
28
-        if(array_key_exists('address',$json))
29
-            $this->address = data_get($json,'address');
30
-        if(array_key_exists('label',$json))
31
-            $this->label = data_get($json,'label');
25
+    public function __construct($json) {
26
+        if (array_key_exists('guid', $json))
27
+            $this->guid = data_get($json, 'balance');
28
+        if (array_key_exists('address', $json))
29
+            $this->address = data_get($json, 'address');
30
+        if (array_key_exists('label', $json))
31
+            $this->label = data_get($json, 'label');
32 32
     }
33 33
 
34 34
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,12 +23,15 @@
 block discarded – undo
23 23
      */
24 24
 
25 25
     public function __construct($json){
26
-        if(array_key_exists('guid',$json))
27
-            $this->guid = data_get($json,'balance');
28
-        if(array_key_exists('address',$json))
29
-            $this->address = data_get($json,'address');
30
-        if(array_key_exists('label',$json))
31
-            $this->label = data_get($json,'label');
26
+        if(array_key_exists('guid',$json)) {
27
+                    $this->guid = data_get($json,'balance');
28
+        }
29
+        if(array_key_exists('address',$json)) {
30
+                    $this->address = data_get($json,'address');
31
+        }
32
+        if(array_key_exists('label',$json)) {
33
+                    $this->label = data_get($json,'label');
34
+        }
32 35
     }
33 36
 
34 37
 }
Please login to merge, or discard this patch.
src/Objects/NotificationResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 namespace Appino\Blockchain\Objects;
5 5
 
6 6
 
7
-class NotificationResponse{
7
+class NotificationResponse {
8 8
     public $id;
9 9
     public $address;
10 10
     public $height;
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
     public $op;
14 14
     public $onNotification;
15 15
 
16
-    public function __construct($json){
17
-        foreach ($json as $key => $value){
16
+    public function __construct($json) {
17
+        foreach ($json as $key => $value) {
18 18
             $this->{$key} = $value;
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
src/Objects/LogResponse.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 namespace Appino\Blockchain\Objects;
5 5
 
6 6
 
7
-class LogResponse{
7
+class LogResponse {
8 8
 
9 9
     /**
10 10
      * @var string
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public $response_code;
25 25
 
26
-    public function __construct($json){
27
-        if(array_key_exists('callback',$json))
28
-            $this->callback = data_get($json,'callback');
29
-        if(array_key_exists('called_at',$json))
30
-            $this->called_at = data_get($json,'called_at');
31
-        if(array_key_exists('raw_response',$json))
32
-            $this->raw_response = data_get($json,'raw_response');
33
-        if(array_key_exists('response_code',$json))
34
-            $this->response_code = data_get($json,'response_code');
26
+    public function __construct($json) {
27
+        if (array_key_exists('callback', $json))
28
+            $this->callback = data_get($json, 'callback');
29
+        if (array_key_exists('called_at', $json))
30
+            $this->called_at = data_get($json, 'called_at');
31
+        if (array_key_exists('raw_response', $json))
32
+            $this->raw_response = data_get($json, 'raw_response');
33
+        if (array_key_exists('response_code', $json))
34
+            $this->response_code = data_get($json, 'response_code');
35 35
     }
36 36
 
37 37
 }
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,14 +24,18 @@
 block discarded – undo
24 24
     public $response_code;
25 25
 
26 26
     public function __construct($json){
27
-        if(array_key_exists('callback',$json))
28
-            $this->callback = data_get($json,'callback');
29
-        if(array_key_exists('called_at',$json))
30
-            $this->called_at = data_get($json,'called_at');
31
-        if(array_key_exists('raw_response',$json))
32
-            $this->raw_response = data_get($json,'raw_response');
33
-        if(array_key_exists('response_code',$json))
34
-            $this->response_code = data_get($json,'response_code');
27
+        if(array_key_exists('callback',$json)) {
28
+                    $this->callback = data_get($json,'callback');
29
+        }
30
+        if(array_key_exists('called_at',$json)) {
31
+                    $this->called_at = data_get($json,'called_at');
32
+        }
33
+        if(array_key_exists('raw_response',$json)) {
34
+                    $this->raw_response = data_get($json,'raw_response');
35
+        }
36
+        if(array_key_exists('response_code',$json)) {
37
+                    $this->response_code = data_get($json,'response_code');
38
+        }
35 39
     }
36 40
 
37 41
 }
Please login to merge, or discard this patch.
src/Objects/BlockCallback.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 namespace Appino\Blockchain\Objects;
5 5
 
6 6
 
7
-class BlockCallback{
7
+class BlockCallback {
8 8
 
9 9
     public $hash;
10 10
     public $confirmations;
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
     public $timestamp;
13 13
     public $size;
14 14
 
15
-    public function __construct($json){
16
-        foreach ($json as $key => $value){
15
+    public function __construct($json) {
16
+        foreach ($json as $key => $value) {
17 17
             $this->{$key} = $value;
18 18
         }
19 19
     }
Please login to merge, or discard this patch.
src/Objects/BalanceCallback.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 namespace Appino\Blockchain\Objects;
5 5
 
6 6
 
7
-class BalanceCallback{
7
+class BalanceCallback {
8 8
 
9 9
     public $transaction_hash;
10 10
     public $address;
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      * @param $json
17 17
      */
18 18
 
19
-    public function __construct($json){
20
-        foreach ($json as $key => $value){
19
+    public function __construct($json) {
20
+        foreach ($json as $key => $value) {
21 21
             $this->{$key} = $value;
22 22
         }
23 23
     }
Please login to merge, or discard this patch.