Passed
Push — master ( 35deb2...555729 )
by Jean-Christophe
03:41
created
Ajax/common/html/traits/BaseHtmlPropertiesTrait.php 1 patch
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	public function getProperty($name) {
36
-		if (array_key_exists($name, $this->_self->properties))
37
-			return $this->_self->properties[$name];
36
+		if (array_key_exists($name, $this->_self->properties)) {
37
+					return $this->_self->properties[$name];
38
+		}
38 39
 	}
39 40
 
40 41
 	/**
@@ -51,10 +52,11 @@  discard block
 block discarded – undo
51 52
 		} else if ($value !== "" && $this->_self->propertyContains($name, $value) === false) {
52 53
 			if(isset($this->_self->properties[$name])){
53 54
 				$v=$this->_self->properties[$name];
54
-				if (isset($v) && $v !== "")
55
-					$v=$v . $separator . $value;
56
-					else
57
-						$v=$value;
55
+				if (isset($v) && $v !== "") {
56
+									$v=$v . $separator . $value;
57
+				} else {
58
+											$v=$value;
59
+					}
58 60
 	
59 61
 				return $this->_self->setProperty($name, $v);
60 62
 			}
@@ -78,8 +80,9 @@  discard block
 block discarded – undo
78 80
 	}
79 81
 
80 82
 	protected function addToPropertyUnique($name, $value, $typeCtrl) {
81
-		if (is_string($typeCtrl) && @class_exists($typeCtrl, true))
82
-			$typeCtrl=$typeCtrl::getConstants();
83
+		if (is_string($typeCtrl) && @class_exists($typeCtrl, true)) {
84
+					$typeCtrl=$typeCtrl::getConstants();
85
+		}
83 86
 			if (\is_array($typeCtrl)) {
84 87
 				$this->_self->removeOldValues($this->_self->properties[$name], $typeCtrl);
85 88
 			}
@@ -98,8 +101,9 @@  discard block
 block discarded – undo
98 101
 	}
99 102
 
100 103
 	public function removeProperty($name) {
101
-		if (\array_key_exists($name, $this->_self->properties))
102
-			unset($this->_self->properties[$name]);
104
+		if (\array_key_exists($name, $this->_self->properties)) {
105
+					unset($this->_self->properties[$name]);
106
+		}
103 107
 			return $this;
104 108
 	}
105 109
 
@@ -112,8 +116,9 @@  discard block
 block discarded – undo
112 116
 	}
113 117
 
114 118
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
115
-		if ($this->_self->ctrl($name, $value, $typeCtrl) === true)
116
-			return $this->_self->setProperty($name, $value);
119
+		if ($this->_self->ctrl($name, $value, $typeCtrl) === true) {
120
+					return $this->_self->setProperty($name, $value);
121
+		}
117 122
 			return $this;
118 123
 	}
119 124
 
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlPanel.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Ajax\bootstrap\html\HtmlPanel default : "panel-default"
90 90
 	 */
91 91
 	public function setStyle($cssStyle) {
92
-		if (!JString::startsWith($cssStyle, "panel"))
93
-			$cssStyle="panel".$cssStyle;
92
+		if (!JString::startsWith($cssStyle, "panel")) {
93
+					$cssStyle="panel".$cssStyle;
94
+		}
94 95
 		return $this->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("panel"));
95 96
 	}
96 97
 
@@ -132,7 +133,8 @@  discard block
 block discarded – undo
132 133
 	 * @return $this default : false
133 134
 	 */
134 135
 	public function show($value) {
135
-		if ($this->_collapsable)
136
-			$this->_showOnStartup=$value;
136
+		if ($this->_collapsable) {
137
+					$this->_showOnStartup=$value;
138
+		}
137 139
 	}
138 140
 }
Please login to merge, or discard this patch.