@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @throws Ex\NotIntegerException |
93 | 93 | */ |
94 | 94 | public static function success($data = null, int $api_code = null, array $placeholders = null, |
95 | - int $http_code = null, int $json_opts = null): HttpResponse |
|
95 | + int $http_code = null, int $json_opts = null): HttpResponse |
|
96 | 96 | { |
97 | 97 | return static::asSuccess($api_code) |
98 | 98 | ->withData($data) |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @throws Ex\NotIntegerException |
128 | 128 | */ |
129 | 129 | public static function error(int $api_code, array $placeholders = null, $data = null, int $http_code = null, |
130 | - int $json_opts = null): HttpResponse |
|
130 | + int $json_opts = null): HttpResponse |
|
131 | 131 | { |
132 | 132 | return static::asError($api_code) |
133 | 133 | ->withPlaceholders($placeholders) |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | public function withJsonOptions(int $json_opts = null): self |
230 | 230 | { |
231 | 231 | Validator::assertIsType('json_opts', $json_opts, [Type::INTEGER, |
232 | - Type::NULL]); |
|
232 | + Type::NULL]); |
|
233 | 233 | $this->json_opts = $json_opts; |
234 | 234 | |
235 | 235 | return $this; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | public function withDebugData(array $debug_data = null): self |
246 | 246 | { |
247 | 247 | Validator::assertIsType('$debug_data', $debug_data, [Type::ARRAY, |
248 | - Type::NULL]); |
|
248 | + Type::NULL]); |
|
249 | 249 | $this->debug_data = $debug_data; |
250 | 250 | |
251 | 251 | return $this; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | public function withMessage(string $msg = null): self |
262 | 262 | { |
263 | 263 | Validator::assertIsType('message', $msg, [Type::STRING, |
264 | - Type::NULL]); |
|
264 | + Type::NULL]); |
|
265 | 265 | $this->message = $msg; |
266 | 266 | |
267 | 267 | return $this; |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | * @noinspection PhpTooManyParametersInspection |
361 | 361 | */ |
362 | 362 | protected function make(bool $success, int $api_code, $msg_or_api_code, $data = null, |
363 | - int $http_code = null, array $placeholders = null, array $http_headers = null, |
|
364 | - int $json_opts = null, array $debug_data = null): HttpResponse |
|
363 | + int $http_code = null, array $placeholders = null, array $http_headers = null, |
|
364 | + int $json_opts = null, array $debug_data = null): HttpResponse |
|
365 | 365 | { |
366 | 366 | $http_headers = $http_headers ?? []; |
367 | 367 | $http_code = $http_code ?? ($success ? RB::DEFAULT_HTTP_CODE_OK : RB::DEFAULT_HTTP_CODE_ERROR); |
@@ -405,8 +405,8 @@ discard block |
||
405 | 405 | * @noinspection PhpTooManyParametersInspection |
406 | 406 | */ |
407 | 407 | protected function buildResponse(bool $success, int $api_code, |
408 | - $msg_or_api_code, array $placeholders = null, |
|
409 | - $data = null, array $debug_data = null): array |
|
408 | + $msg_or_api_code, array $placeholders = null, |
|
409 | + $data = null, array $debug_data = null): array |
|
410 | 410 | { |
411 | 411 | // ensure $data is either @null, array or object of class with configured mapping. |
412 | 412 | $data = (new Converter())->convert($data); |