Completed
Push — master ( fb7dfb...db4c08 )
by Jean-Christophe
02:42
created
Ajax/semantic/html/modules/HtmlShape.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function getSideContent($index){
54 54
 		$item= $this->getItem($index);
55
-		if(isset($item))
56
-			return $item->getContent();
55
+		if(isset($item)) {
56
+					return $item->getContent();
57
+		}
57 58
 		return null;
58 59
 	}
59 60
 
@@ -147,15 +148,17 @@  discard block
 block discarded – undo
147 148
 	 * @see BaseHtml::run()
148 149
 	 */
149 150
 	public function run(JsUtils $js) {
150
-		if (isset($this->_bsComponent) === false)
151
-			$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
151
+		if (isset($this->_bsComponent) === false) {
152
+					$this->_bsComponent=$js->semantic()->shape("#" . $this->identifier, $this->_params);
153
+		}
152 154
 		$this->addEventsOnRun($js);
153 155
 		return $this->_bsComponent;
154 156
 	}
155 157
 
156 158
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
157
-		if($this->_autoActive)
158
-			$this->setActiveSide(0);
159
+		if($this->_autoActive) {
160
+					$this->setActiveSide(0);
161
+		}
159 162
 		return parent::compile($js,$view);
160 163
 	}
161 164
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/TableElementTrait.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@
 block discarded – undo
25 25
 	}
26 26
 
27 27
 	public function setDisabled($disable=true) {
28
-		if($disable)
29
-			$this->addState(State::DISABLED);
28
+		if($disable) {
29
+					$this->addState(State::DISABLED);
30
+		}
30 31
 		return $this;
31 32
 	}
32 33
 }
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
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAbsractItem.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			$this->setTagName("div");
58 58
 			$this->removeProperty("href");
59 59
 			$this->addToPropertyCtrl("class", "active", array("active"));
60
-		}else{
60
+		} else{
61 61
 			$this->removePropertyValue("class", "active");
62 62
 		}
63 63
 		return $this;
@@ -65,8 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
 	public function asLink($href=NULL,$part=NULL){
67 67
 		$this->setTagName("a");
68
-		if(isset($href))
69
-			$this->setProperty("href", $href);
68
+		if(isset($href)) {
69
+					$this->setProperty("href", $href);
70
+		}
70 71
 		return $this;
71 72
 	}
72 73
 
@@ -77,8 +78,9 @@  discard block
 block discarded – undo
77 78
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
78 79
 	 */
79 80
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
80
-		if(\is_array($this->content) && JArray::isAssociative($this->content))
81
-			$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
81
+		if(\is_array($this->content) && JArray::isAssociative($this->content)) {
82
+					$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
83
+		}
82 84
 		return parent::compile($js, $view);
83 85
 	}
84 86
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlMessage.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,10 +68,11 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	public function setDismissable($dismiss=true){
71
-		if($dismiss===true)
72
-			$this->close=new HtmlIcon("close-".$this->identifier, "close");
73
-		else
74
-			$this->close=NULL;
71
+		if($dismiss===true) {
72
+					$this->close=new HtmlIcon("close-".$this->identifier, "close");
73
+		} else {
74
+					$this->close=NULL;
75
+		}
75 76
 		return $this;
76 77
 	}
77 78
 
@@ -115,8 +116,9 @@  discard block
 block discarded – undo
115 116
 	public function setMessage($message){
116 117
 		if(\is_array($this->content)){
117 118
 			$this->content[\sizeof($this->content)-1]=$message;
118
-		}else
119
-			$this->setContent($message);
119
+		} else {
120
+					$this->setContent($message);
121
+		}
120 122
 	}
121 123
 
122 124
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldTrait.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
 		$actionO=$action;
48 48
 		if (\is_object($action) === false) {
49 49
 			$actionO=new HtmlButton("action-" . $this->identifier, $action);
50
-			if (isset($icon))
51
-				$actionO->addIcon($icon, true, $labeled);
50
+			if (isset($icon)) {
51
+							$actionO->addIcon($icon, true, $labeled);
52
+			}
52 53
 		}
53 54
 		$field->addToProperty("class", $direction . " action");
54 55
 		$field->addContent($actionO, \strstr($direction, Direction::LEFT) !== false);
@@ -82,8 +83,9 @@  discard block
 block discarded – undo
82 83
 
83 84
 	public function setDisabled($disable=true) {
84 85
 		$field=$this->getField();
85
-		if($disable)
86
-			$field->addToProperty("class", "disabled");
86
+		if($disable) {
87
+					$field->addToProperty("class", "disabled");
88
+		}
87 89
 		return $this;
88 90
 	}
89 91
 }
Please login to merge, or discard this patch.
Ajax/common/html/PropertyWrapper.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private static function containsElement($input) {
27 27
 		foreach ( $input as $v ) {
28
-			if (\is_object($v) || \is_array($v))
29
-				return true;
28
+			if (\is_object($v) || \is_array($v)) {
29
+							return true;
30
+			}
30 31
 		}
31 32
 		return false;
32 33
 	}
@@ -44,12 +45,13 @@  discard block
 block discarded – undo
44 45
 
45 46
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46 47
 		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
47
-			if (is_object($v))
48
-				return $v->compile($js);
49
-			elseif (\is_array($v)) {
48
+			if (is_object($v)) {
49
+							return $v->compile($js);
50
+			} elseif (\is_array($v)) {
50 51
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
52
-				return $v;
52
+			} else {
53
+							return $v;
54
+			}
53 55
 		}, $input));
54 56
 	}
55 57
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlInputgroup.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -28,10 +28,11 @@  discard block
 block discarded – undo
28 28
 		$this->setProperty("aria-describedby", $id);
29 29
 		$span->setContent($text);
30 30
 		$span->setClass("input-group-addon");
31
-		if (strtolower($position)==="left")
32
-			$this->addonLeft=$span;
33
-		else
34
-			$this->addonRight=$span;
31
+		if (strtolower($position)==="left") {
32
+					$this->addonLeft=$span;
33
+		} else {
34
+					$this->addonRight=$span;
35
+		}
35 36
 		return $span;
36 37
 	}
37 38
 
@@ -74,7 +75,7 @@  discard block
 block discarded – undo
74 75
 			$bt=NULL;
75 76
 			if(is_string($item)){
76 77
 				$bt=new HtmlButton($this->identifier."-bt-".$i++,$item);
77
-			}elseif ($item instanceof HtmlButton){
78
+			} elseif ($item instanceof HtmlButton){
78 79
 				$bt=$item;
79 80
 			}
80 81
 			if(isset($bt)){
@@ -88,10 +89,11 @@  discard block
 block discarded – undo
88 89
 		$dropdown->setBtnCaption($caption);
89 90
 		$dropdown->fromArray($items);
90 91
 
91
-		if (strtolower($position)==="left")
92
-			$this->addonLeft=$dropdown;
93
-		else
94
-			$this->addonRight=$dropdown;
92
+		if (strtolower($position)==="left") {
93
+					$this->addonLeft=$dropdown;
94
+		} else {
95
+					$this->addonRight=$dropdown;
96
+		}
95 97
 		return $dropdown;
96 98
 	}
97 99
 
@@ -126,10 +128,12 @@  discard block
 block discarded – undo
126 128
 
127 129
 	public function run(JsUtils $js) {
128 130
 		parent::run($js);
129
-		if (isset($this->addonLeft))
130
-			$this->addonLeft->run($js);
131
-		if (isset($this->addonRight))
132
-			$this->addonRight->run($js);
131
+		if (isset($this->addonLeft)) {
132
+					$this->addonLeft->run($js);
133
+		}
134
+		if (isset($this->addonRight)) {
135
+					$this->addonRight->run($js);
136
+		}
133 137
 	}
134 138
 
135 139
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlAccordion.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	public function getPanel($index) {
72
-		if ($index<sizeof($this->content))
73
-			return $this->content [$index];
72
+		if ($index<sizeof($this->content)) {
73
+					return $this->content [$index];
74
+		}
74 75
 	}
75 76
 }
Please login to merge, or discard this patch.