Completed
Push — master ( b6875a...29801f )
by Jean-Christophe
03:06
created
Ajax/semantic/html/base/traits/IconTrait.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
20 20
 			$this->addContent($iconO,false);
21 21
 			$this->_hasIcon=true;
22
-		}else{
22
+		} else{
23 23
 			$iconO=$this->getIcon();
24 24
 			$iconO->setIcon($icon);
25 25
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -30,8 +30,9 @@  discard block
 block discarded – undo
30 30
 	public function getIcon(){
31 31
 		if(\is_array($this->content)){
32 32
 			foreach ($this->content as $item){
33
-				if($item instanceof HtmlIcon)
34
-					return $item;
33
+				if($item instanceof HtmlIcon) {
34
+									return $item;
35
+				}
35 36
 			}
36 37
 		}
37 38
 	}
Please login to merge, or discard this patch.
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/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/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/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.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@  discard block
 block discarded – undo
12 12
 		$image=new HtmlImg("img-", $src, $alt);
13 13
 		$image->setClass("");
14 14
 		parent::__construct($identifier, "div", "ui image", $image);
15
-		if (isset($size))
16
-			$this->setSize($size);
15
+		if (isset($size)) {
16
+					$this->setSize($size);
17
+		}
17 18
 	}
18 19
 
19 20
 	public function setCircular() {
@@ -21,8 +22,9 @@  discard block
 block discarded – undo
21 22
 	}
22 23
 
23 24
 	public function asAvatar($caption=NULL) {
24
-		if (isset($caption))
25
-			$this->wrap("", $caption);
25
+		if (isset($caption)) {
26
+					$this->wrap("", $caption);
27
+		}
26 28
 		return $this->addToProperty("class", "avatar");
27 29
 	}
28 30
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
 	public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") {
15 15
 		parent::__construct($identifier, $tagName, "ui label");
16 16
 		$this->content=$caption;
17
-		if (isset($icon)===true)
18
-			$this->addIcon($icon);
17
+		if (isset($icon)===true) {
18
+					$this->addIcon($icon);
19
+		}
19 20
 	}
20 21
 
21 22
 	/**
@@ -24,10 +25,11 @@  discard block
 block discarded – undo
24 25
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
25 26
 	 */
26 27
 	public function setPointing($value=Direction::NONE) {
27
-		if($value==="left" || $value==="right")
28
-			return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
29
-		else
30
-			return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
28
+		if($value==="left" || $value==="right") {
29
+					return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
30
+		} else {
31
+					return $this->addToPropertyCtrl("class", "pointing ".$value, Direction::getConstantValues("pointing",true));
32
+		}
31 33
 	}
32 34
 
33 35
 	/**
@@ -121,10 +123,11 @@  discard block
 block discarded – undo
121 123
 	}
122 124
 
123 125
 	public function setAttached($side=Side::TOP,$direction=Direction::NONE){
124
-		if($direction!==Direction::NONE)
125
-			return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
126
-		else
127
-			return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
126
+		if($direction!==Direction::NONE) {
127
+					return $this->addToPropertyCtrl("class", $side." ".$direction." attached",Side::getConstantValues($direction." attached"));
128
+		} else {
129
+					return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
130
+		}
128 131
 	}
129 132
 
130 133
 	public static function ribbon($identifier, $caption) {
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlIcon.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -102,8 +102,9 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function setBordered($inverted=false) {
104 104
 		$invertedStr="";
105
-		if ($inverted !== false)
106
-			$invertedStr=" inverted";
105
+		if ($inverted !== false) {
106
+					$invertedStr=" inverted";
107
+		}
107 108
 		return $this->addToProperty("class", "bordered" . $invertedStr);
108 109
 	}
109 110
 
@@ -116,12 +117,14 @@  discard block
 block discarded – undo
116 117
 	}
117 118
 
118 119
 	public function addLabel($label, $before=false, $icon=NULL) {
119
-		if($before)
120
-			$this->wrap($label);
121
-		else
122
-			$this->wrap("", $label);
123
-		if(isset($icon))
124
-			$this->addToIcon($icon);
120
+		if($before) {
121
+					$this->wrap($label);
122
+		} else {
123
+					$this->wrap("", $label);
124
+		}
125
+		if(isset($icon)) {
126
+					$this->addToIcon($icon);
127
+		}
125 128
 		return $this;
126 129
 	}
127 130
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlReveal.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		}
24 24
 		if($content instanceof HtmlSemDoubleElement){
25 25
 			$content=new HtmlSemDoubleElement($this->identifier."-".$index,"div","",$content);
26
-		}elseif ($content instanceof HtmlImg){
26
+		} elseif ($content instanceof HtmlImg){
27 27
 			$this->addToPropertyCtrl("class", "image", array("image"));
28 28
 		}
29 29
 		$content->addToProperty("class",(($index===0)?"visible":"hidden")." content");
Please login to merge, or discard this patch.