Passed
Branch master (2c4e07)
by Marcin
03:58
created
src/ExceptionHandlerHelper.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	 * @return HttpResponse
108 108
 	 */
109 109
 	protected static function error(Exception $exception, $exception_type, $default_api_code,
110
-	                                $default_http_code = ResponseBuilder::DEFAULT_HTTP_CODE_ERROR): HttpResponse
110
+									$default_http_code = ResponseBuilder::DEFAULT_HTTP_CODE_ERROR): HttpResponse
111 111
 	{
112 112
 		// common prefix for config key
113 113
 		$base_config = 'response_builder.exception_handler.exception';
Please login to merge, or discard this patch.
src/ResponseBuilder.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			}
107 107
 
108 108
 			$mandatory_keys = [static::KEY_KEY,
109
-			                   static::KEY_METHOD,
109
+							   static::KEY_METHOD,
110 110
 			];
111 111
 			foreach ($classes as $class_name => $class_config) {
112 112
 				foreach ($mandatory_keys as $key_name) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @throws \RuntimeException in case of missing or invalid "classes" mapping configuration
163 163
 	 */
164 164
 	protected static function buildResponse(bool $success, int $api_code, string $message, $data = null,
165
-	                                        array $debug_data = null): array
165
+											array $debug_data = null): array
166 166
 	{
167 167
 		// ensure data is serialized as object, not plain array, regardless what we are provided as argument
168 168
 		if ($data !== null) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @return HttpResponse
217 217
 	 */
218 218
 	public static function success($data = null, $api_code = null, array $lang_args = null,
219
-	                               int $http_code = null, int $encoding_options = null): HttpResponse
219
+								   int $http_code = null, int $encoding_options = null): HttpResponse
220 220
 	{
221 221
 		return static::buildSuccessResponse($data, $api_code, $lang_args, $http_code, $encoding_options);
222 222
 	}
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 * @throws \InvalidArgumentException Thrown when provided arguments are invalid.
262 262
 	 */
263 263
 	protected static function buildSuccessResponse($data = null, int $api_code = null, array $lang_args = null,
264
-	                                               int $http_code = null, int $encoding_options = null): HttpResponse
264
+												   int $http_code = null, int $encoding_options = null): HttpResponse
265 265
 	{
266 266
 		$http_code = $http_code ?? static::DEFAULT_HTTP_CODE_OK;
267 267
 		$api_code = $api_code ?? BaseApiCodes::OK();
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * @return HttpResponse
288 288
 	 */
289 289
 	public static function error(int $api_code, array $lang_args = null, $data = null, int $http_code = null,
290
-	                             int $encoding_options = null): HttpResponse
290
+								 int $encoding_options = null): HttpResponse
291 291
 	{
292 292
 		return static::buildErrorResponse($data, $api_code, $http_code, $lang_args, $encoding_options);
293 293
 	}
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 * @return HttpResponse
302 302
 	 */
303 303
 	public static function errorWithData(int $api_code, $data, array $lang_args = null,
304
-	                                     int $encoding_options = null): HttpResponse
304
+										 int $encoding_options = null): HttpResponse
305 305
 	{
306 306
 		return static::buildErrorResponse($data, $api_code, null, $lang_args, $encoding_options);
307 307
 	}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	 * @throws \InvalidArgumentException if http_code is @null
319 319
 	 */
320 320
 	public static function errorWithDataAndHttpCode(int $api_code, $data, int $http_code, array $lang_args = null,
321
-	                                                int $encoding_options = null): HttpResponse
321
+													int $encoding_options = null): HttpResponse
322 322
 	{
323 323
 		return static::buildErrorResponse($data, $api_code, $http_code, $lang_args, $encoding_options);
324 324
 	}
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 	 * @return HttpResponse
348 348
 	 */
349 349
 	public static function errorWithMessageAndData(int $api_code, string $error_message, $data,
350
-	                                               int $http_code = null, int $encoding_options = null): HttpResponse
350
+												   int $http_code = null, int $encoding_options = null): HttpResponse
351 351
 	{
352 352
 		return static::buildErrorResponse($data, $api_code, $http_code, null,
353 353
 			$error_message, null, $encoding_options);
@@ -364,8 +364,8 @@  discard block
 block discarded – undo
364 364
 	 * @return HttpResponse
365 365
 	 */
366 366
 	public static function errorWithMessageAndDataAndDebug(int $api_code, string $error_message, $data,
367
-	                                                       int $http_code = null, int $encoding_options = null,
368
-	                                                       array $debug_data = null): HttpResponse
367
+														   int $http_code = null, int $encoding_options = null,
368
+														   array $debug_data = null): HttpResponse
369 369
 	{
370 370
 		return static::buildErrorResponse($data, $api_code, $http_code, null,
371 371
 			$error_message, null, $encoding_options, $debug_data);
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 	 * @noinspection MoreThanThreeArgumentsInspection
405 405
 	 */
406 406
 	protected static function buildErrorResponse($data, int $api_code, int $http_code = null, array $lang_args = null,
407
-	                                             string $message = null, array $headers = null, int $encoding_options = null,
408
-	                                             array $debug_data = null): HttpResponse
407
+												 string $message = null, array $headers = null, int $encoding_options = null,
408
+												 array $debug_data = null): HttpResponse
409 409
 	{
410 410
 		$http_code = $http_code ?? static::DEFAULT_HTTP_CODE_ERROR;
411 411
 		$headers = $headers ?? [];
@@ -444,8 +444,8 @@  discard block
 block discarded – undo
444 444
 	 * @noinspection MoreThanThreeArgumentsInspection
445 445
 	 */
446 446
 	protected static function make(bool $success, int $api_code, $message_or_api_code, $data = null,
447
-	                               int $http_code = null, array $lang_args = null, array $headers = null,
448
-	                               int $encoding_options = null, array $debug_data = null): HttpResponse
447
+								   int $http_code = null, array $lang_args = null, array $headers = null,
448
+								   int $encoding_options = null, array $debug_data = null): HttpResponse
449 449
 	{
450 450
 		$headers = $headers ?? [];
451 451
 		$http_code = $http_code ?? ($success ? static::DEFAULT_HTTP_CODE_OK : static::DEFAULT_HTTP_CODE_ERROR);
Please login to merge, or discard this patch.