Passed
Push — main ( b86878...e52c85 )
by Pouya
05:24
created
src/Objects/AccountResponse.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Appino\Blockchain\Objects\Cache;
6 6
 use Psy\Util\Json;
7 7
 
8
-class AccountResponse{
8
+class AccountResponse {
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -48,25 +48,25 @@  discard block
 block discarded – undo
48 48
      * @param $params array|object
49 49
      */
50 50
 
51
-    public function __construct($params){
51
+    public function __construct($params) {
52 52
         //echo Json::encode($params);
53
-        if(is_null($params))
53
+        if (is_null($params))
54 54
             return;
55
-        $this->balance = data_get($params,'balance');
56
-        $this->label = data_get($params,'label');
57
-        $this->index = data_get($params,'index');
58
-        $this->archived = data_get($params,'archived');
59
-        $this->extendedPublicKey = data_get($params,'extendedPublicKey');
60
-        $this->extendedPrivateKey = data_get($params,'extendedPrivateKey');
61
-        $this->receiveIndex = data_get($params,'receiveIndex');
62
-        $this->lastUsedReceiveIndex = data_get($params,'lastUsedReceiveIndex');
63
-        $this->receiveAddress = data_get($params,'receiveAddress');
55
+        $this->balance = data_get($params, 'balance');
56
+        $this->label = data_get($params, 'label');
57
+        $this->index = data_get($params, 'index');
58
+        $this->archived = data_get($params, 'archived');
59
+        $this->extendedPublicKey = data_get($params, 'extendedPublicKey');
60
+        $this->extendedPrivateKey = data_get($params, 'extendedPrivateKey');
61
+        $this->receiveIndex = data_get($params, 'receiveIndex');
62
+        $this->lastUsedReceiveIndex = data_get($params, 'lastUsedReceiveIndex');
63
+        $this->receiveAddress = data_get($params, 'receiveAddress');
64 64
     }
65 65
 
66
-    public function __toString(){
66
+    public function __toString() {
67 67
         $class_vars = get_class_vars(get_class($this));
68 68
         $response = [];
69
-        foreach ($class_vars as $key => $value){
69
+        foreach ($class_vars as $key => $value) {
70 70
             $response[$key] = $this->{$key};
71 71
         }
72 72
         return Json::encode($response);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,9 @@
 block discarded – undo
50 50
 
51 51
     public function __construct($params){
52 52
         //echo Json::encode($params);
53
-        if(is_null($params))
54
-            return;
53
+        if(is_null($params)) {
54
+                    return;
55
+        }
55 56
         $this->balance = data_get($params,'balance');
56 57
         $this->label = data_get($params,'label');
57 58
         $this->index = data_get($params,'index');
Please login to merge, or discard this patch.
src/Objects/PaymentResponse.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class PaymentResponse{
9
+class PaymentResponse {
10 10
     /**
11 11
      * @var array of string
12 12
      */
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
      * @param $params array
38 38
      */
39 39
 
40
-    public function __construct($params){
41
-        if(is_null($params))
40
+    public function __construct($params) {
41
+        if (is_null($params))
42 42
             return;
43
-        $this->to = data_get($params,'to');
44
-        $this->from = data_get($params,'from');
45
-        $this->amount = data_get($params,'amount');
46
-        $this->fee = data_get($params,'fee');
47
-        $this->txid = data_get($params,'txid');
48
-        $this->success = data_get($params,'success');
43
+        $this->to = data_get($params, 'to');
44
+        $this->from = data_get($params, 'from');
45
+        $this->amount = data_get($params, 'amount');
46
+        $this->fee = data_get($params, 'fee');
47
+        $this->txid = data_get($params, 'txid');
48
+        $this->success = data_get($params, 'success');
49 49
     }
50 50
 
51
-    public function __toString(){
51
+    public function __toString() {
52 52
         $class_vars = get_class_vars(get_class($this));
53 53
         $response = [];
54
-        foreach ($class_vars as $key => $value){
54
+        foreach ($class_vars as $key => $value) {
55 55
             $response[$key] = $this->{$key};
56 56
         }
57 57
         return Json::encode($response);
Please login to merge, or discard this patch.
src/Objects/ReceiveResponse.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class ReceiveResponse{
9
+class ReceiveResponse {
10 10
     /**
11 11
      * @var string
12 12
      */
@@ -20,18 +20,18 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public $callback;
22 22
 
23
-    public function __construct($params){
24
-        if(is_null($params))
23
+    public function __construct($params) {
24
+        if (is_null($params))
25 25
             return;
26
-        $this->address = data_get($params,'address');
27
-        $this->index = data_get($params,'index');
28
-        $this->callback = data_get($params,'callback');
26
+        $this->address = data_get($params, 'address');
27
+        $this->index = data_get($params, 'index');
28
+        $this->callback = data_get($params, 'callback');
29 29
     }
30 30
 
31
-    public function __toString(){
31
+    public function __toString() {
32 32
         $class_vars = get_class_vars(get_class($this));
33 33
         $response = [];
34
-        foreach ($class_vars as $key => $value){
34
+        foreach ($class_vars as $key => $value) {
35 35
             $response[$key] = $this->{$key};
36 36
         }
37 37
         return Json::encode($response);
Please login to merge, or discard this patch.
src/Objects/NotificationResponse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class NotificationResponse{
9
+class NotificationResponse {
10 10
     public $id;
11 11
     public $address;
12 12
     public $height;
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
     public $op;
16 16
     public $onNotification;
17 17
 
18
-    public function __construct($params){
19
-        if(is_null($params))
18
+    public function __construct($params) {
19
+        if (is_null($params))
20 20
             return;
21
-        foreach ($params as $key => $value){
21
+        foreach ($params as $key => $value) {
22 22
             $this->{$key} = $value;
23 23
         }
24 24
     }
25 25
 
26
-    public function __toString(){
26
+    public function __toString() {
27 27
         $class_vars = get_class_vars(get_class($this));
28 28
         $response = [];
29
-        foreach ($class_vars as $key => $value){
29
+        foreach ($class_vars as $key => $value) {
30 30
             $response[$key] = $this->{$key};
31 31
         }
32 32
         return Json::encode($response);
Please login to merge, or discard this patch.
src/Objects/WalletAddress.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Appino\Blockchain\Objects\Cache;
6 6
 use Psy\Util\Json;
7 7
 
8
-class WalletAddress{
8
+class WalletAddress {
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -36,22 +36,22 @@  discard block
 block discarded – undo
36 36
      * @param $params array|object
37 37
      */
38 38
 
39
-    public function __construct($params){
39
+    public function __construct($params) {
40 40
         //echo Json::encode($params);
41
-        if(is_null($params))
41
+        if (is_null($params))
42 42
             return;
43
-        $this->label = data_get($params,'label');
44
-        $this->archived = data_get($params,'archived');
45
-        $this->xpriv = data_get($params,'xpriv');
46
-        $this->xpub = data_get($params,'xpub');
47
-        $this->addresslabels = data_get($params,'addresslabels',array());
48
-        $this->cahce = new Cache(data_get($params,'cache'));
43
+        $this->label = data_get($params, 'label');
44
+        $this->archived = data_get($params, 'archived');
45
+        $this->xpriv = data_get($params, 'xpriv');
46
+        $this->xpub = data_get($params, 'xpub');
47
+        $this->addresslabels = data_get($params, 'addresslabels', array());
48
+        $this->cahce = new Cache(data_get($params, 'cache'));
49 49
     }
50 50
 
51
-    public function __toString(){
51
+    public function __toString() {
52 52
         $class_vars = get_class_vars(get_class($this));
53 53
         $response = [];
54
-        foreach ($class_vars as $key => $value){
54
+        foreach ($class_vars as $key => $value) {
55 55
             $response[$key] = $this->{$key};
56 56
         }
57 57
         return Json::encode($response);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,9 @@
 block discarded – undo
38 38
 
39 39
     public function __construct($params){
40 40
         //echo Json::encode($params);
41
-        if(is_null($params))
42
-            return;
41
+        if(is_null($params)) {
42
+                    return;
43
+        }
43 44
         $this->label = data_get($params,'label');
44 45
         $this->archived = data_get($params,'archived');
45 46
         $this->xpriv = data_get($params,'xpriv');
Please login to merge, or discard this patch.
src/Objects/BalanceCallback.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class BalanceCallback{
9
+class BalanceCallback {
10 10
 
11 11
     public $transaction_hash;
12 12
     public $address;
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
      * @param $params
19 19
      */
20 20
 
21
-    public function __construct($params){
22
-        if(is_null($params))
21
+    public function __construct($params) {
22
+        if (is_null($params))
23 23
             return;
24
-        foreach ($params as $key => $value){
24
+        foreach ($params as $key => $value) {
25 25
             $this->{$key} = $value;
26 26
         }
27 27
     }
28 28
 
29
-    public function __toString(){
29
+    public function __toString() {
30 30
         $class_vars = get_class_vars(get_class($this));
31 31
         $response = [];
32
-        foreach ($class_vars as $key => $value){
32
+        foreach ($class_vars as $key => $value) {
33 33
             $response[$key] = $this->{$key};
34 34
         }
35 35
         return Json::encode($response);
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
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Psy\Util\Json;
6 6
 use function Sodium\add;
7 7
 
8
-class WalletResponse{
8
+class WalletResponse {
9 9
 
10 10
     /**
11 11
      * @var string
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
      * @param $params array|object
26 26
      */
27 27
 
28
-    public function __construct($params){
29
-        if(is_null($params))
28
+    public function __construct($params) {
29
+        if (is_null($params))
30 30
             return;
31
-        $this->guid = data_get($params,'guid');
32
-        $this->address = data_get($params,'address');
33
-        $this->label = data_get($params,'label');
31
+        $this->guid = data_get($params, 'guid');
32
+        $this->address = data_get($params, 'address');
33
+        $this->label = data_get($params, 'label');
34 34
     }
35 35
 
36
-    public function __toString(){
36
+    public function __toString() {
37 37
         $class_vars = get_class_vars(get_class($this));
38 38
         $response = [];
39
-        foreach ($class_vars as $key => $value){
39
+        foreach ($class_vars as $key => $value) {
40 40
             $response[$key] = $this->{$key};
41 41
         }
42 42
         return Json::encode($response);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@
 block discarded – undo
26 26
      */
27 27
 
28 28
     public function __construct($params){
29
-        if(is_null($params))
30
-            return;
29
+        if(is_null($params)) {
30
+                    return;
31
+        }
31 32
         $this->guid = data_get($params,'guid');
32 33
         $this->address = data_get($params,'address');
33 34
         $this->label = data_get($params,'label');
Please login to merge, or discard this patch.
src/Objects/LogResponse.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class LogResponse{
9
+class LogResponse {
10 10
 
11 11
     /**
12 12
      * @var string
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public $response_code;
27 27
 
28
-    public function __construct($params){
29
-        if(is_null($params))
28
+    public function __construct($params) {
29
+        if (is_null($params))
30 30
             return;
31
-        $this->callback = data_get($params,'callback');
32
-        $this->called_at = data_get($params,'called_at');
33
-        $this->raw_response = data_get($params,'raw_response');
34
-        $this->response_code = data_get($params,'response_code');
31
+        $this->callback = data_get($params, 'callback');
32
+        $this->called_at = data_get($params, 'called_at');
33
+        $this->raw_response = data_get($params, 'raw_response');
34
+        $this->response_code = data_get($params, 'response_code');
35 35
     }
36 36
 
37
-    public function __toString(){
37
+    public function __toString() {
38 38
         $class_vars = get_class_vars(get_class($this));
39 39
         $response = [];
40
-        foreach ($class_vars as $key => $value){
40
+        foreach ($class_vars as $key => $value) {
41 41
             $response[$key] = $this->{$key};
42 42
         }
43 43
         return Json::encode($response);
Please login to merge, or discard this patch.
src/Objects/Cache.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@
 block discarded – undo
6 6
 
7 7
 use Psy\Util\Json;
8 8
 
9
-class Cache{
9
+class Cache {
10 10
 
11 11
     public $receiveAccount;
12 12
     public $changeAccount;
13 13
 
14
-    public function __construct($params){
15
-        if(is_null($params))
14
+    public function __construct($params) {
15
+        if (is_null($params))
16 16
             return;
17
-        $this->receiveAccount = data_get($params,'receiveAccount');
18
-        $this->changeAccount = data_get($params,'changeAccount');
17
+        $this->receiveAccount = data_get($params, 'receiveAccount');
18
+        $this->changeAccount = data_get($params, 'changeAccount');
19 19
     }
20 20
 
21
-    public function __toString(){
21
+    public function __toString() {
22 22
         $class_vars = get_class_vars(get_class($this));
23 23
         $response = [];
24
-        foreach ($class_vars as $key => $value){
24
+        foreach ($class_vars as $key => $value) {
25 25
             $response[$key] = $this->{$key};
26 26
         }
27 27
         return Json::encode($response);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@
 block discarded – undo
12 12
     public $changeAccount;
13 13
 
14 14
     public function __construct($params){
15
-        if(is_null($params))
16
-            return;
15
+        if(is_null($params)) {
16
+                    return;
17
+        }
17 18
         $this->receiveAccount = data_get($params,'receiveAccount');
18 19
         $this->changeAccount = data_get($params,'changeAccount');
19 20
     }
Please login to merge, or discard this patch.