Passed
Push — main ( ac53a4...aee26d )
by Pouya
06:40 queued 03:43
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.
config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
  */
6 6
 return [
7 7
     'api_code'=>env('blockchain_api_code'),
8
-    'base_url'=>env('blockchain_base_url','http://localhost:3000/')
8
+    'base_url'=>env('blockchain_base_url', 'http://localhost:3000/')
9 9
 ];
Please login to merge, or discard this patch.
src/Objects/BalanceCallback.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@
 block discarded – undo
17 17
      */
18 18
 
19 19
     public function __construct($params){
20
-        if(is_null($params))
21
-            return;
20
+        if(is_null($params)) {
21
+                    return;
22
+        }
22 23
         foreach ($params as $key => $value){
23 24
             $this->{$key} = $value;
24 25
         }
Please login to merge, or discard this 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/NotificationResponse.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
     public $onNotification;
15 15
 
16 16
     public function __construct($params){
17
-        if(is_null($params))
18
-            return;
17
+        if(is_null($params)) {
18
+                    return;
19
+        }
19 20
         foreach ($params as $key => $value){
20 21
             $this->{$key} = $value;
21 22
         }
Please login to merge, or discard this 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 NotificationResponse{
7
+class NotificationResponse {
8 8
     public $id;
9 9
     public $address;
10 10
     public $height;
@@ -13,21 +13,21 @@  discard block
 block discarded – undo
13 13
     public $op;
14 14
     public $onNotification;
15 15
 
16
-    public function __construct($params){
17
-        if(is_null($params))
16
+    public function __construct($params) {
17
+        if (is_null($params))
18 18
             return;
19
-        foreach ($params as $key => $value){
19
+        foreach ($params as $key => $value) {
20 20
             $this->{$key} = $value;
21 21
         }
22 22
     }
23 23
 
24
-    public function __toString(){
24
+    public function __toString() {
25 25
         $class_vars = get_class_vars(get_class($this));
26 26
         $response = [];
27
-        foreach ($class_vars as $key => $value){
27
+        foreach ($class_vars as $key => $value) {
28 28
             $response[$key] = $this->{$key};
29 29
         }
30
-        return json_encode($response, JSON_THROW_ON_ERROR) ."";
30
+        return json_encode($response, JSON_THROW_ON_ERROR)."";
31 31
     }
32 32
 
33 33
 }
Please login to merge, or discard this patch.
src/Objects/BlockCallback.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
     public $size;
14 14
 
15 15
     public function __construct($params){
16
-        if(is_null($params))
17
-            return;
16
+        if(is_null($params)) {
17
+                    return;
18
+        }
18 19
         foreach ($params as $key => $value){
19 20
             $this->{$key} = $value;
20 21
         }
Please login to merge, or discard this 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/LogResponse.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@
 block discarded – undo
24 24
     public $response_code;
25 25
 
26 26
     public function __construct($params){
27
-        if(is_null($params))
28
-            return;
27
+        if(is_null($params)) {
28
+                    return;
29
+        }
29 30
         $this->callback = data_get($params,'callback');
30 31
         $this->called_at = data_get($params,'called_at');
31 32
         $this->raw_response = data_get($params,'raw_response');
Please login to merge, or discard this 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/PaymentResponse.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
      */
37 37
 
38 38
     public function __construct($params){
39
-        if(is_null($params))
40
-            return;
39
+        if(is_null($params)) {
40
+                    return;
41
+        }
41 42
         $this->to = data_get($params,'to');
42 43
         $this->from = data_get($params,'from');
43 44
         $this->amount = data_get($params,'amount');
Please login to merge, or discard this 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/ReceiveResponse.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
     public $callback;
20 20
 
21 21
     public function __construct($params){
22
-        if(is_null($params))
23
-            return;
22
+        if(is_null($params)) {
23
+                    return;
24
+        }
24 25
         $this->address = data_get($params,'address');
25 26
         $this->index = data_get($params,'index');
26 27
         $this->callback = data_get($params,'callback');
Please login to merge, or discard this 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.