Passed
Push — develop ( 319bd8...330c7a )
by Neill
16:41 queued 15s
created
neon/core/helpers/Arr.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public static function defaults($array, $defaults)
58 58
 	{
59
-		foreach($defaults as $key => $default)
59
+		foreach ($defaults as $key => $default)
60 60
 			Arr::set($array, $key, Arr::get($array, $key, $default));
61 61
 		return $array;
62 62
 	}
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 
75 75
 		foreach ($array as $key => $value) {
76 76
 			if (is_array($value) && !empty($value)) {
77
-				$results = array_merge($results, static::dot($value, $prepend . $key . '.'));
77
+				$results = array_merge($results, static::dot($value, $prepend.$key.'.'));
78 78
 			} else {
79
-				$results[$prepend . $key] = $value;
79
+				$results[$prepend.$key] = $value;
80 80
 			}
81 81
 		}
82 82
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	public static function flatten($array, $depth = INF)
179 179
 	{
180
-		return array_reduce($array, function ($result, $item) use ($depth) {
180
+		return array_reduce($array, function($result, $item) use ($depth) {
181 181
 			$item = $item instanceof Collection ? $item->all() : $item;
182 182
 
183 183
 			if (!is_array($item)) {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	{
202 202
 		$original = &$array;
203 203
 
204
-		$keys = (array)$keys;
204
+		$keys = (array) $keys;
205 205
 
206 206
 		if (count($keys) === 0) {
207 207
 			return;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	 * @throws \InvalidArgumentException if the property $key does not exist in the array
293 293
 	 * @return mixed
294 294
 	 */
295
-	public static function getRequired($array, $key, $message=null)
295
+	public static function getRequired($array, $key, $message = null)
296 296
 	{
297 297
 		if (!array_key_exists($key, $array)) {
298 298
 			throw new \InvalidArgumentException($message ?: "You must define a '$key' property.");
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	 */
438 438
 	public static function only($array, $keys)
439 439
 	{
440
-		return array_intersect_key($array, array_flip((array)$keys));
440
+		return array_intersect_key($array, array_flip((array) $keys));
441 441
 	}
442 442
 
443 443
 	/**
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,9 @@
 block discarded – undo
56 56
 	 */
57 57
 	public static function defaults($array, $defaults)
58 58
 	{
59
-		foreach($defaults as $key => $default)
60
-			Arr::set($array, $key, Arr::get($array, $key, $default));
59
+		foreach($defaults as $key => $default) {
60
+					Arr::set($array, $key, Arr::get($array, $key, $default));
61
+		}
61 62
 		return $array;
62 63
 	}
63 64
 
Please login to merge, or discard this patch.
neon/phoebe/plugins/smarty/function.ddsForm.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
 	// process the parameters
150 150
 	if (!isset($params['classType']))
151
-		throw new \RuntimeException("You must pass in the form's classType otherwise we don't which form it is. You passed in: ".print_r($params,true));
151
+		throw new \RuntimeException("You must pass in the form's classType otherwise we don't which form it is. You passed in: ".print_r($params, true));
152 152
 	$classType = $params['classType'];
153 153
 	$cssClass = isset($params['cssClass']) ? $params['cssClass'] : null;
154 154
 	$label = isset($params['label']) ? $params['label'] : null;
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
 	$assignSaved = !empty($params['assignSaved']) ? $params['assignSaved'] : 'saved';
161 161
 	$assignErrors = !empty($params['assignErrors']) ? $params['assignErrors'] : 'errors';
162 162
 	$assignSubmitted = !empty($params['assignSubmitted']) ? $params['assignSubmitted'] : 'submitted';
163
-	$readOnly = isset($params['readOnly']) ? (bool)$params['readOnly'] : false;
164
-	$printOnly = isset($params['printOnly']) ? (bool)$params['printOnly'] : false;
163
+	$readOnly = isset($params['readOnly']) ? (bool) $params['readOnly'] : false;
164
+	$printOnly = isset($params['printOnly']) ? (bool) $params['printOnly'] : false;
165 165
 	$uuid = !empty($params['uuid']) ? $params['uuid'] : null;
166 166
 	$dataSources = !empty($params['dataSources']) ? $params['dataSources'] : null;
167
-	$enableAjaxValidation = isset($params['enableAjaxValidation']) ? (bool)$params['enableAjaxValidation'] : true;
168
-	$enableAjaxSubmission = isset($params['enableAjaxSubmission']) ? (bool)$params['enableAjaxSubmission'] : false;
167
+	$enableAjaxValidation = isset($params['enableAjaxValidation']) ? (bool) $params['enableAjaxValidation'] : true;
168
+	$enableAjaxSubmission = isset($params['enableAjaxSubmission']) ? (bool) $params['enableAjaxSubmission'] : false;
169 169
 	$ajaxValidationUrl = !empty($params['ajaxValidationUrl']) ? $params['ajaxValidationUrl'] : '/phoebe/database/index/validate-form';
170 170
 	$returnUrl = !empty($params['returnUrl']) ? $params['returnUrl'] : null;
171 171
 	$formName = !empty($params['name']) ? $params['name'] : null;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	$id = ($id ? $id : ($uuid ? $uuid : null));
179 179
 	if ($id) {
180 180
 		if (is_numeric($id[0]) || $id[0] == '-' || $id[0] == '_')
181
-			$id = 'z' . $id;
181
+			$id = 'z'.$id;
182 182
 	}
183 183
 	$changeLogUuids = [];
184 184
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
 	// assign all of the save results to the template
251 251
 	foreach ($saveFormResults as $k=>$v)
252
-		$template->assign($k,$v);
252
+		$template->assign($k, $v);
253 253
 
254 254
 
255 255
 	// assign the resulting form
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,8 +147,9 @@  discard block
 block discarded – undo
147 147
 	$phoebeType = 'daedalus';
148 148
 
149 149
 	// process the parameters
150
-	if (!isset($params['classType']))
151
-		throw new \RuntimeException("You must pass in the form's classType otherwise we don't which form it is. You passed in: ".print_r($params,true));
150
+	if (!isset($params['classType'])) {
151
+			throw new \RuntimeException("You must pass in the form's classType otherwise we don't which form it is. You passed in: ".print_r($params,true));
152
+	}
152 153
 	$classType = $params['classType'];
153 154
 	$cssClass = isset($params['cssClass']) ? $params['cssClass'] : null;
154 155
 	$label = isset($params['label']) ? $params['label'] : null;
@@ -177,8 +178,9 @@  discard block
 block discarded – undo
177 178
 	// prefix invalid (HTML5) ids with a letter
178 179
 	$id = ($id ? $id : ($uuid ? $uuid : null));
179 180
 	if ($id) {
180
-		if (is_numeric($id[0]) || $id[0] == '-' || $id[0] == '_')
181
-			$id = 'z' . $id;
181
+		if (is_numeric($id[0]) || $id[0] == '-' || $id[0] == '_') {
182
+					$id = 'z' . $id;
183
+		}
182 184
 	}
183 185
 	$changeLogUuids = [];
184 186
 
@@ -248,8 +250,9 @@  discard block
 block discarded – undo
248 250
 	}
249 251
 
250 252
 	// assign all of the save results to the template
251
-	foreach ($saveFormResults as $k=>$v)
252
-		$template->assign($k,$v);
253
+	foreach ($saveFormResults as $k=>$v) {
254
+			$template->assign($k,$v);
255
+	}
253 256
 
254 257
 
255 258
 	// assign the resulting form
Please login to merge, or discard this patch.