Passed
Pull Request — master (#204)
by Marcin
07:42
created
src/ExceptionHandlers/HttpExceptionHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@
 block discarded – undo
47 47
 
48 48
 		/** @var \Symfony\Component\HttpKernel\Exception\HttpException $ex */
49 49
 		$http_code = $ex->getStatusCode();
50
-		$result = $config[ $http_code ] ?? null;
50
+		$result = $config[$http_code] ?? null;
51 51
 
52 52
 		// If we do not have dedicated entry fort this particular http_code,
53 53
 		// fall back to default value.
54 54
 		if ($result === null) {
55
-			$result = $config[ RB::KEY_DEFAULT ];
55
+			$result = $config[RB::KEY_DEFAULT];
56 56
 		}
57 57
 
58 58
 		// Some defaults to fall back to if not set in user config.
Please login to merge, or discard this patch.
src/ExceptionHandlerHelper.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 		do {
58 58
 			if ($cfg === null) {
59 59
 				// Default handler MUST be present by design and always return something useful.
60
-				$cfg = self::getExceptionHandlerConfig()[ RB::KEY_DEFAULT ];
60
+				$cfg = self::getExceptionHandlerConfig()[RB::KEY_DEFAULT];
61 61
 			}
62 62
 
63
-			$handler = new $cfg[ RB::KEY_HANDLER ]();
64
-			$handler_result = $handler->handle($cfg[ RB::KEY_CONFIG ], $ex);
63
+			$handler = new $cfg[RB::KEY_HANDLER]();
64
+			$handler_result = $handler->handle($cfg[RB::KEY_CONFIG], $ex);
65 65
 			if ($handler_result !== null) {
66 66
 				$result = self::processException($ex, $handler_result);
67 67
 			} else {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		$cfg = self::getExceptionHandlerConfig();
186 186
 
187 187
 		// This config entry is guaranted to exist. Enforced by tests.
188
-		$cfg = $cfg[ HttpException::class ][ RB::KEY_CONFIG ][ HttpResponse::HTTP_UNAUTHORIZED ];
188
+		$cfg = $cfg[HttpException::class][RB::KEY_CONFIG][HttpResponse::HTTP_UNAUTHORIZED];
189 189
 
190 190
 		/**
191 191
 		 * NOTE: no typehint due to compatibility with Laravel signature.
@@ -329,14 +329,14 @@  discard block
 block discarded – undo
329 329
 
330 330
 			// check for exact class name match...
331 331
 			if (\array_key_exists($cls, $cfg)) {
332
-				$result = $cfg[ $cls ];
332
+				$result = $cfg[$cls];
333 333
 			} else {
334 334
 				// no exact match, then lets try with `instanceof`
335 335
 				// Config entries are already sorted by priority.
336 336
 				foreach (\array_keys($cfg) as $class_name) {
337 337
 					/** @var string $class_name */
338 338
 					if ($ex instanceof $class_name) {
339
-						$result = $cfg[ $class_name ];
339
+						$result = $cfg[$class_name];
340 340
 						break;
341 341
 					}
342 342
 				}
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * @throws Ex\ArrayWithMixedKeysException
98 98
 	 */
99 99
 	protected static function processException(\Throwable $ex, array $ex_cfg,
100
-	                                           int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR)
100
+											   int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR)
101 101
 	{
102 102
 		$api_code = $ex_cfg['api_code'];
103 103
 		$http_code = $ex_cfg['http_code'] ?? $fallback_http_code;
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 * @noinspection PhpMissingParamTypeInspection
196 196
 	 */
197 197
 	protected function unauthenticated(/** @scrutinizer ignore-unused */ $request,
198
-	                                                                     AuthException $exception): HttpResponse
198
+																		 AuthException $exception): HttpResponse
199 199
 	{
200 200
 		$cfg = self::getExceptionHandlerConfig();
201 201
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * @throws Ex\NotIntegerException
228 228
 	 */
229 229
 	protected static function error(Throwable $ex,
230
-	                                int $api_code, int $http_code = null, string $error_message = null): HttpResponse
230
+									int $api_code, int $http_code = null, string $error_message = null): HttpResponse
231 231
 	{
232 232
 		$ex_http_code = ($ex instanceof HttpException) ? $ex->getStatusCode() : $ex->getCode();
233 233
 		$http_code = $http_code ?? $ex_http_code;
Please login to merge, or discard this patch.
src/ResponseBuilder.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
 		$data = (new Converter())->convert($data);
392 392
 		if ($data !== null) {
393 393
 			// ensure we get object in final JSON structure in data node
394
-			$data = (object)$data;
394
+			$data = (object) $data;
395 395
 		}
396 396
 
397 397
 		if ($data === null && Config::get(RB::CONF_KEY_DATA_ALWAYS_OBJECT, false)) {
398
-			$data = (object)[];
398
+			$data = (object) [];
399 399
 		}
400 400
 
401 401
 		// get human readable message for API code or use message string (if given instead of API code)
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 
418 418
 		if ($debug_data !== null) {
419 419
 			$debug_key = Config::get(RB::CONF_KEY_DEBUG_DEBUG_KEY, RB::KEY_DEBUG);
420
-			$response[ $debug_key ] = $debug_data;
420
+			$response[$debug_key] = $debug_data;
421 421
 		}
422 422
 
423 423
 		return $response;
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Converters/JsonSerializableConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
 			$encoded = '';
44 44
 		}
45 45
 
46
-		return [$config[ RB::KEY_KEY ] => \json_decode($encoded, true)];
46
+		return [$config[RB::KEY_KEY] => \json_decode($encoded, true)];
47 47
 	}
48 48
 }
Please login to merge, or discard this patch.
src/Validator.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 	 * @throws Ex\InvalidTypeException
162 162
 	 */
163 163
 	public static function assertIsType(string $var_name, $value, array $allowed_types,
164
-	                                    string $ex_class = Ex\InvalidTypeException::class): void
164
+										string $ex_class = Ex\InvalidTypeException::class): void
165 165
 	{
166 166
 		// Type::EXISTING_CLASS is artificial type, so we need separate logic to handle it.
167 167
 		$tmp = $allowed_types;
Please login to merge, or discard this patch.
src/BaseApiCodes.php 1 patch
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -22,72 +22,72 @@  discard block
 block discarded – undo
22 22
  */
23 23
 class BaseApiCodes
24 24
 {
25
-    use ApiCodesHelpers;
26
-
27
-    /**
28
-     * protected code range - lowest code for reserved range.
29
-     *
30
-     * @var int
31
-     */
32
-    public const RESERVED_MIN_API_CODE_OFFSET = 0;
33
-
34
-    /**
35
-     * protected code range - highest code for reserved range
36
-     *
37
-     * @var int
38
-     */
39
-    public const RESERVED_MAX_API_CODE_OFFSET = 19;
40
-
41
-    /**
42
-     * built-in codes: OK
43
-     *
44
-     * @var int
45
-     */
46
-    protected const OK_OFFSET = 0;
47
-    /**
48
-     * built-in code for fallback message mapping
49
-     *
50
-     * @var int
51
-     */
52
-    protected const NO_ERROR_MESSAGE_OFFSET = 1;
53
-    /**
54
-     * built-in error code for HTTP_NOT_FOUND exception
55
-     *
56
-     * @var int
57
-     */
58
-    protected const EX_HTTP_NOT_FOUND_OFFSET = 10;
59
-    /**
60
-     * built-in error code for HTTP_SERVICE_UNAVAILABLE exception
61
-     *
62
-     * @var int
63
-     */
64
-    protected const EX_HTTP_SERVICE_UNAVAILABLE_OFFSET = 11;
65
-    /**
66
-     * built-in error code for HTTP_EXCEPTION
67
-     *
68
-     * @var int
69
-     */
70
-    protected const EX_HTTP_EXCEPTION_OFFSET = 12;
71
-    /**
72
-     * built-in error code for UNCAUGHT_EXCEPTION
73
-     *
74
-     * @var int
75
-     */
76
-    protected const EX_UNCAUGHT_EXCEPTION_OFFSET = 13;
77
-
78
-    /**
79
-     * built-in error code for \Illuminate\Auth\AuthenticationException
80
-     *
81
-     * @var int
82
-     */
83
-    protected const EX_AUTHENTICATION_EXCEPTION_OFFSET = 14;
84
-
85
-    /**
86
-     * built-in error code for \Illuminate\Auth\AuthenticationException
87
-     *
88
-     * @var int
89
-     */
90
-    protected const EX_VALIDATION_EXCEPTION_OFFSET = 15;
25
+	use ApiCodesHelpers;
26
+
27
+	/**
28
+	 * protected code range - lowest code for reserved range.
29
+	 *
30
+	 * @var int
31
+	 */
32
+	public const RESERVED_MIN_API_CODE_OFFSET = 0;
33
+
34
+	/**
35
+	 * protected code range - highest code for reserved range
36
+	 *
37
+	 * @var int
38
+	 */
39
+	public const RESERVED_MAX_API_CODE_OFFSET = 19;
40
+
41
+	/**
42
+	 * built-in codes: OK
43
+	 *
44
+	 * @var int
45
+	 */
46
+	protected const OK_OFFSET = 0;
47
+	/**
48
+	 * built-in code for fallback message mapping
49
+	 *
50
+	 * @var int
51
+	 */
52
+	protected const NO_ERROR_MESSAGE_OFFSET = 1;
53
+	/**
54
+	 * built-in error code for HTTP_NOT_FOUND exception
55
+	 *
56
+	 * @var int
57
+	 */
58
+	protected const EX_HTTP_NOT_FOUND_OFFSET = 10;
59
+	/**
60
+	 * built-in error code for HTTP_SERVICE_UNAVAILABLE exception
61
+	 *
62
+	 * @var int
63
+	 */
64
+	protected const EX_HTTP_SERVICE_UNAVAILABLE_OFFSET = 11;
65
+	/**
66
+	 * built-in error code for HTTP_EXCEPTION
67
+	 *
68
+	 * @var int
69
+	 */
70
+	protected const EX_HTTP_EXCEPTION_OFFSET = 12;
71
+	/**
72
+	 * built-in error code for UNCAUGHT_EXCEPTION
73
+	 *
74
+	 * @var int
75
+	 */
76
+	protected const EX_UNCAUGHT_EXCEPTION_OFFSET = 13;
77
+
78
+	/**
79
+	 * built-in error code for \Illuminate\Auth\AuthenticationException
80
+	 *
81
+	 * @var int
82
+	 */
83
+	protected const EX_AUTHENTICATION_EXCEPTION_OFFSET = 14;
84
+
85
+	/**
86
+	 * built-in error code for \Illuminate\Auth\AuthenticationException
87
+	 *
88
+	 * @var int
89
+	 */
90
+	protected const EX_VALIDATION_EXCEPTION_OFFSET = 15;
91 91
 
92 92
 	/**
93 93
 	 * Returns base code mapping array
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @noinspection PhpUnhandledExceptionInspection
102 102
 	 */
103
-    protected static function getBaseMap(): array
104
-    {
105
-        $tpl = 'response-builder::builder.http_%d';
106
-
107
-        return [
108
-            self::OK()                          => 'response-builder::builder.ok',
109
-            self::NO_ERROR_MESSAGE()            => 'response-builder::builder.no_error_message',
110
-            self::EX_HTTP_EXCEPTION()           => 'response-builder::builder.http_exception',
111
-            self::EX_UNCAUGHT_EXCEPTION()       => 'response-builder::builder.uncaught_exception',
112
-            self::EX_HTTP_NOT_FOUND()           => sprintf($tpl, HttpResponse::HTTP_NOT_FOUND),
113
-            self::EX_HTTP_SERVICE_UNAVAILABLE() => sprintf($tpl, HttpResponse::HTTP_SERVICE_UNAVAILABLE),
114
-            self::EX_AUTHENTICATION_EXCEPTION() => sprintf($tpl, HttpResponse::HTTP_UNAUTHORIZED),
115
-            self::EX_VALIDATION_EXCEPTION()     => sprintf($tpl, HttpResponse::HTTP_UNPROCESSABLE_ENTITY),
116
-        ];
117
-    }
103
+	protected static function getBaseMap(): array
104
+	{
105
+		$tpl = 'response-builder::builder.http_%d';
106
+
107
+		return [
108
+			self::OK()                          => 'response-builder::builder.ok',
109
+			self::NO_ERROR_MESSAGE()            => 'response-builder::builder.no_error_message',
110
+			self::EX_HTTP_EXCEPTION()           => 'response-builder::builder.http_exception',
111
+			self::EX_UNCAUGHT_EXCEPTION()       => 'response-builder::builder.uncaught_exception',
112
+			self::EX_HTTP_NOT_FOUND()           => sprintf($tpl, HttpResponse::HTTP_NOT_FOUND),
113
+			self::EX_HTTP_SERVICE_UNAVAILABLE() => sprintf($tpl, HttpResponse::HTTP_SERVICE_UNAVAILABLE),
114
+			self::EX_AUTHENTICATION_EXCEPTION() => sprintf($tpl, HttpResponse::HTTP_UNAUTHORIZED),
115
+			self::EX_VALIDATION_EXCEPTION()     => sprintf($tpl, HttpResponse::HTTP_UNPROCESSABLE_ENTITY),
116
+		];
117
+	}
118 118
 
119 119
 	/**
120 120
 	 * Returns API code for internal code OK
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
 	 *
128 128
 	 * @noinspection PhpMethodNamingConventionInspection
129 129
 	 */
130
-    public static function OK(): int
131
-    {
132
-        return static::getCodeForInternalOffset(static::OK_OFFSET);
133
-    }
130
+	public static function OK(): int
131
+	{
132
+		return static::getCodeForInternalOffset(static::OK_OFFSET);
133
+	}
134 134
 
135 135
 	/**
136 136
 	 * Returns API code for internal code NO_ERROR_MESSAGE
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 	 *
144 144
 	 * @noinspection PhpMethodNamingConventionInspection
145 145
 	 */
146
-    public static function NO_ERROR_MESSAGE(): int
147
-    {
148
-        return static::getCodeForInternalOffset(static::NO_ERROR_MESSAGE_OFFSET);
149
-    }
146
+	public static function NO_ERROR_MESSAGE(): int
147
+	{
148
+		return static::getCodeForInternalOffset(static::NO_ERROR_MESSAGE_OFFSET);
149
+	}
150 150
 
151 151
 	/**
152 152
 	 * Returns API code for internal code EX_HTTP_NOT_FOUND
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
 	 *
160 160
 	 * @noinspection PhpMethodNamingConventionInspection
161 161
 	 */
162
-    public static function EX_HTTP_NOT_FOUND(): int
163
-    {
164
-        return static::getCodeForInternalOffset(static::EX_HTTP_NOT_FOUND_OFFSET);
165
-    }
162
+	public static function EX_HTTP_NOT_FOUND(): int
163
+	{
164
+		return static::getCodeForInternalOffset(static::EX_HTTP_NOT_FOUND_OFFSET);
165
+	}
166 166
 
167 167
 	/**
168 168
 	 * Returns API code for internal code EX_HTTP_EXCEPTION
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @noinspection PhpMethodNamingConventionInspection
177 177
 	 */
178
-    public static function EX_HTTP_EXCEPTION(): int
179
-    {
180
-        return static::getCodeForInternalOffset(static::EX_HTTP_EXCEPTION_OFFSET);
181
-    }
178
+	public static function EX_HTTP_EXCEPTION(): int
179
+	{
180
+		return static::getCodeForInternalOffset(static::EX_HTTP_EXCEPTION_OFFSET);
181
+	}
182 182
 
183 183
 	/**
184 184
 	 * Returns API code for internal code EX_UNCAUGHT_EXCEPTION
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
 	 *
192 192
 	 * @noinspection PhpMethodNamingConventionInspection
193 193
 	 */
194
-    public static function EX_UNCAUGHT_EXCEPTION(): int
195
-    {
196
-        return static::getCodeForInternalOffset(static::EX_UNCAUGHT_EXCEPTION_OFFSET);
197
-    }
194
+	public static function EX_UNCAUGHT_EXCEPTION(): int
195
+	{
196
+		return static::getCodeForInternalOffset(static::EX_UNCAUGHT_EXCEPTION_OFFSET);
197
+	}
198 198
 
199 199
 	/**
200 200
 	 * Returns API code for internal code EX_AUTHENTICATION_EXCEPTION
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 	 *
208 208
 	 * @noinspection PhpMethodNamingConventionInspection
209 209
 	 */
210
-    public static function EX_AUTHENTICATION_EXCEPTION(): int
211
-    {
212
-        return static::getCodeForInternalOffset(static::EX_AUTHENTICATION_EXCEPTION_OFFSET);
213
-    }
210
+	public static function EX_AUTHENTICATION_EXCEPTION(): int
211
+	{
212
+		return static::getCodeForInternalOffset(static::EX_AUTHENTICATION_EXCEPTION_OFFSET);
213
+	}
214 214
 
215 215
 	/**
216 216
 	 * Returns API code for internal code EX_VALIDATION_EXCEPTION
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
 	 *
224 224
 	 * @noinspection PhpMethodNamingConventionInspection
225 225
 	 */
226
-    public static function EX_VALIDATION_EXCEPTION(): int
227
-    {
228
-        return static::getCodeForInternalOffset(static::EX_VALIDATION_EXCEPTION_OFFSET);
229
-    }
226
+	public static function EX_VALIDATION_EXCEPTION(): int
227
+	{
228
+		return static::getCodeForInternalOffset(static::EX_VALIDATION_EXCEPTION_OFFSET);
229
+	}
230 230
 
231 231
 	/**
232 232
 	 * Returns API code for internal code EX_HTTP_SERVICE_UNAVAILABLE
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
 	 *
240 240
 	 * @noinspection PhpMethodNamingConventionInspection
241 241
 	 */
242
-    public static function EX_HTTP_SERVICE_UNAVAILABLE(): int
243
-    {
244
-        return static::getCodeForInternalOffset(static::EX_HTTP_SERVICE_UNAVAILABLE_OFFSET);
245
-    }
242
+	public static function EX_HTTP_SERVICE_UNAVAILABLE(): int
243
+	{
244
+		return static::getCodeForInternalOffset(static::EX_HTTP_SERVICE_UNAVAILABLE_OFFSET);
245
+	}
246 246
 
247 247
 }
Please login to merge, or discard this patch.
src/Util.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		$array = $original;
41 41
 		foreach ($merging as $m_key => $m_val) {
42 42
 			if (\array_key_exists($m_key, $original)) {
43
-				$orig_type = \gettype($original[ $m_key ]);
43
+				$orig_type = \gettype($original[$m_key]);
44 44
 				$m_type = \gettype($m_val);
45 45
 				if ($orig_type !== $m_type) {
46 46
 					throw new Ex\IncompatibleTypeException(
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
 
50 50
 				if (\is_array($m_val)) {
51 51
 					/** @noinspection PhpUnnecessaryStaticReferenceInspection */
52
-					$array[ $m_key ] = static::mergeConfig($original[ $m_key ], $m_val);
52
+					$array[$m_key] = static::mergeConfig($original[$m_key], $m_val);
53 53
 				} else {
54
-					$array[ $m_key ] = $m_val;
54
+					$array[$m_key] = $m_val;
55 55
 				}
56 56
 			} else {
57
-				$array[ $m_key ] = $m_val;
57
+				$array[$m_key] = $m_val;
58 58
 			}
59 59
 		}
60 60
 
Please login to merge, or discard this patch.
src/Converters/ToArrayConverter.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
 	 *
35 35
 	 * @throws Ex\InvalidTypeException
36 36
 	 */
37
-    public function convert(object $obj, /** @scrutinizer ignore-unused */ array $config): array
38
-    {
39
-        Validator::assertIsObject('obj', $obj);
37
+	public function convert(object $obj, /** @scrutinizer ignore-unused */ array $config): array
38
+	{
39
+		Validator::assertIsObject('obj', $obj);
40 40
 
41
-        return $obj->toArray(null);
42
-    }
41
+		return $obj->toArray(null);
42
+	}
43 43
 }
Please login to merge, or discard this patch.