@@ -190,20 +190,20 @@ |
||
190 | 190 | $t = $this->getItems(1); |
191 | 191 | $c = $this->count(); |
192 | 192 | |
193 | - return (function () use ($t, $c) { |
|
193 | + return (function() use ($t, $c) { |
|
194 | 194 | $i = 0; |
195 | 195 | $x = 0; |
196 | 196 | |
197 | 197 | while ($i < $c) { |
198 | 198 | if ($x === 0) { |
199 | 199 | $x = $this->_page_length; |
200 | - $t = $this->getItems(floor($i / $this->_page_length) + 1); |
|
200 | + $t = $this->getItems(floor($i / $this->_page_length)+1); |
|
201 | 201 | } |
202 | 202 | |
203 | - yield $i => $t[$this->_page_length - $x]; |
|
203 | + yield $i => $t[$this->_page_length-$x]; |
|
204 | 204 | |
205 | 205 | $x -= 1; |
206 | - $i ++; |
|
206 | + $i++; |
|
207 | 207 | } |
208 | 208 | })(); |
209 | 209 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function save(): ?Model |
45 | 45 | { |
46 | - return $this->curl_for_model($this->getSaveURL(),'POST', $this->toArray()); |
|
46 | + return $this->curl_for_model($this->getSaveURL(), 'POST', $this->toArray()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | throw new InvalidArgumentException("Address::fetch() expects parameter 1 to be a positive integer"); |
45 | 45 | } |
46 | 46 | |
47 | - return $this->curl_for_model('api/addresses/address/' . $id); |
|
47 | + return $this->curl_for_model('api/addresses/address/'.$id); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -70,6 +70,6 @@ discard block |
||
70 | 70 | */ |
71 | 71 | protected function getSaveURL(): string |
72 | 72 | { |
73 | - return 'api/addresses/address/' . $this->ID; |
|
73 | + return 'api/addresses/address/'.$this->ID; |
|
74 | 74 | } |
75 | 75 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function curl_api(string $url, string $method = 'GET', array $data = [], array $headers = []): CurlResponse |
108 | 108 | { |
109 | 109 | $url = URL::is_absolute_url($url) ? $url |
110 | - : 'https://' . rtrim($this->_host, '/') . '/' . ltrim($url, '/'); |
|
110 | + : 'https://'.rtrim($this->_host, '/').'/'.ltrim($url, '/'); |
|
111 | 111 | |
112 | 112 | $curl = new Curl($url, $data, $headers); |
113 | 113 | |
@@ -126,6 +126,6 @@ discard block |
||
126 | 126 | */ |
127 | 127 | protected function auth_url(string $path): string |
128 | 128 | { |
129 | - return $this->_auth_domain . '/' . ltrim($path, '/'); |
|
129 | + return $this->_auth_domain.'/'.ltrim($path, '/'); |
|
130 | 130 | } |
131 | 131 | } |