Passed
Push — dev ( 9fe7d1...4fcf7e )
by Marcin
02:28
created
src/ResponseBuilderServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 			if (is_numeric($key)) {
93 93
 				continue;
94 94
 			}
95
-			$array[ $key ] = $this->mergeConfig($value, $merging[ $key ]);
95
+			$array[$key] = $this->mergeConfig($value, $merging[$key]);
96 96
 		}
97 97
 
98 98
 		return $array;
Please login to merge, or discard this patch.
src/ApiCodesHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 
113 113
 		$map = static::getMap();
114 114
 
115
-		return $map[ $api_code ] ?? null;
115
+		return $map[$api_code] ?? null;
116 116
 	}
117 117
 
118 118
 	/**
Please login to merge, or discard this patch.
src/Converter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
 		// check for exact class name match...
73 73
 		$cls = get_class($data);
74 74
 		if (array_key_exists($cls, $this->classes)) {
75
-			$result = $this->classes[ $cls ];
75
+			$result = $this->classes[$cls];
76 76
 		} else {
77 77
 			// no exact match, then lets try with `instanceof`
78 78
 			foreach (array_keys($this->classes) as $class_name) {
79 79
 				if ($data instanceof $class_name) {
80
-					$result = $this->classes[ $class_name ];
80
+					$result = $this->classes[$class_name];
81 81
 					break;
82 82
 				}
83 83
 			}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 		if (is_object($data)) {
109 109
 			$cfg = $this->getClassMappingConfigOrThrow($data);
110
-			$data = [$cfg[ ResponseBuilder::KEY_KEY ] => $data->{$cfg[ ResponseBuilder::KEY_METHOD ]}()];
110
+			$data = [$cfg[ResponseBuilder::KEY_KEY] => $data->{$cfg[ResponseBuilder::KEY_METHOD]}()];
111 111
 		} elseif (!is_array($data)) {
112 112
 			throw new \InvalidArgumentException(
113 113
 				sprintf('Payload must be null, array or object with mapping ("%s" given).', gettype($data)));
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 
150 150
 		foreach ($data as $key => $val) {
151 151
 			if (is_array($val)) {
152
-				$data[ $key ] = $this->convertArray($val);
152
+				$data[$key] = $this->convertArray($val);
153 153
 			} elseif (is_object($val)) {
154 154
 				$cls = get_class($val);
155 155
 				if (array_key_exists($cls, $this->classes)) {
156
-					$conversion_method = $this->classes[ $cls ][ ResponseBuilder::KEY_METHOD ];
156
+					$conversion_method = $this->classes[$cls][ResponseBuilder::KEY_METHOD];
157 157
 					$converted_data = $val->$conversion_method();
158
-					$data[ $key ] = $converted_data;
158
+					$data[$key] = $converted_data;
159 159
 				}
160 160
 			}
161 161
 		}
Please login to merge, or discard this patch.
src/ResponseBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 		$data = $converter->convert($data);
492 492
 		if ($data !== null && !is_object($data)) {
493 493
 			// ensure we get object in final JSON structure in data node
494
-			$data = (object)$data;
494
+			$data = (object) $data;
495 495
 		}
496 496
 
497 497
 		// get human readable message for API code or use message string (if given instead of API code)
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 
514 514
 		if ($debug_data !== null) {
515 515
 			$debug_key = Config::get(static::CONF_KEY_DEBUG_DEBUG_KEY, self::KEY_DEBUG);
516
-			$response[ $debug_key ] = $debug_data;
516
+			$response[$debug_key] = $debug_data;
517 517
 		}
518 518
 
519 519
 		return $response;
Please login to merge, or discard this patch.