Completed
Push — master ( 3ad5ef...acbd35 )
by Jean-Christophe
03:30
created
Ajax/semantic/html/collections/form/traits/FormTrait.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@  discard block
 block discarded – undo
54 54
 
55 55
 	public function setAttached($value=true){
56 56
 		$form=$this->getForm();
57
-		if($value)
58
-			$form->addToPropertyCtrl("class", "attached", array ("attached" ));
57
+		if($value) {
58
+					$form->addToPropertyCtrl("class", "attached", array ("attached" ));
59
+		}
59 60
 		return $form;
60 61
 	}
61 62
 
@@ -77,10 +78,11 @@  discard block
 block discarded – undo
77 78
 	 */
78 79
 	public function submitOn($event,$identifierOrElement,$url,$responseElement,$parameters=NULL){
79 80
 		$form=$this->getForm();
80
-		if($identifierOrElement  instanceof BaseHtml)
81
-			$elem=$identifierOrElement;
82
-		else
83
-			$elem=$form->getElementById($identifierOrElement, $form->getContent());
81
+		if($identifierOrElement  instanceof BaseHtml) {
82
+					$elem=$identifierOrElement;
83
+		} else {
84
+					$elem=$form->getElementById($identifierOrElement, $form->getContent());
85
+		}
84 86
 		if(isset($elem)){
85 87
 			$this->_buttonAsSubmit($elem, $event,$url,$responseElement,$parameters);
86 88
 		}
@@ -101,8 +103,9 @@  discard block
 block discarded – undo
101 103
 		if(isset($url) && isset($responseElement)){
102 104
 			$button->addEvent($event, "$('#".$form->getIdentifier()."').form('validate form');",true,true);
103 105
 			$params=["form"=>$form->getIdentifier(),"responseElement"=>$responseElement,"url"=>$url,"stopPropagation"=>true];
104
-			if(\is_array($parameters))
105
-				$params=\array_merge($params,$parameters);
106
+			if(\is_array($parameters)) {
107
+							$params=\array_merge($params,$parameters);
108
+			}
106 109
 			$form->addValidationParam("_ajaxSubmit", new AjaxCall("postForm", $params));
107 110
 		}
108 111
 		return $button;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	public function __construct($identifier,$context=NULL,$content=NULL) {
11 11
 		parent::__construct($identifier, "div", "ui sticky", $content);
12
-		if(isset($content))
13
-			$this->setContext($context);
12
+		if(isset($content)) {
13
+					$this->setContext($context);
14
+		}
14 15
 	}
15 16
 
16 17
 	public function setContext($context){
@@ -20,15 +21,17 @@  discard block
 block discarded – undo
20 21
 
21 22
 	public function setFixed($value=NULL){
22 23
 		$fixed="fixed";
23
-		if(isset($value))
24
-			$fixed.=" ".$value;
24
+		if(isset($value)) {
25
+					$fixed.=" ".$value;
26
+		}
25 27
 		return $this->addToProperty("class",$fixed);
26 28
 	}
27 29
 
28 30
 	public function setBound($value=NULL){
29 31
 		$bound="bound";
30
-		if(isset($value))
31
-			$bound.=" ".$value;
32
+		if(isset($value)) {
33
+					$bound.=" ".$value;
34
+		}
32 35
 			return $this->addToProperty("class",$bound);
33 36
 	}
34 37
 
@@ -50,8 +53,9 @@  discard block
 block discarded – undo
50 53
 
51 54
 	public function setDebug($verbose=NULL){
52 55
 		$this->_params["debug"]=true;
53
-		if(isset($verbose))
54
-			$this->_params["verbose"]=true;
56
+		if(isset($verbose)) {
57
+					$this->_params["verbose"]=true;
58
+		}
55 59
 		return $this;
56 60
 	}
57 61
 }
58 62
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,14 +15,15 @@  discard block
 block discarded – undo
15 15
 		$field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
16 16
 		$field->setProperty("name", $name);
17 17
 		$this->setField($field);
18
-		if (isset($label))
19
-			$this->setLabel($label);
18
+		if (isset($label)) {
19
+					$this->setLabel($label);
20
+		}
20 21
 	}
21 22
 
22 23
 	public function setChecked($value=true){
23 24
 		if($value===true){
24 25
 			$this->getField()->setProperty("checked", "checked");
25
-		}else{
26
+		} else{
26 27
 			$this->getField()->removeProperty("checked");
27 28
 		}
28 29
 		return $this;
@@ -51,8 +52,9 @@  discard block
 block discarded – undo
51 52
 	 * @return mixed
52 53
 	 */
53 54
 	public function getLabel() {
54
-		if (\array_key_exists("label", $this->content))
55
-			return $this->content["label"];
55
+		if (\array_key_exists("label", $this->content)) {
56
+					return $this->content["label"];
57
+		}
56 58
 	}
57 59
 
58 60
 	/**
@@ -127,8 +129,9 @@  discard block
 block discarded – undo
127 129
 	}
128 130
 
129 131
 	public function run(JsUtils $js) {
130
-		if(!isset($this->_bsComponent))
131
-			$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
132
+		if(!isset($this->_bsComponent)) {
133
+					$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
134
+		}
132 135
 		return parent::run($js);
133 136
 	}
134 137
 }
135 138
\ No newline at end of file
Please login to merge, or discard this patch.