@@ -10,21 +10,21 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function status(): int |
| 12 | 12 | { |
| 13 | - return (int)$this->getResponseAttribute('status'); |
|
| 13 | + return (int) $this->getResponseAttribute('status'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function todaysAccuracy(): float |
| 17 | 17 | { |
| 18 | - return (float)$this->getResponseAttribute('todays_accuracy'); |
|
| 18 | + return (float) $this->getResponseAttribute('todays_accuracy'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function solvedIn(): int |
| 22 | 22 | { |
| 23 | - return (int)$this->getResponseAttribute('solved_in'); |
|
| 23 | + return (int) $this->getResponseAttribute('solved_in'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function isServiceOverloaded(): bool |
| 27 | 27 | { |
| 28 | - return (bool)$this->getResponseAttribute('is_service_overloaded'); |
|
| 28 | + return (bool) $this->getResponseAttribute('is_service_overloaded'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -10,16 +10,16 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function isCorrect(): bool |
| 12 | 12 | { |
| 13 | - return (bool)$this->getResponseAttribute('is_correct'); |
|
| 13 | + return (bool) $this->getResponseAttribute('is_correct'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function text(): string |
| 17 | 17 | { |
| 18 | - return (string)$this->getResponseAttribute('text'); |
|
| 18 | + return (string) $this->getResponseAttribute('text'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function status(): int |
| 22 | 22 | { |
| 23 | - return (int)$this->getResponseAttribute('status'); |
|
| 23 | + return (int) $this->getResponseAttribute('status'); |
|
| 24 | 24 | } |
| 25 | 25 | } |
@@ -10,26 +10,26 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function isBanned(): bool |
| 12 | 12 | { |
| 13 | - return (bool)$this->getResponseAttribute('is_banned'); |
|
| 13 | + return (bool) $this->getResponseAttribute('is_banned'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function getStatus(): int |
| 17 | 17 | { |
| 18 | - return (int)$this->getResponseAttribute('status'); |
|
| 18 | + return (int) $this->getResponseAttribute('status'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function getRate(): int |
| 22 | 22 | { |
| 23 | - return (int)$this->getResponseAttribute('rate'); |
|
| 23 | + return (int) $this->getResponseAttribute('rate'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function getBalance(): float |
| 27 | 27 | { |
| 28 | - return (double)$this->getResponseAttribute('balance'); |
|
| 28 | + return (double) $this->getResponseAttribute('balance'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function getUser(): int |
| 32 | 32 | { |
| 33 | - return (int)$this->getResponseAttribute('user'); |
|
| 33 | + return (int) $this->getResponseAttribute('user'); |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $options = array_merge(['query' => $query], $this->getClientOptions($headers)); |
| 65 | 65 | |
| 66 | - $response = $this->request('GET', static::API_URL . $path, $options); |
|
| 66 | + $response = $this->request('GET', static::API_URL.$path, $options); |
|
| 67 | 67 | |
| 68 | 68 | return $response; |
| 69 | 69 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $headers = $this->getHeadersForClientRequest($headers); |
| 82 | 82 | |
| 83 | 83 | $options = array_merge(['form_params' => $query], $this->getClientOptions($headers)); |
| 84 | - $response = $this->request('POST', static::API_URL . $path, $options); |
|
| 84 | + $response = $this->request('POST', static::API_URL.$path, $options); |
|
| 85 | 85 | |
| 86 | 86 | return $response; |
| 87 | 87 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | { |
| 12 | 12 | public function setResponse(ResponseInterface $response) |
| 13 | 13 | { |
| 14 | - $bodyResponse = (string)$response->getBody(); |
|
| 14 | + $bodyResponse = (string) $response->getBody(); |
|
| 15 | 15 | |
| 16 | 16 | $this->objectResponse = json_decode(rtrim($bodyResponse)); |
| 17 | 17 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function getResponse(): \StdClass |
| 22 | 22 | { |
| 23 | - return (object)$this->objectResponse; |
|
| 23 | + return (object) $this->objectResponse; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function getResponseAttribute(string $attribute) |
@@ -34,6 +34,6 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function toArray(): array |
| 36 | 36 | { |
| 37 | - return (array)$this->getResponse(); |
|
| 37 | + return (array) $this->getResponse(); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | // accept de json, técnicamente deverá retornar |
| 61 | 61 | // o content type como json |
| 62 | 62 | // mas... nunca se sabe, né? |
| 63 | - if (($contentType !== $this->contentTypeOk) or (empty((string)$response->getBody()))) { |
|
| 63 | + if (($contentType !== $this->contentTypeOk) or (empty((string) $response->getBody()))) { |
|
| 64 | 64 | throw new InvalidServiceResponseException; |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $img = Image::make($content)->encode('data-url'); |
| 16 | 16 | $base64 = substr($img->encoded, 22); |
| 17 | 17 | |
| 18 | - return 'base64:' . $base64; |
|
| 18 | + return 'base64:'.$base64; |
|
| 19 | 19 | } catch (ImageException $e) { |
| 20 | 20 | throw new InvalidCaptchaException; |
| 21 | 21 | } |
@@ -10,21 +10,21 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function isCorrect(): bool |
| 12 | 12 | { |
| 13 | - return (bool)$this->getResponseAttribute('is_correct'); |
|
| 13 | + return (bool) $this->getResponseAttribute('is_correct'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function text(): string |
| 17 | 17 | { |
| 18 | - return (string)$this->getResponseAttribute('text'); |
|
| 18 | + return (string) $this->getResponseAttribute('text'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function status(): int |
| 22 | 22 | { |
| 23 | - return (int)$this->getResponseAttribute('status'); |
|
| 23 | + return (int) $this->getResponseAttribute('status'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function captchaId(): int |
| 27 | 27 | { |
| 28 | - return (int)$this->getResponseAttribute('captcha'); |
|
| 28 | + return (int) $this->getResponseAttribute('captcha'); |
|
| 29 | 29 | } |
| 30 | 30 | } |