@@ -33,8 +33,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -89,8 +89,9 @@ discard block |
||
| 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 |
||
| 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 | } |