@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | public function validateAddress(string $address): bool |
15 | 15 | { |
16 | 16 | if ($address) { |
17 | - $url = $this->api_url_prefix.'is_address_valid/'.$this->currency.'/'.$address; |
|
17 | + $url = $this->api_url_prefix . 'is_address_valid/' . $this->currency . '/' . $address; |
|
18 | 18 | $response = $this->apiCall($url); |
19 | 19 | |
20 | 20 | if (isset($response['is_valid'])) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function getBalance(string $address): float |
29 | 29 | { |
30 | 30 | if ($address) { |
31 | - $url = $this->api_url_prefix.'get_address_balance/'.$this->currency.'/'.$address; |
|
31 | + $url = $this->api_url_prefix . 'get_address_balance/' . $this->currency . '/' . $address; |
|
32 | 32 | $response = $this->apiCall($url); |
33 | 33 | |
34 | 34 | if (isset($response['confirmed_balance'])) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function getBlockExplorerLink(string $address): string |
43 | 43 | { |
44 | 44 | if ($address) { |
45 | - return $this->block_link_prefix.$this->currency.'/'.$address; |
|
45 | + return $this->block_link_prefix . $this->currency . '/' . $address; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | throw new Exception('Wallet address can not be empty!'); |
@@ -55,6 +55,6 @@ discard block |
||
55 | 55 | return $response['data']; |
56 | 56 | } |
57 | 57 | |
58 | - throw new Exception('Output data is not correct. Check the API description - '.$this->api_description.'!'); |
|
58 | + throw new Exception('Output data is not correct. Check the API description - ' . $this->api_description . '!'); |
|
59 | 59 | } |
60 | 60 | } |
@@ -124,7 +124,7 @@ |
||
124 | 124 | } |
125 | 125 | } |
126 | 126 | |
127 | - throw new Exception('Something wrong with API '.$url.' call!'); |
|
127 | + throw new Exception('Something wrong with API ' . $url . ' call!'); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function getBalance(string $address): float |
25 | 25 | { |
26 | 26 | if ($address) { |
27 | - $url = $this->api_url_prefix.'module=account&action=balance&address='.$address.'&tag=latest&apikey='.$this->config['etherscan_api_key']; |
|
27 | + $url = $this->api_url_prefix . 'module=account&action=balance&address=' . $address . '&tag=latest&apikey=' . $this->config['etherscan_api_key']; |
|
28 | 28 | $response = $this->apiCall($url); |
29 | 29 | |
30 | 30 | if (is_numeric($response)) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | public function getBlockExplorerLink(string $address): string |
43 | 43 | { |
44 | 44 | if ($address) { |
45 | - return $this->block_link_prefix.$address; |
|
45 | + return $this->block_link_prefix . $address; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | throw new Exception('Wallet address can not be empty!'); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | return $response['result']; |
56 | 56 | } |
57 | 57 | |
58 | - throw new Exception('Output data is not correct. Check the API description - '.$this->api_description.'!'); |
|
58 | + throw new Exception('Output data is not correct. Check the API description - ' . $this->api_description . '!'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -67,6 +67,6 @@ discard block |
||
67 | 67 | */ |
68 | 68 | private function convertFromWei($balance): float |
69 | 69 | { |
70 | - return $balance / pow(10, 18); |
|
70 | + return $balance/pow(10, 18); |
|
71 | 71 | } |
72 | 72 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | $supported_currencies = implode(', ', $supported_currencies); |
57 | 57 | |
58 | - throw new Exception('"'.$currency.'" cryptocurrency is not supported now! Currently available values: '.$supported_currencies); |
|
58 | + throw new Exception('"' . $currency . '" cryptocurrency is not supported now! Currently available values: ' . $supported_currencies); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | public function boot() |
24 | 24 | { |
25 | 25 | $this->publishes([ |
26 | - __DIR__.'/../config/laravel_crypto_stats.php' => config_path('laravel_crypto_stats.php'), |
|
26 | + __DIR__ . '/../config/laravel_crypto_stats.php' => config_path('laravel_crypto_stats.php'), |
|
27 | 27 | ]); |
28 | 28 | } |
29 | 29 | |
@@ -34,15 +34,15 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function register() |
36 | 36 | { |
37 | - $this->app->bind('laravel-crypto-stats', function () { |
|
37 | + $this->app->bind('laravel-crypto-stats', function() { |
|
38 | 38 | return new LaravelCryptoStats(); |
39 | 39 | }); |
40 | 40 | |
41 | - $this->app->bind('chainso', function () { |
|
41 | + $this->app->bind('chainso', function() { |
|
42 | 42 | return new ChainsoConnector(); |
43 | 43 | }); |
44 | 44 | |
45 | - $this->app->bind('etherscan', function () { |
|
45 | + $this->app->bind('etherscan', function() { |
|
46 | 46 | return new EtherscanConnector(); |
47 | 47 | }); |
48 | 48 |