@@ -13,15 +13,17 @@ discard block |
||
13 | 13 | return $array [$key]; |
14 | 14 | } |
15 | 15 | $values=array_values($array); |
16 | - if ($pos<sizeof($values)) |
|
17 | - return $values [$pos]; |
|
16 | + if ($pos<sizeof($values)) { |
|
17 | + return $values [$pos]; |
|
18 | + } |
|
18 | 19 | } |
19 | 20 | |
20 | 21 | public static function getDefaultValue($array, $key, $default) { |
21 | 22 | if (array_key_exists($key, $array)) { |
22 | 23 | return $array [$key]; |
23 | - } else |
|
24 | - return $default; |
|
24 | + } else { |
|
25 | + return $default; |
|
26 | + } |
|
25 | 27 | } |
26 | 28 | |
27 | 29 | public static function implode($glue,$pieces){ |
@@ -34,7 +36,7 @@ discard block |
||
34 | 36 | } |
35 | 37 | $result.=$pieces[$size-1]; |
36 | 38 | } |
37 | - }else{ |
|
39 | + } else{ |
|
38 | 40 | $result=\implode($glue, $pieces); |
39 | 41 | } |
40 | 42 | return $result; |
@@ -50,8 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function _setDi($di) { |
52 | 52 | $this->_di=$di; |
53 | - if ($this->js!=null&&$di!=null) |
|
54 | - $this->js->setDi($di); |
|
53 | + if ($this->js!=null&&$di!=null) { |
|
54 | + $this->js->setDi($di); |
|
55 | + } |
|
55 | 56 | } |
56 | 57 | |
57 | 58 | /** |
@@ -1130,12 +1131,14 @@ discard block |
||
1130 | 1131 | $result[1]=$cdn; |
1131 | 1132 | break; |
1132 | 1133 | case "Ajax\lib\CDNCoreCss": |
1133 | - if($cdn->getFramework()==="Bootstrap") |
|
1134 | - $hasBootstrap=true; |
|
1135 | - elseif($cdn->getFramework()==="Semantic") |
|
1136 | - $hasSemantic=true; |
|
1137 | - if($hasSemantic || $hasBootstrap) |
|
1138 | - $result[2]=$cdn; |
|
1134 | + if($cdn->getFramework()==="Bootstrap") { |
|
1135 | + $hasBootstrap=true; |
|
1136 | + } elseif($cdn->getFramework()==="Semantic") { |
|
1137 | + $hasSemantic=true; |
|
1138 | + } |
|
1139 | + if($hasSemantic || $hasBootstrap) { |
|
1140 | + $result[2]=$cdn; |
|
1141 | + } |
|
1139 | 1142 | break; |
1140 | 1143 | } |
1141 | 1144 | } |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function setFocusable($value=true){ |
56 | - if($value===true) |
|
57 | - $this->setProperty("tabindex", "0"); |
|
58 | - else{ |
|
56 | + if($value===true) { |
|
57 | + $this->setProperty("tabindex", "0"); |
|
58 | + } else{ |
|
59 | 59 | $this->removeProperty("tabindex"); |
60 | 60 | } |
61 | 61 | return $this; |
@@ -172,8 +172,9 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | public static function getSocial($identifier,$social,$value=NULL){ |
175 | - if($value===NULL) |
|
176 | - $value=\ucfirst($social); |
|
175 | + if($value===NULL) { |
|
176 | + $value=\ucfirst($social); |
|
177 | + } |
|
177 | 178 | $return=new HtmlButton($identifier,$value); |
178 | 179 | $return->addIcon($social); |
179 | 180 | return $return->addToPropertyCtrl("class", $social, Social::getConstants()); |
@@ -34,8 +34,9 @@ |
||
34 | 34 | * @see BaseHtml::run() |
35 | 35 | */ |
36 | 36 | public function run(JsUtils $js) { |
37 | - if(isset($this->_bsComponent)===false) |
|
38 | - $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
37 | + if(isset($this->_bsComponent)===false) { |
|
38 | + $this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params); |
|
39 | + } |
|
39 | 40 | $this->addEventsOnRun($js); |
40 | 41 | return $this->_bsComponent; |
41 | 42 | } |