Completed
Push — master ( 916f6f...ea2a7d )
by Jean-Christophe
03:42
created
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 $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/HtmlLabel.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
 	public function __construct($identifier,$caption="",$icon=NULL,$tagName="div") {
14 14
 		parent::__construct($identifier,$tagName,"ui label");
15 15
 		$this->content=$caption;
16
-		if(isset($icon))
17
-			$this->addIcon($icon);
16
+		if(isset($icon)) {
17
+					$this->addIcon($icon);
18
+		}
18 19
 	}
19 20
 
20 21
 	/**
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
@@ -10,8 +10,9 @@  discard block
 block discarded – undo
10 10
 	public function __construct($identifier, $src="", $alt="",$size=NULL) {
11 11
 		$image=new HtmlImg("img-",$src,$alt);
12 12
 		parent::__construct($identifier, "div","ui image",$image);
13
-		if(isset($size))
14
-			$this->setSize($size);
13
+		if(isset($size)) {
14
+					$this->setSize($size);
15
+		}
15 16
 	}
16 17
 
17 18
 	public function setCircular(){
@@ -19,8 +20,9 @@  discard block
 block discarded – undo
19 20
 	}
20 21
 
21 22
 	public function asAvatar($caption=NULL){
22
-		if(isset($caption))
23
-			$this->wrap("",$caption);
23
+		if(isset($caption)) {
24
+					$this->wrap("",$caption);
25
+		}
24 26
 		return $this->addToProperty("class", "avatar");
25 27
 	}
26 28
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlStepItem.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 				$title=JArray::getValue($content, "title",1);
19 19
 				$desc=JArray::getValue($content, "description",2);
20 20
 				$status=JArray::getValue($content, "status",3);
21
-			}else{
21
+			} else{
22 22
 				$icon=@$content["icon"];
23 23
 				$title=@$content["title"];
24 24
 				$desc=@$content["description"];
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			if(isset($title)===true){
34 34
 				$this->setTitle($title,$desc);
35 35
 			}
36
-		}else{
36
+		} else{
37 37
 			$this->setContent($content);
38 38
 		}
39 39
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTableContent.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) {
24 24
 		parent::__construct($identifier, $tagName, "");
25
-		if (isset($rowCount)&&isset($colCount))
26
-			$this->setRowCount($rowCount, $colCount);
25
+		if (isset($rowCount)&&isset($colCount)) {
26
+					$this->setRowCount($rowCount, $colCount);
27
+		}
27 28
 	}
28 29
 
29 30
 	/**
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
 			$values=\array_fill(0, $count, $values);
108 109
 			$isArray=false;
109 110
 		}
110
-		if (JArray::dimension($values)==1&&$isArray)
111
-			$values=[ $values ];
111
+		if (JArray::dimension($values)==1&&$isArray) {
112
+					$values=[ $values ];
113
+		}
112 114
 		
113 115
 		$count=\min(\sizeof($values), $count);
114 116
 		
@@ -170,8 +172,9 @@  discard block
 block discarded – undo
170 172
 	 */
171 173
 	public function getColCount() {
172 174
 		$result=0;
173
-		if ($this->count()>0)
174
-			$result=$this->getItem(0)->getColCount();
175
+		if ($this->count()>0) {
176
+					$result=$this->getItem(0)->getColCount();
177
+		}
175 178
 		return $result;
176 179
 	}
177 180
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlTable.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,15 +106,17 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	public function colCenter($colIndex) {
109
-		if ($this->hasPart("thead"))
110
-			$this->getHeader()->colCenter($colIndex);
109
+		if ($this->hasPart("thead")) {
110
+					$this->getHeader()->colCenter($colIndex);
111
+		}
111 112
 		$this->getBody()->colCenter($colIndex);
112 113
 		return $this;
113 114
 	}
114 115
 
115 116
 	public function colRight($colIndex) {
116
-		if ($this->hasPart("thead"))
117
-			$this->getHeader()->colRight($colIndex);
117
+		if ($this->hasPart("thead")) {
118
+					$this->getHeader()->colRight($colIndex);
119
+		}
118 120
 		$this->getBody()->colRight($colIndex);
119 121
 		return $this;
120 122
 	}
@@ -124,8 +126,9 @@  discard block
 block discarded – undo
124 126
 	}
125 127
 
126 128
 	public function setBasic($very=false) {
127
-		if ($very)
128
-			$this->addToPropertyCtrl("class", "very", array ("very" ));
129
+		if ($very) {
130
+					$this->addToPropertyCtrl("class", "very", array ("very" ));
131
+		}
129 132
 		return $this->addToPropertyCtrl("class", "basic", array ("basic" ));
130 133
 	}
131 134
 
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
@@ -18,8 +18,9 @@
 block discarded – undo
18 18
 		if (isset($type)) {
19 19
 			if ($type=="page") {
20 20
 				$this->asPageHeader($niveau);
21
-			} else
22
-				$this->asContentHeader($niveau);
21
+			} else {
22
+							$this->asContentHeader($niveau);
23
+			}
23 24
 		}
24 25
 		$this->content=$content;
25 26
 	}
Please login to merge, or discard this patch.
Ajax/service/JArray.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,21 +14,24 @@  discard block
 block discarded – undo
14 14
 			return $array[$key];
15 15
 		}
16 16
 		$values=array_values($array);
17
-		if ($pos<sizeof($values))
18
-			return $values[$pos];
17
+		if ($pos<sizeof($values)) {
18
+					return $values[$pos];
19
+		}
19 20
 	}
20 21
 
21 22
 	public static function getConditionalValue($array, $key, $condition) {
22 23
 		$result=NULL;
23 24
 		if (array_key_exists($key, $array)) {
24 25
 			$result=$array[$key];
25
-			if ($condition($result)===true)
26
-				return $result;
26
+			if ($condition($result)===true) {
27
+							return $result;
28
+			}
27 29
 		}
28 30
 		$values=array_values($array);
29 31
 		foreach ( $values as $val ) {
30
-			if ($condition($val)===true)
31
-				return $val;
32
+			if ($condition($val)===true) {
33
+							return $val;
34
+			}
32 35
 		}
33 36
 		return $result;
34 37
 	}
@@ -36,8 +39,9 @@  discard block
 block discarded – undo
36 39
 	public static function getDefaultValue($array, $key, $default=NULL) {
37 40
 		if (array_key_exists($key, $array)) {
38 41
 			return $array[$key];
39
-		} else
40
-			return $default;
42
+		} else {
43
+					return $default;
44
+		}
41 45
 	}
42 46
 
43 47
 	public static function implode($glue, $pieces) {
Please login to merge, or discard this patch.