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