@@ -4,7 +4,7 @@ |
||
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'; |
@@ -4,7 +4,7 @@ |
||
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'; |
@@ -5,5 +5,5 @@ |
||
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 | ]; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'blockchain'); |
57 | 57 | |
58 | 58 | // Register the main class to use with the facade |
59 | - $this->app->singleton('blockchain', function () { |
|
59 | + $this->app->singleton('blockchain', function() { |
|
60 | 60 | $config = app('config')->get('blockchain'); |
61 | 61 | return (new Blockchain($config)); |
62 | 62 | }); |
@@ -5,7 +5,7 @@ discard block |
||
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 |
||
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); |
@@ -6,7 +6,7 @@ discard block |
||
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 |
||
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); |
@@ -6,7 +6,7 @@ discard block |
||
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 |
||
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); |
@@ -6,7 +6,7 @@ discard block |
||
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 |
||
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); |
@@ -5,7 +5,7 @@ discard block |
||
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 |
||
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); |