Passed
Push — main ( b86878...e52c85 )
by Pouya
05:24
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   +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/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   +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/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   +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 BlockCallback{
9
+class BlockCallback {
10 10
 
11 11
     public $hash;
12 12
     public $confirmations;
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
     public $timestamp;
15 15
     public $size;
16 16
 
17
-    public function __construct($params){
18
-        if(is_null($params))
17
+    public function __construct($params) {
18
+        if (is_null($params))
19 19
             return;
20
-        foreach ($params as $key => $value){
20
+        foreach ($params as $key => $value) {
21 21
             $this->{$key} = $value;
22 22
         }
23 23
     }
24 24
 
25
-    public function __toString(){
25
+    public function __toString() {
26 26
         $class_vars = get_class_vars(get_class($this));
27 27
         $response = [];
28
-        foreach ($class_vars as $key => $value){
28
+        foreach ($class_vars as $key => $value) {
29 29
             $response[$key] = $this->{$key};
30 30
         }
31 31
         return Json::encode($response);
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   +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/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   +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 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   +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.