@@ -16,12 +16,12 @@ |
||
16 | 16 | */ |
17 | 17 | public function buildQuery(array $params): string |
18 | 18 | { |
19 | - $params = array_filter($params, function ($value) { |
|
19 | + $params = array_filter($params, function($value) { |
|
20 | 20 | return !is_null($value); |
21 | 21 | }); |
22 | 22 | |
23 | 23 | $query = http_build_query($params); |
24 | 24 | |
25 | - return empty($query) ? '' : '?' . $query; |
|
25 | + return empty($query) ? '' : '?'.$query; |
|
26 | 26 | } |
27 | 27 | } |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | protected function timeseries(string $path, string $assetKey, string $metricId, array $params): array |
57 | 57 | { |
58 | 58 | $query = $this->queryBuilder->buildQuery($params); |
59 | - $response = $this->client->getBaseClient()->get('/' . $path . '/' . strtolower($assetKey) . '/metrics/' |
|
60 | - . $metricId . '/time-series' . $query); |
|
59 | + $response = $this->client->getBaseClient()->get('/'.$path.'/'.strtolower($assetKey).'/metrics/' |
|
60 | + . $metricId.'/time-series'.$query); |
|
61 | 61 | |
62 | 62 | return $this->transformer->transform($response); |
63 | 63 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | protected function all(string $path, array $params): array |
72 | 72 | { |
73 | 73 | $query = $this->queryBuilder->buildQuery($params); |
74 | - $response = $this->client->getBaseClient()->get('/' . $path . $query); |
|
74 | + $response = $this->client->getBaseClient()->get('/'.$path.$query); |
|
75 | 75 | |
76 | 76 | return $this->transformer->transform($response); |
77 | 77 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function getForAsset(string $assetKey, array $params = []): array |
37 | 37 | { |
38 | 38 | $query = $this->queryBuilder->buildQuery($params); |
39 | - $response = $this->client->getBaseClient()->get('/news/' . strtolower($assetKey) . $query); |
|
39 | + $response = $this->client->getBaseClient()->get('/news/'.strtolower($assetKey).$query); |
|
40 | 40 | |
41 | 41 | return $this->transformer->transform($response); |
42 | 42 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function get(string $assetKey, ?string $fields = null): array |
36 | 36 | { |
37 | 37 | $query = $this->queryBuilder->buildQuery(compact('fields')); |
38 | - $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . $query); |
|
38 | + $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).$query); |
|
39 | 39 | |
40 | 40 | return $this->transformer->transform($response); |
41 | 41 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | public function getProfile(string $assetKey, ?string $fields = null): array |
52 | 52 | { |
53 | 53 | $query = $this->queryBuilder->buildQuery(compact('fields')); |
54 | - $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/profile' . $query); |
|
54 | + $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/profile'.$query); |
|
55 | 55 | |
56 | 56 | return $this->transformer->transform($response); |
57 | 57 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public function getMetrics(string $assetKey, ?string $fields = null): array |
68 | 68 | { |
69 | 69 | $query = $this->queryBuilder->buildQuery(compact('fields')); |
70 | - $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/metrics' . $query); |
|
70 | + $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/metrics'.$query); |
|
71 | 71 | |
72 | 72 | return $this->transformer->transform($response); |
73 | 73 | } |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | public function getMarketData(string $assetKey, ?string $fields = null): array |
85 | 85 | { |
86 | 86 | $query = $this->queryBuilder->buildQuery(compact('fields')); |
87 | - $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/metrics' |
|
88 | - . '/market-data' . $query); |
|
87 | + $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/metrics' |
|
88 | + . '/market-data'.$query); |
|
89 | 89 | |
90 | 90 | return $this->transformer->transform($response); |
91 | 91 | } |