Passed
Push — main ( d89ccb...0e1999 )
by Pouya
02:09
created
src/Objects/PaymentResponse.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,18 +36,24 @@
 block discarded – undo
36 36
      */
37 37
 
38 38
     public function __construct($json){
39
-        if(array_key_exists('to',$json))
40
-            $this->to = data_get($json,'to');
41
-        if(array_key_exists('from',$json))
42
-            $this->from = data_get($json,'from');
43
-        if(array_key_exists('amount',$json))
44
-            $this->amount = data_get($json,'amount');
45
-        if(array_key_exists('fee',$json))
46
-            $this->fee = data_get($json,'fee');
47
-        if(array_key_exists('txid',$json))
48
-            $this->txid = data_get($json,'txid');
49
-        if(array_key_exists('success',$json))
50
-            $this->success = data_get($json,'success');
39
+        if(array_key_exists('to',$json)) {
40
+                    $this->to = data_get($json,'to');
41
+        }
42
+        if(array_key_exists('from',$json)) {
43
+                    $this->from = data_get($json,'from');
44
+        }
45
+        if(array_key_exists('amount',$json)) {
46
+                    $this->amount = data_get($json,'amount');
47
+        }
48
+        if(array_key_exists('fee',$json)) {
49
+                    $this->fee = data_get($json,'fee');
50
+        }
51
+        if(array_key_exists('txid',$json)) {
52
+                    $this->txid = data_get($json,'txid');
53
+        }
54
+        if(array_key_exists('success',$json)) {
55
+                    $this->success = data_get($json,'success');
56
+        }
51 57
     }
52 58
 
53 59
 }
Please login to merge, or discard this patch.
src/Classes/Receive.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,8 +128,9 @@
 block discarded – undo
128 128
             'onNotification' => $on,
129 129
             'confs' => $confs,
130 130
         ];
131
-        if(!is_null($height))
132
-            $params['height'] = $height;
131
+        if(!is_null($height)) {
132
+                    $params['height'] = $height;
133
+        }
133 134
         $params = array_merge($this->params, $params);
134 135
         $response = json_decode($this->Post('block_notification',['form_params'=>$params]),true);
135 136
         return new NotificationResponse($response);
Please login to merge, or discard this patch.