@@ -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 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | try { |
15 | 15 | $image = Image::make($content); |
16 | 16 | |
17 | - return (string)$image->encode(); |
|
17 | + return (string) $image->encode(); |
|
18 | 18 | } catch (ImageException $e) { |
19 | 19 | throw new InvalidCaptchaException; |
20 | 20 | } |
@@ -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 | } |
@@ -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 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | // accept de json, técnicamente deverá retornar |
37 | 37 | // o content type como json |
38 | 38 | // mas... nunca se sabe, né? |
39 | - if (($contentType !== $this->contentTypeOk) or (empty((string)$response->getBody()))) { |
|
39 | + if (($contentType !== $this->contentTypeOk) or (empty((string) $response->getBody()))) { |
|
40 | 40 | throw new InvalidServiceResponseException; |
41 | 41 | } |
42 | 42 |
@@ -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 | } |