@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | if(is_array($element)){ |
| 66 | 66 | $elm=new HtmlLink("lnk-".$this->identifier."-".$size); |
| 67 | 67 | $elm->fromArray($element); |
| 68 | - }else if($element instanceof HtmlLink){ |
|
| 68 | + } else if($element instanceof HtmlLink){ |
|
| 69 | 69 | $elm=$element; |
| 70 | - }else{ |
|
| 70 | + } else{ |
|
| 71 | 71 | $elm=new HtmlLink("lnk-".$this->identifier."-".$size,$href,$element); |
| 72 | 72 | if(isset($glyph)){ |
| 73 | 73 | $elm->wrapContentWithGlyph($glyph); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | if($this->absolutePaths===true){ |
| 116 | 116 | return $this->_hrefFunction($this->content[$index]); |
| 117 | - }else{ |
|
| 117 | + } else{ |
|
| 118 | 118 | return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1)); |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -204,8 +204,9 @@ discard block |
||
| 204 | 204 | if(\sizeof($params)>0 || \strtolower($action)!="index" ){ |
| 205 | 205 | $items[]=$action; |
| 206 | 206 | foreach ($params as $p){ |
| 207 | - if(\is_object($p)===false) |
|
| 208 | - $items[]=$p; |
|
| 207 | + if(\is_object($p)===false) { |
|
| 208 | + $items[]=$p; |
|
| 209 | + } |
|
| 209 | 210 | } |
| 210 | 211 | } |
| 211 | 212 | return $this->addElements($items); |
@@ -92,8 +92,9 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | public function setCircular($inverted=false){ |
| 94 | 94 | $invertedStr=""; |
| 95 | - if($inverted!==false) |
|
| 96 | - $invertedStr=" inverted"; |
|
| 95 | + if($inverted!==false) { |
|
| 96 | + $invertedStr=" inverted"; |
|
| 97 | + } |
|
| 97 | 98 | return $this->addToMember($this->attributes, "circular".$invertedStr); |
| 98 | 99 | } |
| 99 | 100 | |
@@ -110,8 +111,9 @@ discard block |
||
| 110 | 111 | */ |
| 111 | 112 | public function setBordered($inverted=false){ |
| 112 | 113 | $invertedStr=""; |
| 113 | - if($inverted!==false) |
|
| 114 | - $invertedStr=" inverted"; |
|
| 114 | + if($inverted!==false) { |
|
| 115 | + $invertedStr=" inverted"; |
|
| 116 | + } |
|
| 115 | 117 | return $this->addToMember($this->attributes, "bordered".$invertedStr); |
| 116 | 118 | } |
| 117 | 119 | |
@@ -22,8 +22,9 @@ |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function setAlignement($value="justified"){ |
| 25 | - if($value!=="justified") |
|
| 26 | - $value.=" aligned"; |
|
| 25 | + if($value!=="justified") { |
|
| 26 | + $value.=" aligned"; |
|
| 27 | + } |
|
| 27 | 28 | return $this->addToProperty("class", $value); |
| 28 | 29 | } |
| 29 | 30 | |
@@ -15,8 +15,9 @@ discard block |
||
| 15 | 15 | parent::__construct($identifier, "div"); |
| 16 | 16 | $this->setProperty("class", "ui buttons"); |
| 17 | 17 | $this->content=array(); |
| 18 | - if($asIcons===true) |
|
| 19 | - $this->asIcons(); |
|
| 18 | + if($asIcons===true) { |
|
| 19 | + $this->asIcons(); |
|
| 20 | + } |
|
| 20 | 21 | $this->addElements($elements,$asIcons); |
| 21 | 22 | } |
| 22 | 23 | public function addElement($element,$asIcon=false){ |
@@ -25,8 +26,9 @@ discard block |
||
| 25 | 26 | if($asIcon){ |
| 26 | 27 | $elementO=new HtmlButton("button-".\sizeof($this->content)); |
| 27 | 28 | $elementO->asIcon($element); |
| 28 | - }else |
|
| 29 | - $elementO=new HtmlButton("button-".\sizeof($this->content),$element); |
|
| 29 | + } else { |
|
| 30 | + $elementO=new HtmlButton("button-".\sizeof($this->content),$element); |
|
| 31 | + } |
|
| 30 | 32 | } |
| 31 | 33 | $this->addContent($elementO); |
| 32 | 34 | } |
@@ -72,9 +74,9 @@ discard block |
||
| 72 | 74 | * @return HtmlButton |
| 73 | 75 | */ |
| 74 | 76 | public function getElement($index) { |
| 75 | - if (is_int($index)) |
|
| 76 | - return $this->content[$index]; |
|
| 77 | - else { |
|
| 77 | + if (is_int($index)) { |
|
| 78 | + return $this->content[$index]; |
|
| 79 | + } else { |
|
| 78 | 80 | $elm=$this->getElementById($index, $this->content); |
| 79 | 81 | return $elm; |
| 80 | 82 | } |