Completed
Push — master ( e61355...5ec30c )
by Jean-Christophe
03:07
created
Ajax/semantic/html/collections/HtmlTable.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 
22 22
 	public function __construct($identifier, $rowCount, $colCount) {
23 23
 		parent::__construct($identifier, "table", "ui table");
24
-		$this->content=array ();
24
+		$this->content=array();
25 25
 		$this->setRowCount($rowCount, $colCount);
26
-		$this->_variations=[ Variation::CELLED,Variation::PADDED,Variation::COMPACT ];
27
-		$this->_compileParts=["thead","tbody","tfoot"];
26
+		$this->_variations=[Variation::CELLED, Variation::PADDED, Variation::COMPACT];
27
+		$this->_compileParts=["thead", "tbody", "tfoot"];
28 28
 	}
29 29
 
30 30
 	/**
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 	 * @return HtmlTableContent
34 34
 	 */
35 35
 	public function getPart($key) {
36
-		if (\array_key_exists($key, $this->content) === false) {
36
+		if (\array_key_exists($key, $this->content)===false) {
37 37
 			$this->content[$key]=new HtmlTableContent("", $key);
38
-			if ($key !== "tbody") {
38
+			if ($key!=="tbody") {
39 39
 				$this->content[$key]->setRowCount(1, $this->_colCount);
40 40
 			}
41 41
 		}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return boolean
73 73
 	 */
74 74
 	public function hasPart($key) {
75
-		return \array_key_exists($key, $this->content) === true;
75
+		return \array_key_exists($key, $this->content)===true;
76 76
 	}
77 77
 
78 78
 	/**
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
 	private function colAlign($colIndex, $function) {
179 179
 		if (\is_array($colIndex)) {
180
-			foreach ( $colIndex as $cIndex ) {
180
+			foreach ($colIndex as $cIndex) {
181 181
 				$this->colAlign($cIndex, $function);
182 182
 			}
183 183
 		} else {
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
 
196 196
 	public function setBasic($very=false) {
197 197
 		if ($very)
198
-			$this->addToPropertyCtrl("class", "very", array ("very" ));
199
-		return $this->addToPropertyCtrl("class", "basic", array ("basic" ));
198
+			$this->addToPropertyCtrl("class", "very", array("very"));
199
+		return $this->addToPropertyCtrl("class", "basic", array("basic"));
200 200
 	}
201 201
 
202 202
 	public function setCollapsing() {
@@ -257,12 +257,12 @@  discard block
 block discarded – undo
257 257
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
258 258
 	 */
259 259
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
260
-		if(\sizeof($this->_compileParts)<3){
260
+		if (\sizeof($this->_compileParts)<3) {
261 261
 			$this->_template="%content%";
262 262
 			$this->refresh();
263
-		}else{
263
+		} else {
264 264
 			if ($this->propertyContains("class", "sortable")) {
265
-				$this->addEvent("execute", "$('#" . $this->identifier . "').tablesort();");
265
+				$this->addEvent("execute", "$('#".$this->identifier."').tablesort();");
266 266
 			}
267 267
 		}
268 268
 		$this->content=JArray::sortAssociative($this->content, $this->_compileParts);
@@ -293,14 +293,14 @@  discard block
 block discarded – undo
293 293
 		return $this;
294 294
 	}
295 295
 
296
-	public function refresh(){
296
+	public function refresh() {
297 297
 		$this->_footer=$this->getFooter();
298 298
 		$this->addEvent("execute", '$("#'.$this->identifier.' tfoot").replaceWith("'.\addslashes($this->_footer).'");');
299 299
 	}
300 300
 
301
-	public function run(JsUtils $js){
302
-		$result= parent::run($js);
303
-		if(isset($this->_footer))
301
+	public function run(JsUtils $js) {
302
+		$result=parent::run($js);
303
+		if (isset($this->_footer))
304 304
 			$this->_footer->run($js);
305 305
 		return $result;
306 306
 	}
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -194,8 +194,9 @@  discard block
 block discarded – undo
194 194
 	}
195 195
 
196 196
 	public function setBasic($very=false) {
197
-		if ($very)
198
-			$this->addToPropertyCtrl("class", "very", array ("very" ));
197
+		if ($very) {
198
+					$this->addToPropertyCtrl("class", "very", array ("very" ));
199
+		}
199 200
 		return $this->addToPropertyCtrl("class", "basic", array ("basic" ));
200 201
 	}
201 202
 
@@ -260,7 +261,7 @@  discard block
 block discarded – undo
260 261
 		if(\sizeof($this->_compileParts)<3){
261 262
 			$this->_template="%content%";
262 263
 			$this->refresh();
263
-		}else{
264
+		} else{
264 265
 			if ($this->propertyContains("class", "sortable")) {
265 266
 				$this->addEvent("execute", "$('#" . $this->identifier . "').tablesort();");
266 267
 			}
@@ -300,8 +301,9 @@  discard block
 block discarded – undo
300 301
 
301 302
 	public function run(JsUtils $js){
302 303
 		$result= parent::run($js);
303
-		if(isset($this->_footer))
304
-			$this->_footer->run($js);
304
+		if(isset($this->_footer)) {
305
+					$this->_footer->run($js);
306
+		}
305 307
 		return $result;
306 308
 	}
307 309
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlInput.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
 use Ajax\JsUtils;
11 11
 
12 12
 class HtmlInput extends HtmlSemDoubleElement {
13
-	use IconTrait,TextFieldsTrait,FieldTrait;
13
+	use IconTrait, TextFieldsTrait, FieldTrait;
14 14
 
15 15
 	public function __construct($identifier, $type="text", $value="", $placeholder="") {
16
-		parent::__construct("div-" . $identifier, "div", "ui input");
17
-		$this->content=[ "field" => new \Ajax\common\html\html5\HtmlInput($identifier, $type, $value, $placeholder) ];
18
-		$this->_states=[ State::DISABLED,State::FOCUS,State::ERROR ];
19
-		$this->_variations=[ Variation::TRANSPARENT ];
16
+		parent::__construct("div-".$identifier, "div", "ui input");
17
+		$this->content=["field" => new \Ajax\common\html\html5\HtmlInput($identifier, $type, $value, $placeholder)];
18
+		$this->_states=[State::DISABLED, State::FOCUS, State::ERROR];
19
+		$this->_variations=[Variation::TRANSPARENT];
20 20
 	}
21 21
 
22 22
 	public function getField() {
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 
37 37
 	public function run(JsUtils $js) {
38 38
 		$result=parent::run($js);
39
-		$result->attach("#" . $this->getDataField()->getIdentifier());
39
+		$result->attach("#".$this->getDataField()->getIdentifier());
40 40
 		return $result;
41 41
 	}
42 42
 
43
-	public function setTransparent(){
43
+	public function setTransparent() {
44 44
 		return $this->addToProperty("class", "transparent");
45 45
 	}
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.