@@ -13,14 +13,16 @@ |
||
| 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 | \ No newline at end of file |
@@ -49,9 +49,9 @@ |
||
| 49 | 49 | * @return $this |
| 50 | 50 | */ |
| 51 | 51 | public function setAnimate($value) { |
| 52 | - if ($value instanceof Animation) |
|
| 53 | - $value=$value->getParams(); |
|
| 54 | - else if (is_string($value)) { |
|
| 52 | + if ($value instanceof Animation) { |
|
| 53 | + $value=$value->getParams(); |
|
| 54 | + } else if (is_string($value)) { |
|
| 55 | 55 | $animation=new Animation(); |
| 56 | 56 | $animation->setEasing($value); |
| 57 | 57 | } |
@@ -15,8 +15,9 @@ |
||
| 15 | 15 | class DialogButton extends BaseComponent { |
| 16 | 16 | |
| 17 | 17 | private function addFunction($jsCode) { |
| 18 | - if (!Text::startsWith($jsCode, "function")) |
|
| 19 | - $jsCode="%function(){" . $jsCode . "}%"; |
|
| 18 | + if (!Text::startsWith($jsCode, "function")) { |
|
| 19 | + $jsCode="%function(){" . $jsCode . "}%"; |
|
| 20 | + } |
|
| 20 | 21 | return $jsCode; |
| 21 | 22 | } |
| 22 | 23 | |
@@ -74,8 +74,9 @@ |
||
| 74 | 74 | protected function setParamCtrl($key, $value, $typeCtrl) { |
| 75 | 75 | if (!$typeCtrl($value)) { |
| 76 | 76 | throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." à la position"); |
| 77 | - } else |
|
| 78 | - $this->setParam($key, $value); |
|
| 77 | + } else { |
|
| 78 | + $this->setParam($key, $value); |
|
| 79 | + } |
|
| 79 | 80 | } |
| 80 | 81 | |
| 81 | 82 | /* |
@@ -52,10 +52,11 @@ discard block |
||
| 52 | 52 | $this->from=$from; |
| 53 | 53 | $this->to=$to; |
| 54 | 54 | $this->urlMask="%page%"; |
| 55 | - if(!isset($countVisible)) |
|
| 56 | - $this->countVisible=$to-$from+1; |
|
| 57 | - else |
|
| 58 | - $this->countVisible=$countVisible; |
|
| 55 | + if(!isset($countVisible)) { |
|
| 56 | + $this->countVisible=$to-$from+1; |
|
| 57 | + } else { |
|
| 58 | + $this->countVisible=$countVisible; |
|
| 59 | + } |
|
| 59 | 60 | $this->createContent(); |
| 60 | 61 | } |
| 61 | 62 | |
@@ -74,7 +75,7 @@ discard block |
||
| 74 | 75 | $href=new HtmlLink("a-".$this->identifier."-".$count,$url,$content); |
| 75 | 76 | $href->setProperty($this->attr, $url); |
| 76 | 77 | $elem->setContent($href); |
| 77 | - }else{ |
|
| 78 | + } else{ |
|
| 78 | 79 | $elem->setContent($content); |
| 79 | 80 | } |
| 80 | 81 | $this->content[]=$elem; |
@@ -107,8 +108,9 @@ discard block |
||
| 107 | 108 | public function _addEvent($event, $jsCode) { |
| 108 | 109 | foreach ($this->content as $li){ |
| 109 | 110 | $content=$li->getContent(); |
| 110 | - if($content instanceof BaseHtml) |
|
| 111 | - $content->_addEvent($event,$jsCode); |
|
| 111 | + if($content instanceof BaseHtml) { |
|
| 112 | + $content->_addEvent($event,$jsCode); |
|
| 113 | + } |
|
| 112 | 114 | } |
| 113 | 115 | } |
| 114 | 116 | /** |
@@ -146,8 +148,9 @@ discard block |
||
| 146 | 148 | if (is_int($size)) { |
| 147 | 149 | return $this->addToPropertyUnique("class", CssRef::sizes("pagination")[$size], CssRef::sizes("pagination")); |
| 148 | 150 | } |
| 149 | - if(!PhalconUtils::startsWith($size, "pagination-") && $size!=="") |
|
| 150 | - $size="pagination-".$size; |
|
| 151 | + if(!PhalconUtils::startsWith($size, "pagination-") && $size!=="") { |
|
| 152 | + $size="pagination-".$size; |
|
| 153 | + } |
|
| 151 | 154 | return $this->addToPropertyCtrl("class", $size, CssRef::sizes("pagination")); |
| 152 | 155 | } |
| 153 | 156 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function getCol($index,$force=true){ |
| 35 | 35 | if($index<sizeof($this->cols)+1){ |
| 36 | 36 | $result=$this->cols[$index-1]; |
| 37 | - }else if ($force){ |
|
| 37 | + } else if ($force){ |
|
| 38 | 38 | $result=$this->addColAt(CssSize::SIZE_MD,1,$index); |
| 39 | 39 | $this->cols[]=$result; |
| 40 | 40 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function getCol($index,$force=true){ |
| 43 | 43 | if($index<sizeof($this->cols)+1){ |
| 44 | 44 | $result=$this->cols[$index-1]; |
| 45 | - }else if ($force){ |
|
| 45 | + } else if ($force){ |
|
| 46 | 46 | $result=$this->addColAt(CssSize::SIZE_MD,1,$index); |
| 47 | 47 | } |
| 48 | 48 | return $result; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $this->cols = array_values($this->cols); |
| 96 | 96 | $width=$width-$widthCol; |
| 97 | 97 | } |
| 98 | - }else{ |
|
| 98 | + } else{ |
|
| 99 | 99 | $width=0; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -17,8 +17,9 @@ discard block |
||
| 17 | 17 | $value1=reset($input); |
| 18 | 18 | if (is_object($value1)) { |
| 19 | 19 | $output=PropertyWrapper::wrapObjects($input, $js, $separator=' '); |
| 20 | - } else |
|
| 21 | - $output=PropertyWrapper::wrapStrings($input, $separator=' ', $valueQuote='"'); |
|
| 20 | + } else { |
|
| 21 | + $output=PropertyWrapper::wrapStrings($input, $separator=' ', $valueQuote='"'); |
|
| 22 | + } |
|
| 22 | 23 | } |
| 23 | 24 | } |
| 24 | 25 | return $output; |
@@ -37,10 +38,11 @@ discard block |
||
| 37 | 38 | |
| 38 | 39 | public static function wrapObjects($input, $js=NULL, $separator=' ') { |
| 39 | 40 | return implode($separator, array_map(function ($v) use($js) { |
| 40 | - if (is_object($v)) |
|
| 41 | - return $v->compile($js); |
|
| 42 | - else |
|
| 43 | - return $v; |
|
| 41 | + if (is_object($v)) { |
|
| 42 | + return $v->compile($js); |
|
| 43 | + } else { |
|
| 44 | + return $v; |
|
| 45 | + } |
|
| 44 | 46 | }, $input)); |
| 45 | 47 | } |
| 46 | 48 | } |
| 47 | 49 | \ No newline at end of file |
@@ -33,11 +33,12 @@ discard block |
||
| 33 | 33 | foreach ($this->content as $pb){ |
| 34 | 34 | $pb->setActive($value); |
| 35 | 35 | } |
| 36 | - }else{ |
|
| 37 | - if ($value===true) |
|
| 38 | - $this->active="active"; |
|
| 39 | - else |
|
| 40 | - $this->active=""; |
|
| 36 | + } else{ |
|
| 37 | + if ($value===true) { |
|
| 38 | + $this->active="active"; |
|
| 39 | + } else { |
|
| 40 | + $this->active=""; |
|
| 41 | + } |
|
| 41 | 42 | } |
| 42 | 43 | return $this; |
| 43 | 44 | } |
@@ -47,11 +48,12 @@ discard block |
||
| 47 | 48 | foreach ($this->content as $pb){ |
| 48 | 49 | $pb->setStriped($value); |
| 49 | 50 | } |
| 50 | - }else{ |
|
| 51 | - if ($value===true) |
|
| 52 | - $this->striped="progress-bar-striped"; |
|
| 53 | - else |
|
| 54 | - $this->striped=""; |
|
| 51 | + } else{ |
|
| 52 | + if ($value===true) { |
|
| 53 | + $this->striped="progress-bar-striped"; |
|
| 54 | + } else { |
|
| 55 | + $this->striped=""; |
|
| 56 | + } |
|
| 55 | 57 | } |
| 56 | 58 | return $this; |
| 57 | 59 | } |
@@ -61,11 +63,12 @@ discard block |
||
| 61 | 63 | foreach ($this->content as $pb){ |
| 62 | 64 | $pb->showCaption($value); |
| 63 | 65 | } |
| 64 | - }else{ |
|
| 65 | - if ($value===true) |
|
| 66 | - $this->caption="%value%%"; |
|
| 67 | - else |
|
| 68 | - $this->caption='<span class="sr-only">%value%% Complete (%style%)</span>'; |
|
| 66 | + } else{ |
|
| 67 | + if ($value===true) { |
|
| 68 | + $this->caption="%value%%"; |
|
| 69 | + } else { |
|
| 70 | + $this->caption='<span class="sr-only">%value%% Complete (%style%)</span>'; |
|
| 71 | + } |
|
| 69 | 72 | } |
| 70 | 73 | return $this; |
| 71 | 74 | } |
@@ -137,10 +140,11 @@ discard block |
||
| 137 | 140 | if(isset($this->styleLimits)&& JArray::isAssociative($this->styleLimits)){ |
| 138 | 141 | foreach ($this->styleLimits as $k=>$v){ |
| 139 | 142 | $actualStyle=$k; |
| 140 | - if($v>=$this->value) |
|
| 141 | - break; |
|
| 142 | - else |
|
| 143 | - $actualStyle=$this->style; |
|
| 143 | + if($v>=$this->value) { |
|
| 144 | + break; |
|
| 145 | + } else { |
|
| 146 | + $actualStyle=$this->style; |
|
| 147 | + } |
|
| 144 | 148 | } |
| 145 | 149 | } |
| 146 | 150 | $this->style=$actualStyle; |