Completed
Push — master ( c0f044...c6c18d )
by Jean-Christophe
03:25
created
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,18 +11,21 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
15
-			$this->setRows($rows);
14
+		if(isset($rows)) {
15
+					$this->setRows($rows);
16
+		}
16 17
 	}
17 18
 	public function setValue($value) {
18
-		if(isset($value))
19
-			$this->setContent($value);
19
+		if(isset($value)) {
20
+					$this->setContent($value);
21
+		}
20 22
 		return $this;
21 23
 	}
22 24
 
23 25
 	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
25
-			$this->setProperty("placeholder", $value);
26
+		if(JString::isNotNull($value)) {
27
+					$this->setProperty("placeholder", $value);
28
+		}
26 29
 		return $this;
27 30
 	}
28 31
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormRadio.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
 
14 14
 	public function __construct($identifier, $name=NULL,$label=NULL,$value=NULL) {
15 15
 		parent::__construct($identifier, $label, "radio", $value=NULL);
16
-		if(isset($name))
17
-			$this->getField()->setProperty("name", $name);
16
+		if(isset($name)) {
17
+					$this->getField()->setProperty("name", $name);
18
+		}
18 19
 		if(isset($label)){
19 20
 			$this->swapLabel();
20 21
 			$label=$this->getLabel();
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormTextarea.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 
10 10
 	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
11
-		if(!isset($placeholder))
12
-			$placeholder=$label;
11
+		if(!isset($placeholder)) {
12
+					$placeholder=$label;
13
+		}
13 14
 		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14 15
 	}
15 16
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormFields.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
 		if($this->_equalWidth){
38 38
 			$count=$this->count();
39 39
 			$this->addToProperty("class", Wide::getConstants()["W".$count]." fields");
40
-		}else
41
-			$this->addToProperty("class","fields");
40
+		} else {
41
+					$this->addToProperty("class","fields");
42
+		}
42 43
 		return parent::compile($js,$view);
43 44
 	}
44 45
 
@@ -73,8 +74,9 @@  discard block
 block discarded – undo
73 74
 			$fields[]=new HtmlFormRadio($name."-".$i++,$name,$item,$item);
74 75
 		}
75 76
 		$radios=new HtmlFormFields("fields-".$name,$fields);
76
-		if(isset($label))
77
-			$radios->setLabel($label)->setProperty("for", $name);
77
+		if(isset($label)) {
78
+					$radios->setLabel($label)->setProperty("for", $name);
79
+		}
78 80
 		return $radios;
79 81
 	}
80 82
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlForm.php 1 patch
Braces   +16 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function addHeader($title,$niveau=1,$dividing=true){
28 28
 		$header=new HtmlHeader("",$niveau,$title);
29
-		if($dividing)
30
-			$header->setDividing();
29
+		if($dividing) {
30
+					$header->setDividing();
31
+		}
31 32
 		return $this->addItem($header);
32 33
 	}
33 34
 
@@ -39,13 +40,16 @@  discard block
 block discarded – undo
39 40
 				if(\is_string($end)){
40 41
 					$label=$end;
41 42
 					\array_pop($fields);
42
-				}else $label=NULL;
43
+				} else {
44
+					$label=NULL;
45
+				}
43 46
 			}
44 47
 			$this->_fields=\array_merge($this->_fields,$fields);
45 48
 			$fields=new HtmlFormFields("fields-".$this->identifier."-".$this->count(),$fields);
46 49
 		}
47
-		if(isset($label))
48
-		 $fields=new HtmlFormField("", $fields,$label);
50
+		if(isset($label)) {
51
+				 $fields=new HtmlFormField("", $fields,$label);
52
+		}
49 53
 		$this->addItem($fields);
50 54
 		return $fields;
51 55
 	}
@@ -61,7 +65,7 @@  discard block
 block discarded – undo
61 65
 	public function getField($index){
62 66
 		if(\is_string($index)){
63 67
 			$field=$this->getElementById($index, $this->_fields);
64
-		}else{
68
+		} else{
65 69
 			$field=$this->_fields[$index];
66 70
 		}
67 71
 		return $field;
@@ -93,10 +97,12 @@  discard block
 block discarded – undo
93 97
 	 */
94 98
 	public function addMessage($identifier,$content,$header=NULL,$icon=NULL){
95 99
 		$message=new HtmlMessage($identifier,$content);
96
-		if(isset($header))
97
-			$message->addHeader($header);
98
-		if(isset($icon))
99
-			$message->setIcon($icon);
100
+		if(isset($header)) {
101
+					$message->addHeader($header);
102
+		}
103
+		if(isset($icon)) {
104
+					$message->setIcon($icon);
105
+		}
100 106
 		return $this->addItem($message);
101 107
 	}
102 108
 
Please login to merge, or discard this patch.