@@ -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 = []) |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | return $this; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public function doGet(string $url): ?Collection |
|
| 61 | + public function doGet(string $url): ?Collection |
|
| 62 | 62 | { |
| 63 | 63 | try { |
| 64 | 64 | $request = $this->client->get($url); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | return $this->responseResult($response); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - public function doPost(string $url, array $data = []): ?Collection |
|
| 77 | + public function doPost(string $url, array $data = []): ?Collection |
|
| 78 | 78 | { |
| 79 | 79 | try { |
| 80 | 80 | $request = $this->client->post($url, $data); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | return new PluginClient($this->httpClient, $this->plugins); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - protected function responseResult(?string $response) : ?Collection |
|
| 103 | + protected function responseResult(?string $response) : ?Collection |
|
| 104 | 104 | { |
| 105 | 105 | $data = json_decode($response, true); |
| 106 | 106 | |
@@ -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 | ); |