@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use GuzzleHttp\Client; |
9 | 9 | use GuzzleHttp\Exception\GuzzleException; |
10 | 10 | |
11 | -class Blockchain{ |
|
11 | +class Blockchain { |
|
12 | 12 | |
13 | 13 | protected $client; |
14 | 14 | protected $params; |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | const GET = 'GET'; |
17 | 17 | const POST = 'POST'; |
18 | 18 | |
19 | - public function __construct($config){ |
|
20 | - $this->client = new Client(['base_uri'=>data_get($config,'base_uri')]); |
|
21 | - $this->params['api_code'] = data_get('api_code',null); |
|
19 | + public function __construct($config) { |
|
20 | + $this->client = new Client(['base_uri'=>data_get($config, 'base_uri')]); |
|
21 | + $this->params['api_code'] = data_get('api_code', null); |
|
22 | 22 | $this->Create = new Create($this); |
23 | 23 | $this->Wallet = new Wallet($this); |
24 | 24 | $this->Receive = new Receive($this); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param $base_uri string Default : http://localhost:3000 |
29 | 29 | */ |
30 | 30 | |
31 | - public function newBaseUri($base_uri){ |
|
31 | + public function newBaseUri($base_uri) { |
|
32 | 32 | $this->client = new Client(['base_uri'=>$base_uri]); |
33 | 33 | } |
34 | 34 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * @return array |
40 | 40 | */ |
41 | 41 | |
42 | - public function Request($method, $url, $params){ |
|
42 | + public function Request($method, $url, $params) { |
|
43 | 43 | $params = array_merge($this->params, $params); |
44 | 44 | $options = array( |
45 | 45 | 'form-params'=>$params, |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ); |
50 | 50 | |
51 | 51 | try { |
52 | - return json_decode($this->client->request($method, $url, $options),true); |
|
52 | + return json_decode($this->client->request($method, $url, $options), true); |
|
53 | 53 | } catch (GuzzleException $e) { |
54 | 54 | //throw $e->getMessage(); |
55 | 55 | } |