Completed
Push — master ( 5ec30c...b92773 )
by Jean-Christophe
03:32
created
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/html5/HtmlImg.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	public function asAvatar($caption=NULL) {
17
-		if (isset($caption))
18
-			$this->wrap("", $caption);
17
+		if (isset($caption)) {
18
+					$this->wrap("", $caption);
19
+		}
19 20
 			return $this->addToProperty("class", "avatar");
20 21
 	}
21 22
 }
22 23
\ No newline at end of file
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.
Ajax/semantic/html/elements/HtmlStep.php 1 patch
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -54,26 +54,29 @@
 block discarded – undo
54 54
 			for($i=0;$i<$count;$i++){
55 55
 				$step=$this->content[$i];
56 56
 				$step->removeStatus();
57
-				if($i<$activestep)
58
-					$step->setCompleted();
59
-				elseif ($i===$activestep)
60
-					$step->setActive();
61
-				else
62
-					$step->setDisabled();
57
+				if($i<$activestep) {
58
+									$step->setCompleted();
59
+				} elseif ($i===$activestep) {
60
+									$step->setActive();
61
+				} else {
62
+									$step->setDisabled();
63
+				}
63 64
 			}
64
-		}else{
65
+		} else{
65 66
 			foreach ($this->content as $step){
66 67
 				$step->removeStatus();
67 68
 			}
68
-			if($activestep<$count)
69
-				$this->content[$activestep]->setActive();
69
+			if($activestep<$count) {
70
+							$this->content[$activestep]->setActive();
71
+			}
70 72
 		}
71 73
 		return $this;
72 74
 	}
73 75
 
74 76
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
75
-		if(isset($this->_activeStep)===true && \is_numeric($this->_activeStep))
76
-			$this->defineActiveStep();
77
+		if(isset($this->_activeStep)===true && \is_numeric($this->_activeStep)) {
78
+					$this->defineActiveStep();
79
+		}
77 80
 		return parent::compile($js,$view);
78 81
 	}
79 82
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlHeader.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 		if (isset($type)) {
20 20
 			if ($type == "page") {
21 21
 				$this->asPageHeader($niveau);
22
-			} else
23
-				$this->asContentHeader($niveau);
22
+			} else {
23
+							$this->asContentHeader($niveau);
24
+			}
24 25
 		}
25 26
 		$this->content=$content;
26 27
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionItem.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	protected function createTitleElement(){
32 32
 		$element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title");
33 33
 		$element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title));
34
-		if($this->_active===true)
35
-			$element->addToProperty("class", "active");
34
+		if($this->_active===true) {
35
+					$element->addToProperty("class", "active");
36
+		}
36 37
 		return $element;
37 38
 	}
38 39
 
@@ -43,10 +44,11 @@  discard block
 block discarded – undo
43 44
 
44 45
 	public function setActive($value=true){
45 46
 		$this->_active=$value;
46
-		if($value===true)
47
-			$this->addToPropertyCtrl("class", "active", array("active"));
48
-		else
49
-			$this->removePropertyValue("class", "active");
47
+		if($value===true) {
48
+					$this->addToPropertyCtrl("class", "active", array("active"));
49
+		} else {
50
+					$this->removePropertyValue("class", "active");
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 }
53 55
\ No newline at end of file
Please login to merge, or discard this patch.