@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | foreach ($actions as $action){ |
44 | 44 | $this->addAction($action); |
45 | 45 | } |
46 | - } |
|
47 | - else{ |
|
46 | + } else{ |
|
48 | 47 | $this->addAction($actions); |
49 | 48 | } |
50 | 49 | return $this; |
@@ -60,8 +59,9 @@ discard block |
||
60 | 59 | $class="cancel"; |
61 | 60 | } |
62 | 61 | $action=new HtmlButton("action-".$this->identifier,$action); |
63 | - if($class!=="") |
|
64 | - $action->addToProperty("class", $class); |
|
62 | + if($class!=="") { |
|
63 | + $action->addToProperty("class", $class); |
|
64 | + } |
|
65 | 65 | } |
66 | 66 | return $this->addElementInPart($action, "actions"); |
67 | 67 | } |
@@ -169,8 +169,9 @@ discard block |
||
169 | 169 | * @see BaseHtml::run() |
170 | 170 | */ |
171 | 171 | public function run(JsUtils $js) { |
172 | - if(isset($this->_bsComponent)===false) |
|
173 | - $this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts); |
|
172 | + if(isset($this->_bsComponent)===false) { |
|
173 | + $this->_bsComponent=$js->semantic()->modal("#".$this->identifier,$this->_params,$this->_paramParts); |
|
174 | + } |
|
174 | 175 | $this->addEventsOnRun($js); |
175 | 176 | return $this->_bsComponent; |
176 | 177 | } |
@@ -10,8 +10,9 @@ |
||
10 | 10 | |
11 | 11 | public function __construct($identifier,$context=NULL,$content=NULL) { |
12 | 12 | parent::__construct($identifier, "div", "ui sticky", $content); |
13 | - if(isset($content)) |
|
14 | - $this->setContext($context); |
|
13 | + if(isset($content)) { |
|
14 | + $this->setContext($context); |
|
15 | + } |
|
15 | 16 | } |
16 | 17 | |
17 | 18 | public function setContext($context){ |
@@ -12,8 +12,9 @@ discard block |
||
12 | 12 | $image=new HtmlImg("img-", $src, $alt); |
13 | 13 | $image->setClass(""); |
14 | 14 | parent::__construct($identifier, "div", "ui image", $image); |
15 | - if (isset($size)) |
|
16 | - $this->setSize($size); |
|
15 | + if (isset($size)) { |
|
16 | + $this->setSize($size); |
|
17 | + } |
|
17 | 18 | } |
18 | 19 | |
19 | 20 | public function setCircular() { |
@@ -21,8 +22,9 @@ discard block |
||
21 | 22 | } |
22 | 23 | |
23 | 24 | public function asAvatar($caption=NULL) { |
24 | - if (isset($caption)) |
|
25 | - $this->wrap("", $caption); |
|
25 | + if (isset($caption)) { |
|
26 | + $this->wrap("", $caption); |
|
27 | + } |
|
26 | 28 | return $this->addToProperty("class", "avatar"); |
27 | 29 | } |
28 | 30 |
@@ -102,8 +102,9 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function setBordered($inverted=false) { |
104 | 104 | $invertedStr=""; |
105 | - if ($inverted !== false) |
|
106 | - $invertedStr=" inverted"; |
|
105 | + if ($inverted !== false) { |
|
106 | + $invertedStr=" inverted"; |
|
107 | + } |
|
107 | 108 | return $this->addToProperty("class", "bordered" . $invertedStr); |
108 | 109 | } |
109 | 110 | |
@@ -116,12 +117,14 @@ discard block |
||
116 | 117 | } |
117 | 118 | |
118 | 119 | public function addLabel($label, $before=false, $icon=NULL) { |
119 | - if($before) |
|
120 | - $this->wrap($label); |
|
121 | - else |
|
122 | - $this->wrap("", $label); |
|
123 | - if(isset($icon)) |
|
124 | - $this->addToIcon($icon); |
|
120 | + if($before) { |
|
121 | + $this->wrap($label); |
|
122 | + } else { |
|
123 | + $this->wrap("", $label); |
|
124 | + } |
|
125 | + if(isset($icon)) { |
|
126 | + $this->addToIcon($icon); |
|
127 | + } |
|
125 | 128 | return $this; |
126 | 129 | } |
127 | 130 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | } |
24 | 24 | if($content instanceof HtmlSemDoubleElement){ |
25 | 25 | $content=new HtmlSemDoubleElement($this->identifier."-".$index,"div","",$content); |
26 | - }elseif ($content instanceof HtmlImg){ |
|
26 | + } elseif ($content instanceof HtmlImg){ |
|
27 | 27 | $this->addToPropertyCtrl("class", "image", array("image")); |
28 | 28 | } |
29 | 29 | $content->addToProperty("class",(($index===0)?"visible":"hidden")." content"); |
@@ -19,8 +19,9 @@ |
||
19 | 19 | if (isset($type)) { |
20 | 20 | if ($type == "page") { |
21 | 21 | $this->asPageHeader($niveau); |
22 | - } else |
|
23 | - $this->asContentHeader($niveau); |
|
22 | + } else { |
|
23 | + $this->asContentHeader($niveau); |
|
24 | + } |
|
24 | 25 | } |
25 | 26 | $this->content=$content; |
26 | 27 | } |
@@ -31,8 +31,9 @@ discard block |
||
31 | 31 | protected function createTitleElement(){ |
32 | 32 | $element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title"); |
33 | 33 | $element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title)); |
34 | - if($this->_active===true) |
|
35 | - $element->addToProperty("class", "active"); |
|
34 | + if($this->_active===true) { |
|
35 | + $element->addToProperty("class", "active"); |
|
36 | + } |
|
36 | 37 | return $element; |
37 | 38 | } |
38 | 39 | |
@@ -43,10 +44,11 @@ discard block |
||
43 | 44 | |
44 | 45 | public function setActive($value=true){ |
45 | 46 | $this->_active=$value; |
46 | - if($value===true) |
|
47 | - $this->addToPropertyCtrl("class", "active", array("active")); |
|
48 | - else |
|
49 | - $this->removePropertyValue("class", "active"); |
|
47 | + if($value===true) { |
|
48 | + $this->addToPropertyCtrl("class", "active", array("active")); |
|
49 | + } else { |
|
50 | + $this->removePropertyValue("class", "active"); |
|
51 | + } |
|
50 | 52 | return $this; |
51 | 53 | } |
52 | 54 | } |
53 | 55 | \ No newline at end of file |
@@ -34,8 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | public function addImage($src="", $alt="", $size=NULL) { |
36 | 36 | $image=new HtmlImg("img-", $src, $alt); |
37 | - if (isset($size)) |
|
38 | - $image->setSize($size); |
|
37 | + if (isset($size)) { |
|
38 | + $image->setSize($size); |
|
39 | + } |
|
39 | 40 | $this->content["image"]=$image; |
40 | 41 | return $image; |
41 | 42 | } |
@@ -45,8 +46,9 @@ discard block |
||
45 | 46 | foreach ( $metas as $meta ) { |
46 | 47 | $this->addMeta($meta); |
47 | 48 | } |
48 | - } else |
|
49 | - $this->addMeta($metas); |
|
49 | + } else { |
|
50 | + $this->addMeta($metas); |
|
51 | + } |
|
50 | 52 | return $this; |
51 | 53 | } |
52 | 54 | |
@@ -73,8 +75,9 @@ discard block |
||
73 | 75 | $result=new HtmlSemDoubleElement("", "span", "", $caption); |
74 | 76 | $this->addContent($result); |
75 | 77 | $result->setFloated($direction); |
76 | - } else |
|
77 | - $result=$this->addContent($caption); |
|
78 | + } else { |
|
79 | + $result=$this->addContent($caption); |
|
80 | + } |
|
78 | 81 | return $result; |
79 | 82 | } |
80 | 83 |
@@ -105,17 +105,20 @@ discard block |
||
105 | 105 | $max=\min($colIndex, $rows[$i]->count()); |
106 | 106 | for($j=0; $j < $max; $j++) { |
107 | 107 | $rowspan=$rows[$i]->getItem($j)->getRowspan(); |
108 | - if ($rowspan + $i > $this->_row) |
|
109 | - $pos++; |
|
108 | + if ($rowspan + $i > $this->_row) { |
|
109 | + $pos++; |
|
110 | + } |
|
110 | 111 | } |
111 | 112 | } |
112 | - if ($pos > $colIndex) |
|
113 | - return NULL; |
|
113 | + if ($pos > $colIndex) { |
|
114 | + return NULL; |
|
115 | + } |
|
114 | 116 | $count=$this->count(); |
115 | 117 | for($i=0; $i < $count; $i++) { |
116 | 118 | $pos+=$this->content[$i]->getColspan(); |
117 | - if ($pos >= $colIndex + 1) |
|
118 | - return $i; |
|
119 | + if ($pos >= $colIndex + 1) { |
|
120 | + return $i; |
|
121 | + } |
|
119 | 122 | } |
120 | 123 | return null; |
121 | 124 | } |
@@ -138,8 +141,9 @@ discard block |
||
138 | 141 | public function containsStr($needle) { |
139 | 142 | $cells=$this->content; |
140 | 143 | foreach ( $cells as $cell ) { |
141 | - if (\strpos($cell->getContent(), $needle) !== false) |
|
142 | - return true; |
|
144 | + if (\strpos($cell->getContent(), $needle) !== false) { |
|
145 | + return true; |
|
146 | + } |
|
143 | 147 | } |
144 | 148 | return false; |
145 | 149 | } |