@@ -51,8 +51,7 @@ discard block |
||
51 | 51 | return new Mutator( |
52 | 52 | null, |
53 | 53 | fn($value, $ctx) => |
54 | - is_null($value) ? $value : |
|
55 | - ( |
|
54 | + is_null($value) ? $value : ( |
|
56 | 55 | Assert::value(floatval($value))->gte(0)->get() |
57 | 56 | ?? $ctx->raise('inválido') |
58 | 57 | ) |
@@ -64,8 +63,7 @@ discard block |
||
64 | 63 | return new Mutator( |
65 | 64 | null, |
66 | 65 | fn($value, $ctx) => |
67 | - is_null($value) ? $value : |
|
68 | - ( |
|
66 | + is_null($value) ? $value : ( |
|
69 | 67 | Assert::value(floatval($value))->gte(0)->get() |
70 | 68 | ?? $ctx->raise('inválido') |
71 | 69 | ) |
@@ -77,8 +75,7 @@ discard block |
||
77 | 75 | return new Mutator( |
78 | 76 | null, |
79 | 77 | fn($value, $ctx) => |
80 | - is_null($value) ? $value : |
|
81 | - ( |
|
78 | + is_null($value) ? $value : ( |
|
82 | 79 | Assert::value(floatval($value))->gte(0)->get() |
83 | 80 | ?? $ctx->raise('inválido') |
84 | 81 | ) |
@@ -79,10 +79,8 @@ |
||
79 | 79 | null, |
80 | 80 | fn($value, $ctx) => |
81 | 81 | is_null($value) ? |
82 | - $value : |
|
83 | - ( |
|
84 | - is_numeric($value) ? strval($value) : |
|
85 | - $ctx->raise('inválido') |
|
82 | + $value : ( |
|
83 | + is_numeric($value) ? strval($value) : $ctx->raise('inválido') |
|
86 | 84 | ) |
87 | 85 | ); |
88 | 86 | } |
@@ -194,6 +194,6 @@ |
||
194 | 194 | |
195 | 195 | private function incrementRequestCounter(): int |
196 | 196 | { |
197 | - return ++self::$requestCounter; |
|
197 | + return++self::$requestCounter; |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | \ No newline at end of file |
@@ -128,21 +128,25 @@ |
||
128 | 128 | { |
129 | 129 | $responseData = $response->getParsedPath('message'); |
130 | 130 | |
131 | - if (is_string($responseData)) |
|
132 | - return [$responseData]; |
|
131 | + if (is_string($responseData)) { |
|
132 | + return [$responseData]; |
|
133 | + } |
|
133 | 134 | |
134 | - if (is_array($responseData)) |
|
135 | - return ArrayUtil::extractStrings($responseData); |
|
135 | + if (is_array($responseData)) { |
|
136 | + return ArrayUtil::extractStrings($responseData); |
|
137 | + } |
|
136 | 138 | |
137 | 139 | $responseData = $response->getParsedPath('error'); |
138 | 140 | |
139 | - if (is_array($responseData)) |
|
140 | - return ArrayUtil::extractStrings($responseData); |
|
141 | + if (is_array($responseData)) { |
|
142 | + return ArrayUtil::extractStrings($responseData); |
|
143 | + } |
|
141 | 144 | |
142 | 145 | $responseData = $response->getParsedPath('data'); |
143 | 146 | |
144 | - if (is_array($responseData)) |
|
145 | - return ArrayUtil::extractStrings($responseData); |
|
147 | + if (is_array($responseData)) { |
|
148 | + return ArrayUtil::extractStrings($responseData); |
|
149 | + } |
|
146 | 150 | } |
147 | 151 | |
148 | 152 | } |
149 | 153 | \ No newline at end of file |
@@ -13,8 +13,9 @@ |
||
13 | 13 | |
14 | 14 | public function __construct(string $environment) |
15 | 15 | { |
16 | - if (!$this->isValidEnv($environment)) |
|
17 | - throw new \UnexpectedValueException("The environment must be valid"); |
|
16 | + if (!$this->isValidEnv($environment)) { |
|
17 | + throw new \UnexpectedValueException("The environment must be valid"); |
|
18 | + } |
|
18 | 19 | |
19 | 20 | parent::__construct($environment); |
20 | 21 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * @param array|null $filters |
58 | 58 | * @return Response |
59 | 59 | */ |
60 | - public function list(?array $filters = []): Response |
|
60 | + public function list(?array $filters = []) : Response |
|
61 | 61 | { |
62 | 62 | return $this->_GET($filters ?? []); |
63 | 63 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * @param array|null $filters |
58 | 58 | * @return Response |
59 | 59 | */ |
60 | - public function list(?array $filters = []): Response |
|
60 | + public function list(?array $filters = []) : Response |
|
61 | 61 | { |
62 | 62 | return $this->_GET($filters ?? []); |
63 | 63 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * @param array|null $filters |
58 | 58 | * @return Response |
59 | 59 | */ |
60 | - public function list(?array $filters = []): Response |
|
60 | + public function list(?array $filters = []) : Response |
|
61 | 61 | { |
62 | 62 | return $this->_GET($filters ?? []); |
63 | 63 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | return new Mutator( |
40 | 40 | null, |
41 | - function ($value, $ctx) { |
|
41 | + function($value, $ctx) { |
|
42 | 42 | $d = \DateTime::createFromFormat('Y-m-d', $value); |
43 | 43 | |
44 | 44 | return is_null($value) || |