Passed
Push — master ( 5a8d0e...941bae )
by Vladymyr
01:28
created
src/Api/Markets.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function getAll(?int $page = null, ?string $fields = null): array
23 23
     {
24
-        $params = array_filter(compact('fields', 'page'), function ($value) {
24
+        $params = array_filter(compact('fields', 'page'), function($value) {
25 25
             return !is_null($value);
26 26
         });
27 27
 
28 28
         $query = http_build_query($params);
29
-        $query = empty($query) ? $query : ('?' . $query);
30
-        $response = $this->client->getBaseClient()->get('/markets' . $query);
29
+        $query = empty($query) ? $query : ('?'.$query);
30
+        $response = $this->client->getBaseClient()->get('/markets'.$query);
31 31
 
32 32
         return $this->transformer->transform($response);
33 33
     }
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
         ?string $format = null
63 63
     ): array {
64 64
         $query = $this->buildQueryGetTimeseries($start, $end, $interval, $columns, $order, $format);
65
-        $query = empty($query) ? $query : ('?' . $query);
66
-        $response = $this->client->getBaseClient()->get('/markets/' . strtolower($assetKey) . '/metrics/'
67
-            . $metricID . '/time-series' . $query);
65
+        $query = empty($query) ? $query : ('?'.$query);
66
+        $response = $this->client->getBaseClient()->get('/markets/'.strtolower($assetKey).'/metrics/'
67
+            . $metricID.'/time-series'.$query);
68 68
 
69 69
         return $this->transformer->transform($response);
70 70
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     ): string {
89 89
         $data = compact('start', 'end', 'interval', 'columns', 'order', 'format');
90 90
 
91
-        $params = array_filter($data, function ($value) {
91
+        $params = array_filter($data, function($value) {
92 92
             return !is_null($value);
93 93
         });
94 94
 
Please login to merge, or discard this patch.
src/Api/News.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function getAll(?int $page = null, ?string $fields = null): array
23 23
     {
24
-        $params = array_filter(compact('fields', 'page'), function ($value) {
24
+        $params = array_filter(compact('fields', 'page'), function($value) {
25 25
             return !is_null($value);
26 26
         });
27 27
 
28 28
         $query = http_build_query($params);
29
-        $query = empty($query) ? $query : ('?' . $query);
30
-        $response = $this->client->getBaseClient()->get('/news' . $query);
29
+        $query = empty($query) ? $query : ('?'.$query);
30
+        $response = $this->client->getBaseClient()->get('/news'.$query);
31 31
 
32 32
         return $this->transformer->transform($response);
33 33
     }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
             $params['as_markdown'] = $asMarkdown;
53 53
         }
54 54
 
55
-        $query = empty($params) ? '' : ('?' . http_build_query($params));
56
-        $response = $this->client->getBaseClient()->get('/news/' . strtolower($assetKey) . $query);
55
+        $query = empty($params) ? '' : ('?'.http_build_query($params));
56
+        $response = $this->client->getBaseClient()->get('/news/'.strtolower($assetKey).$query);
57 57
 
58 58
         return $this->transformer->transform($response);
59 59
     }
Please login to merge, or discard this patch.
src/Api/Assets.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         ?int $limit = null
36 36
     ): array {
37 37
         $query = $this->buildQueryGetAll($withMetrics, $withProfiles, $fields, $sort, $page, $limit);
38
-        $endpoint = empty($query) ? '/assets' : '/assets?' . $query;
38
+        $endpoint = empty($query) ? '/assets' : '/assets?'.$query;
39 39
         $response = $this->client->getBaseClient()->get($endpoint);
40 40
 
41 41
         return $this->transformer->transform($response);
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function get(string $assetKey, ?string $fields = null): array
53 53
     {
54
-        $query = is_null($fields) ? '' : '?' . http_build_query(compact($fields));
55
-        $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . $query);
54
+        $query = is_null($fields) ? '' : '?'.http_build_query(compact($fields));
55
+        $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).$query);
56 56
 
57 57
         return $this->transformer->transform($response);
58 58
     }
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getProfile(string $assetKey, ?string $fields = null): array
69 69
     {
70
-        $query = is_null($fields) ? '' : '?' . http_build_query(compact($fields));
71
-        $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/profile' . $query);
70
+        $query = is_null($fields) ? '' : '?'.http_build_query(compact($fields));
71
+        $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/profile'.$query);
72 72
 
73 73
         return $this->transformer->transform($response);
74 74
     }
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getMetrics(string $assetKey, ?string $fields = null): array
85 85
     {
86
-        $query = is_null($fields) ? '' : '?' . http_build_query(compact($fields));
87
-        $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/metrics' . $query);
86
+        $query = is_null($fields) ? '' : '?'.http_build_query(compact($fields));
87
+        $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/metrics'.$query);
88 88
 
89 89
         return $this->transformer->transform($response);
90 90
     }
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function getMarketData(string $assetKey, ?string $fields = null): array
102 102
     {
103
-        $query = is_null($fields) ? '' : '?' . http_build_query(compact($fields));
104
-        $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/metrics'
105
-            . '/market-data' . $query);
103
+        $query = is_null($fields) ? '' : '?'.http_build_query(compact($fields));
104
+        $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/metrics'
105
+            . '/market-data'.$query);
106 106
 
107 107
         return $this->transformer->transform($response);
108 108
     }
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
         ?string $format = null
138 138
     ): array {
139 139
         $query = $this->buildQueryGetTimeseries($start, $end, $interval, $columns, $order, $format);
140
-        $query = empty($query) ? $query : ('?' . $query);
141
-        $response = $this->client->getBaseClient()->get('/assets/' . strtolower($assetKey) . '/metrics/'
142
-        . $metricID . '/time-series' . $query);
140
+        $query = empty($query) ? $query : ('?'.$query);
141
+        $response = $this->client->getBaseClient()->get('/assets/'.strtolower($assetKey).'/metrics/'
142
+        . $metricID.'/time-series'.$query);
143 143
 
144 144
         return $this->transformer->transform($response);
145 145
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             $data['with-profiles'] = '';
170 170
         }
171 171
 
172
-        $params = array_filter($data, function ($value) {
172
+        $params = array_filter($data, function($value) {
173 173
             return !is_null($value);
174 174
         });
175 175
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     ): string {
196 196
         $data = compact('start', 'end', 'interval', 'columns', 'order', 'format');
197 197
 
198
-        $params = array_filter($data, function ($value) {
198
+        $params = array_filter($data, function($value) {
199 199
             return !is_null($value);
200 200
         });
201 201
 
Please login to merge, or discard this patch.