@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function __invoke(Request $request) |
19 | 19 | { |
20 | 20 | $eventPayload = $this->getJsonPayloadFromRequest($request); |
21 | - if (! isset($eventPayload['type'])) { |
|
21 | + if (!isset($eventPayload['type'])) { |
|
22 | 22 | throw WebhookFailed::missingType($request); |
23 | 23 | } |
24 | 24 | $type = $eventPayload['type']; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if ('' === $jobClass) { |
29 | 29 | return; |
30 | 30 | } |
31 | - if (! class_exists($jobClass)) { |
|
31 | + if (!class_exists($jobClass)) { |
|
32 | 32 | throw WebhookFailed::jobClassDoesNotExist($jobClass, $WebhookCall); |
33 | 33 | } |
34 | 34 | dispatch(new $jobClass($WebhookCall)); |
@@ -11,11 +11,11 @@ |
||
11 | 11 | { |
12 | 12 | $signature = $request->header('X-Multicoin-Signature'); |
13 | 13 | |
14 | - if (! $signature) { |
|
14 | + if (!$signature) { |
|
15 | 15 | throw WebhookFailed::missingSignature(); |
16 | 16 | } |
17 | 17 | |
18 | - if (! $this->isValid($signature, $request)) { |
|
18 | + if (!$this->isValid($signature, $request)) { |
|
19 | 19 | throw WebhookFailed::invalidSignature($signature); |
20 | 20 | } |
21 | 21 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->coin = $config['coin']; |
33 | 33 | $this->client = $client ?: $this->setClient(); |
34 | 34 | // $this->setAuth($this->config['key']); |
35 | - // parent::__construct($this->setUrl($this->config['url'])); |
|
35 | + // parent::__construct($this->setUrl($this->config['url'])); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function buildQueryParam(array $default, array $param = []) |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function registerClient() |
56 | 56 | { |
57 | - $this->app->bind('multicoin.currency', function ($app) { |
|
57 | + $this->app->bind('multicoin.currency', function($app) { |
|
58 | 58 | return $app['multicoin']->currency(); |
59 | 59 | }); |
60 | 60 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | protected function registerFactory() |
68 | 68 | { |
69 | - $this->app->singleton('multicoin', function ($app) { |
|
69 | + $this->app->singleton('multicoin', function($app) { |
|
70 | 70 | return new MulticoinFactory(config('multicoin')); |
71 | 71 | }); |
72 | 72 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | private function registerRoutes() |
84 | 84 | { |
85 | - Route::macro('multicoinWebhook', function ($url) { |
|
85 | + Route::macro('multicoinWebhook', function($url) { |
|
86 | 86 | return Route::any($url, '\Multicoin\Api\Http\Controllers\WebhookController'); |
87 | 87 | }); |
88 | 88 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function currency(string $name = 'BTC'): Multicoincurrency |
54 | 54 | { |
55 | - if (! array_key_exists($name, $this->currencys)) { |
|
55 | + if (!array_key_exists($name, $this->currencys)) { |
|
56 | 56 | $config = $this->getConfig($name); |
57 | 57 | |
58 | 58 | $this->currencys[$name] = $this->make($config); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | $flip_currency = array_flip($this->config['currency']); |
73 | 73 | |
74 | - if (! array_key_exists($name, $flip_currency)) { |
|
74 | + if (!array_key_exists($name, $flip_currency)) { |
|
75 | 75 | throw new InvalidArgumentException( |
76 | 76 | "Could not find currency configuration [$name]" |
77 | 77 | ); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('multicoin')) { |
|
3 | +if (!function_exists('multicoin')) { |
|
4 | 4 | /** |
5 | 5 | * Get bitcoind client instance by name. |
6 | 6 | * |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | |
9 | 9 | $config = [ |
10 | - // 'api_token' => '', |
|
10 | + // 'api_token' => '', |
|
11 | 11 | 'api_token' => '', |
12 | 12 | 'url' => 'http://multicoin-backend.test/api/v1/', |
13 | 13 | 'coin' => 'BTC', |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | //$invoice = $api->createInvoice(['user_id' => 1]); |
23 | 23 | |
24 | 24 | |
25 | - dump($invoice); |
|
25 | + dump($invoice); |
|
26 | 26 | |
27 | 27 | |
28 | 28 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | ]; |
16 | 16 | |
17 | 17 | |
18 | -$api = new Multicoin($config); |
|
18 | +$api = new Multicoin($config); |
|
19 | 19 | |
20 | 20 | dump($api->currency()); |
21 | 21 | dd($api->fee()); |