Passed
Push — master ( 8b697d...525a36 )
by Jean-Christophe
01:54
created
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		}
36 36
 		if (isset($label))
37 37
 			$this->setLabel($label);
38
-		foreach ( $fields as $field ) {
38
+		foreach ($fields as $field) {
39 39
 			$this->addItem($field);
40 40
 		}
41 41
 		return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function addItem($item) {
59 59
 		$item=parent::addItem($item);
60
-		if($item instanceof HtmlFormField)
60
+		if ($item instanceof HtmlFormField)
61 61
 			$item->setContainer($this);
62 62
 		return $item;
63 63
 	}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	/**
66 66
 	 * @return HtmlFormField
67 67
 	 */
68
-	public function getItem($index){
68
+	public function getItem($index) {
69 69
 		return parent::getItem($index);
70 70
 	}
71 71
 
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 
107
-	public static function radios($identifier,$name, $items=array(), $label=NULL, $value=null, $type=NULL) {
108
-		$fields=array ();
107
+	public static function radios($identifier, $name, $items=array(), $label=NULL, $value=null, $type=NULL) {
108
+		$fields=array();
109 109
 		$i=0;
110
-		foreach ( $items as $val => $caption ) {
110
+		foreach ($items as $val => $caption) {
111 111
 			$itemO=new HtmlFormRadio($name."-".$i++, $name, $caption, $val, $type);
112 112
 			if ($val===$value) {
113 113
 				$itemO->getDataField()->setProperty("checked", "");
@@ -115,19 +115,19 @@  discard block
 block discarded – undo
115 115
 			$fields[]=$itemO;
116 116
 		}
117 117
 		$radios=new HtmlFormFields($identifier, $fields);
118
-		if (isset($label)){
118
+		if (isset($label)) {
119 119
 			$lbl=$radios->setLabel($label);
120
-			if($lbl instanceof HtmlSemDoubleElement){
120
+			if ($lbl instanceof HtmlSemDoubleElement) {
121 121
 				$lbl->setProperty("for", $name);
122 122
 			}
123 123
 		}
124 124
 		return $radios;
125 125
 	}
126 126
 
127
-	public static function checkeds($identifier,$name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
128
-		$fields=array ();
127
+	public static function checkeds($identifier, $name, $items=array(), $label=NULL, $values=array(), $type=NULL) {
128
+		$fields=array();
129 129
 		$i=0;
130
-		foreach ( $items as $val => $caption ) {
130
+		foreach ($items as $val => $caption) {
131 131
 			$itemO=new HtmlFormCheckbox($name."-".$i++, $caption, $val, $type);
132 132
 			$itemO->setName($name);
133 133
 			if (\array_search($val, $values)!==false) {
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		return $this;
147 147
 	}
148 148
 	
149
-	public function run(JsUtils $js){
149
+	public function run(JsUtils $js) {
150 150
 		return parent::run($js);
151 151
 		//return $result->setItemSelector("[data-value]");
152 152
 	}
Please login to merge, or discard this patch.