Completed
Push — master ( c60a32...d8cf68 )
by Ben
02:28 queued 10s
created
src/Former/Traits/FormerObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		if (array_key_exists($name, $names)) {
84 84
 			$count = $names[$name] + 1;
85 85
 			$names[$name] = $count;
86
-			return $name . '-' . $count;
86
+			return $name.'-'.$count;
87 87
 		}
88 88
 
89 89
 		$names[$name] = 1;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		// Set the proper ID according to the label
114 114
 		$this->setId();
115 115
 
116
-		if($this instanceof Field) {
116
+		if ($this instanceof Field) {
117 117
 			$this->setFieldClasses();
118 118
 		}
119 119
 
Please login to merge, or discard this patch.
src/Former/Form/Fields/Choice.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 				$attributes['disabled'] = true;
218 218
 			}
219 219
 
220
-			if(isset($attributes['name'])) {
220
+			if (isset($attributes['name'])) {
221 221
 				$name = $attributes['name'];
222 222
 				unset($attributes['name']);
223 223
 			} else {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 				$name .= '[]';
228 228
 			}
229 229
 		
230
-			if(!isset($attributes['id'])) {
230
+			if (!isset($attributes['id'])) {
231 231
 				$attributes['id'] = $this->id.'_'.count($children);
232 232
 			}
233 233
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		}
283 283
 
284 284
 		$attributes = array('value' => '', 'disabled' => 'disabled');
285
-		if (!(array)$this->value) {
285
+		if (!(array) $this->value) {
286 286
 			$attributes['selected'] = 'selected';
287 287
 		}
288 288
 
@@ -315,11 +315,11 @@  discard block
 block discarded – undo
315 315
 	 */
316 316
 	protected function hasValue($choiceValue)
317 317
 	{
318
-		foreach ((array)$this->value as $key => $value) {
318
+		foreach ((array) $this->value as $key => $value) {
319 319
 			if (is_object($value) && method_exists($value, 'getKey')) {
320 320
 				$value = $value->getKey();
321 321
 			}
322
-			if ($choiceValue === $value || is_numeric($value) && $choiceValue === (int)$value) {
322
+			if ($choiceValue === $value || is_numeric($value) && $choiceValue === (int) $value) {
323 323
 				return true;
324 324
 			}
325 325
 		}
Please login to merge, or discard this patch.
src/Former/Former.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
 
148 148
 		// Checking for any supplementary classes
149 149
 		$modifiers = explode('_', $method);
150
-		$method  = array_pop($modifiers);
150
+		$method = array_pop($modifiers);
151 151
 		
152 152
 		// Dispatch to the different Form\Fields
153
-		$field     = $this->dispatch->toFields($method, $parameters);
153
+		$field = $this->dispatch->toFields($method, $parameters);
154 154
 		$field->setModifiers($modifiers);
155 155
 		$field->addClass('');
156 156
 		
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 		$this->setOption('framework', $framework);
351 351
 
352 352
 		$framework = $this->getFrameworkInstance($framework);
353
-		$this->app->bind('former.framework', function ($app) use ($framework) {
353
+		$this->app->bind('former.framework', function($app) use ($framework) {
354 354
 			return $framework;
355 355
 		});
356 356
 	}
@@ -370,9 +370,9 @@  discard block
 block discarded – undo
370 370
 		//get interfaces of the given framework
371 371
 		$interfaces = class_exists($framework) ? class_implements($framework) : array();
372 372
 
373
-		if(class_exists($formerClass)) {
373
+		if (class_exists($formerClass)) {
374 374
 			$returnClass = $formerClass;
375
-		} elseif(class_exists($framework) && isset($interfaces['Former\Interfaces\FrameworkInterface'])) {
375
+		} elseif (class_exists($framework) && isset($interfaces['Former\Interfaces\FrameworkInterface'])) {
376 376
 			// We have some outside class, lets return it.
377 377
 			$returnClass = $framework;
378 378
 		} else {
Please login to merge, or discard this patch.