@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
| 17 | 17 | $this->addContent($iconO,false); |
| 18 | 18 | $this->_hasIcon=true; |
| 19 | - }else{ |
|
| 19 | + } else{ |
|
| 20 | 20 | $iconO=$this->getIcon(); |
| 21 | 21 | $iconO->setIcon($icon); |
| 22 | 22 | $this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon")); |
@@ -27,8 +27,9 @@ discard block |
||
| 27 | 27 | public function getIcon(){ |
| 28 | 28 | if(\is_array($this->content)){ |
| 29 | 29 | foreach ($this->content as $item){ |
| 30 | - if($item instanceof HtmlIcon) |
|
| 31 | - return $item; |
|
| 30 | + if($item instanceof HtmlIcon) { |
|
| 31 | + return $item; |
|
| 32 | + } |
|
| 32 | 33 | } |
| 33 | 34 | } |
| 34 | 35 | } |
@@ -96,10 +96,11 @@ |
||
| 96 | 96 | |
| 97 | 97 | protected function setDivider($divider,$index){ |
| 98 | 98 | if(isset($index)){ |
| 99 | - if(\is_array($this->_contentSeparator)===false) |
|
| 100 | - $this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator); |
|
| 99 | + if(\is_array($this->_contentSeparator)===false) { |
|
| 100 | + $this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator); |
|
| 101 | + } |
|
| 101 | 102 | $this->_contentSeparator[$index]=$divider; |
| 102 | - }else{ |
|
| 103 | + } else{ |
|
| 103 | 104 | $this->_contentSeparator=$divider; |
| 104 | 105 | } |
| 105 | 106 | return $this; |
@@ -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; |