Completed
Push — master ( c6eb31...473da9 )
by Jean-Christophe
04:09
created
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/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/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/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.
Ajax/semantic/html/content/card/HtmlCardContent.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function addImage($src="", $alt="", $size=NULL) {
36 36
 		$image=new HtmlImg("img-", $src, $alt);
37
-		if (isset($size))
38
-			$image->setSize($size);
37
+		if (isset($size)) {
38
+					$image->setSize($size);
39
+		}
39 40
 		$this->content["image"]=$image;
40 41
 		return $image;
41 42
 	}
@@ -45,8 +46,9 @@  discard block
 block discarded – undo
45 46
 			foreach ( $metas as $meta ) {
46 47
 				$this->addMeta($meta);
47 48
 			}
48
-		} else
49
-			$this->addMeta($metas);
49
+		} else {
50
+					$this->addMeta($metas);
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 
@@ -73,8 +75,9 @@  discard block
 block discarded – undo
73 75
 			$result=new HtmlSemDoubleElement("", "span", "", $caption);
74 76
 			$this->addContent($result);
75 77
 			$result->setFloated($direction);
76
-		} else
77
-			$result=$this->addContent($caption);
78
+		} else {
79
+					$result=$this->addContent($caption);
80
+		}
78 81
 		return $result;
79 82
 	}
80 83
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTR.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,17 +105,20 @@  discard block
 block discarded – undo
105 105
 			$max=\min($colIndex, $rows[$i]->count());
106 106
 			for($j=0; $j < $max; $j++) {
107 107
 				$rowspan=$rows[$i]->getItem($j)->getRowspan();
108
-				if ($rowspan + $i > $this->_row)
109
-					$pos++;
108
+				if ($rowspan + $i > $this->_row) {
109
+									$pos++;
110
+				}
110 111
 			}
111 112
 		}
112
-		if ($pos > $colIndex)
113
-			return NULL;
113
+		if ($pos > $colIndex) {
114
+					return NULL;
115
+		}
114 116
 		$count=$this->count();
115 117
 		for($i=0; $i < $count; $i++) {
116 118
 			$pos+=$this->content[$i]->getColspan();
117
-			if ($pos >= $colIndex + 1)
118
-				return $i;
119
+			if ($pos >= $colIndex + 1) {
120
+							return $i;
121
+			}
119 122
 		}
120 123
 		return null;
121 124
 	}
@@ -138,8 +141,9 @@  discard block
 block discarded – undo
138 141
 	public function containsStr($needle) {
139 142
 		$cells=$this->content;
140 143
 		foreach ( $cells as $cell ) {
141
-			if (\strpos($cell->getContent(), $needle) !== false)
142
-				return true;
144
+			if (\strpos($cell->getContent(), $needle) !== false) {
145
+							return true;
146
+			}
143 147
 		}
144 148
 		return false;
145 149
 	}
Please login to merge, or discard this patch.