Completed
Push — master ( 43b921...4de0c7 )
by Jean-Christophe
08:41 queued 04:10
created
Ajax/semantic/html/base/HtmlSemNavElement.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,10 +94,11 @@
 block discarded – undo
94 94
 
95 95
 	protected function setDivider($divider,$index){
96 96
 		if(isset($index)){
97
-			if(\is_array($this->_contentSeparator)===false)
98
-				$this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator);
97
+			if(\is_array($this->_contentSeparator)===false) {
98
+							$this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator);
99
+			}
99 100
 			$this->_contentSeparator[$index]=$divider;
100
-		}else{
101
+		} else{
101 102
 			$this->_contentSeparator=$divider;
102 103
 		}
103 104
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlProgress.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,11 +13,13 @@  discard block
 block discarded – undo
13 13
 
14 14
 	public function __construct($identifier, $value=NULL, $label=NULL, $attributes=array()) {
15 15
 		parent::__construct($identifier, "div", "ui progress");
16
-		if (isset($value) === true)
17
-			$this->setProperty("data-percent", $value);
16
+		if (isset($value) === true) {
17
+					$this->setProperty("data-percent", $value);
18
+		}
18 19
 		$this->createBar();
19
-		if (isset($label) === true)
20
-			$this->setLabel($label);
20
+		if (isset($label) === true) {
21
+					$this->setLabel($label);
22
+		}
21 23
 		$this->_states=[ State::SUCCESS,State::WARNING,State::ERROR,State::ACTIVE,State::DISABLED ];
22 24
 		$this->addToProperty("class", $attributes);
23 25
 	}
@@ -116,8 +118,9 @@  discard block
 block discarded – undo
116 118
 	 * @see BaseHtml::run()
117 119
 	 */
118 120
 	public function run(JsUtils $js) {
119
-		if (isset($this->_bsComponent) === false)
120
-			$this->_bsComponent=$js->semantic()->progress("#" . $this->identifier, $this->_params);
121
+		if (isset($this->_bsComponent) === false) {
122
+					$this->_bsComponent=$js->semantic()->progress("#" . $this->identifier, $this->_params);
123
+		}
121 124
 		$this->addEventsOnRun($js);
122 125
 		return $this->_bsComponent;
123 126
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlModal.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 			foreach ($actions as $action){
44 44
 				$this->addAction($action);
45 45
 			}
46
-		}
47
-		else{
46
+		} else{
48 47
 			$this->addAction($actions);
49 48
 		}
50 49
 		return $this;
@@ -60,8 +59,9 @@  discard block
 block discarded – undo
60 59
 				$class="cancel";
61 60
 			}
62 61
 			$action=new HtmlButton("action-".$this->identifier,$action);
63
-			if($class!=="")
64
-				$action->addToProperty("class", $class);
62
+			if($class!=="") {
63
+							$action->addToProperty("class", $class);
64
+			}
65 65
 		}
66 66
 		return $this->addElementInPart($action, "actions");
67 67
 	}
@@ -169,8 +169,9 @@  discard block
 block discarded – undo
169 169
 	 * @see BaseHtml::run()
170 170
 	 */
171 171
 	public function run(JsUtils $js) {
172
-		if(isset($this->_bsComponent)===false)
173
-			$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
172
+		if(isset($this->_bsComponent)===false) {
173
+					$this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts);
174
+		}
174 175
 		$this->addEventsOnRun($js);
175 176
 		return $this->_bsComponent;
176 177
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDropdown.php 1 patch
Braces   +28 added lines, -20 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		}
69 69
 		if(!$item instanceof HtmlDropdownItem){
70 70
 			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image);
71
-		}elseif($itemO instanceof HtmlDropdownItem){
71
+		} elseif($itemO instanceof HtmlDropdownItem){
72 72
 			$this->addToProperty("class", "vertical");
73 73
 		}
74 74
 		return $itemO;
@@ -82,8 +82,9 @@  discard block
 block discarded – undo
82 82
 	}
83 83
 
84 84
 	public function addInput($name){
85
-		if(!isset($name))
86
-			$name="input-".$this->identifier;
85
+		if(!isset($name)) {
86
+					$name="input-".$this->identifier;
87
+		}
87 88
 		$this->setAction("activate");
88 89
 		$this->input=new HtmlInput($name,"hidden");
89 90
 	}
@@ -93,7 +94,7 @@  discard block
 block discarded – undo
93 94
 			foreach ($items as $k=>$v){
94 95
 				$this->addItem($v)->setData($k);
95 96
 			}
96
-		}else{
97
+		} else{
97 98
 			foreach ($items as $item){
98 99
 				$this->addItem($item);
99 100
 			}
@@ -110,7 +111,7 @@  discard block
 block discarded – undo
110 111
 		if($dropdown===false){
111 112
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
112 113
 			$dropdown="menu";
113
-		}else{
114
+		} else{
114 115
 			$dropdown="dropdown";
115 116
 			$this->mClass="menu";
116 117
 		}
@@ -126,18 +127,22 @@  discard block
 block discarded – undo
126 127
 	}
127 128
 
128 129
 	public function asButton($floating=false){
129
-		if($floating)
130
-			$this->addToProperty("class", "floating");
130
+		if($floating) {
131
+					$this->addToProperty("class", "floating");
132
+		}
131 133
 		return $this->addToProperty("class", "button");
132 134
 	}
133 135
 
134 136
 	public function asSelect($name=NULL,$multiple=false,$selection=true){
135
-		if(isset($name))
136
-			$this->addInput($name);
137
-		if($multiple)
138
-			$this->addToProperty("class", "multiple");
139
-		if ($selection)
140
-			$this->addToPropertyCtrl("class", "selection",array("selection"));
137
+		if(isset($name)) {
138
+					$this->addInput($name);
139
+		}
140
+		if($multiple) {
141
+					$this->addToProperty("class", "multiple");
142
+		}
143
+		if ($selection) {
144
+					$this->addToPropertyCtrl("class", "selection",array("selection"));
145
+		}
141 146
 		return $this;
142 147
 	}
143 148
 
@@ -147,8 +152,9 @@  discard block
 block discarded – undo
147 152
 	}
148 153
 
149 154
 	public function setSelect($name=NULL,$multiple=false){
150
-		if(!isset($name))
151
-			$name="select-".$this->identifier;
155
+		if(!isset($name)) {
156
+					$name="select-".$this->identifier;
157
+		}
152 158
 		$this->input=null;
153 159
 		if($multiple){
154 160
 			$this->setProperty("multiple", true);
@@ -179,12 +185,13 @@  discard block
 block discarded – undo
179 185
 	public function setValue($value){
180 186
 		if(isset($this->input)){
181 187
 			$this->input->setProperty("value", $value);
182
-		}else{
188
+		} else{
183 189
 			$this->setProperty("value", $value);
184 190
 		}
185 191
 		$textElement=$this->getElementById("text-".$this->identifier, $this->content);
186
-		if(isset($textElement))
187
-			$textElement->setContent($value);
192
+		if(isset($textElement)) {
193
+					$textElement->setContent($value);
194
+		}
188 195
 		return $this;
189 196
 	}
190 197
 
@@ -194,8 +201,9 @@  discard block
 block discarded – undo
194 201
 	 */
195 202
 	public function run(JsUtils $js) {
196 203
 		if($this->propertyContains("class", "simple")===false){
197
-			if(isset($this->_bsComponent)===false)
198
-				$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->_params);
204
+			if(isset($this->_bsComponent)===false) {
205
+							$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->_params);
206
+			}
199 207
 			$this->addEventsOnRun($js);
200 208
 			return $this->_bsComponent;
201 209
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
 		$field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
14 14
 		$field->setProperty("name", $name);
15 15
 		$this->setField($field);
16
-		if (isset($label))
17
-			$this->setLabel($label);
16
+		if (isset($label)) {
17
+					$this->setLabel($label);
18
+		}
18 19
 	}
19 20
 
20 21
 	public function setType($checkboxType) {
@@ -40,8 +41,9 @@  discard block
 block discarded – undo
40 41
 	 * @return mixed
41 42
 	 */
42 43
 	public function getLabel() {
43
-		if (\array_key_exists("label", $this->content))
44
-			return $this->content["label"];
44
+		if (\array_key_exists("label", $this->content)) {
45
+					return $this->content["label"];
46
+		}
45 47
 	}
46 48
 
47 49
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDimmer.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27 27
 		$header=new HtmlHeader("header-" . $this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
30
-			$header->setInverted();
29
+		if ($this->_inverted === false) {
30
+					$header->setInverted();
31
+		}
31 32
 		return $this->setContent($header);
32 33
 	}
33 34
 
@@ -42,14 +43,16 @@  discard block
 block discarded – undo
42 43
 	}
43 44
 
44 45
 	public function run(JsUtils $js) {
45
-		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+		if ($this->_container instanceof HtmlSingleElement) {
47
+					$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
48
+		}
47 49
 		return parent::run($js);
48 50
 	}
49 51
 
50 52
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
53
+		if (isset($this->_container) === true) {
54
+					return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
55
+		}
53 56
 	}
54 57
 
55 58
 	public function setBlurring() {
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,9 @@
 block discarded – undo
10 10
 
11 11
 	public function __construct($identifier,$context=NULL,$content=NULL) {
12 12
 		parent::__construct($identifier, "div", "ui sticky", $content);
13
-		if(isset($content))
14
-			$this->setContext($context);
13
+		if(isset($content)) {
14
+					$this->setContext($context);
15
+		}
15 16
 	}
16 17
 
17 18
 	public function setContext($context){
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSearch.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,10 +22,12 @@
 block discarded – undo
22 22
 
23 23
 	private function createField($placeholder=NULL, $icon=NULL) {
24 24
 		$field=new HtmlInput($this->identifier);
25
-		if (isset($placeholder) === true)
26
-			$field->setPlaceholder($placeholder);
27
-		if (isset($icon) === true)
28
-			$field->addIcon($icon, Direction::RIGHT);
25
+		if (isset($placeholder) === true) {
26
+					$field->setPlaceholder($placeholder);
27
+		}
28
+		if (isset($icon) === true) {
29
+					$field->addIcon($icon, Direction::RIGHT);
30
+		}
29 31
 		$field->getField()->setClass("prompt");
30 32
 		$this->content["field"]=$field;
31 33
 		return $field;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlAccordion.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
 	 * @see BaseHtml::run()
63 63
 	 */
64 64
 	public function run(JsUtils $js) {
65
-		if(isset($this->_bsComponent)===false)
66
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
65
+		if(isset($this->_bsComponent)===false) {
66
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
67
+		}
67 68
 			$this->addEventsOnRun($js);
68 69
 			return $this->_bsComponent;
69 70
 	}
Please login to merge, or discard this patch.