@@ -91,8 +91,7 @@ |
||
91 | 91 | $cell->registerObject('CheckBox', $checkBox); |
92 | 92 | if($this->getDataField() !== '') |
93 | 93 | $checkBox->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
94 | - } |
|
95 | - else |
|
94 | + } else |
|
96 | 95 | parent::initializeCell($cell, $columnIndex, $itemType); |
97 | 96 | } |
98 | 97 |
@@ -328,8 +328,7 @@ discard block |
||
328 | 328 | $writer->addAttributes($attributes); |
329 | 329 | if($value !== null) |
330 | 330 | $attributes->add('value', $value); |
331 | - } |
|
332 | - else |
|
331 | + } else |
|
333 | 332 | $onclick = ''; |
334 | 333 | if($needspan = $this->getSpanNeeded()) |
335 | 334 | { |
@@ -343,14 +342,12 @@ discard block |
||
343 | 342 | { |
344 | 343 | $this->renderLabel($writer, $clientID, $text); |
345 | 344 | $this->renderInputTag($writer, $clientID, $onclick); |
346 | - } |
|
347 | - else |
|
345 | + } else |
|
348 | 346 | { |
349 | 347 | $this->renderInputTag($writer, $clientID, $onclick); |
350 | 348 | $this->renderLabel($writer, $clientID, $text); |
351 | 349 | } |
352 | - } |
|
353 | - else |
|
350 | + } else |
|
354 | 351 | $this->renderInputTag($writer, $clientID, $onclick); |
355 | 352 | if($needspan) |
356 | 353 | $writer->renderEndTag(); |
@@ -924,23 +924,19 @@ discard block |
||
924 | 924 | $this->setSelectedItemIndex($item->getItemIndex()); |
925 | 925 | $this->onSelectedIndexChanged($param); |
926 | 926 | return true; |
927 | - } |
|
928 | - elseif(strcasecmp($command, self::CMD_EDIT) === 0) |
|
927 | + } elseif(strcasecmp($command, self::CMD_EDIT) === 0) |
|
929 | 928 | { |
930 | 929 | $this->onEditCommand($param); |
931 | 930 | return true; |
932 | - } |
|
933 | - elseif(strcasecmp($command, self::CMD_DELETE) === 0) |
|
931 | + } elseif(strcasecmp($command, self::CMD_DELETE) === 0) |
|
934 | 932 | { |
935 | 933 | $this->onDeleteCommand($param); |
936 | 934 | return true; |
937 | - } |
|
938 | - elseif(strcasecmp($command, self::CMD_UPDATE) === 0) |
|
935 | + } elseif(strcasecmp($command, self::CMD_UPDATE) === 0) |
|
939 | 936 | { |
940 | 937 | $this->onUpdateCommand($param); |
941 | 938 | return true; |
942 | - } |
|
943 | - elseif(strcasecmp($command, self::CMD_CANCEL) === 0) |
|
939 | + } elseif(strcasecmp($command, self::CMD_CANCEL) === 0) |
|
944 | 940 | { |
945 | 941 | $this->onCancelCommand($param); |
946 | 942 | return true; |
@@ -1078,8 +1074,7 @@ discard block |
||
1078 | 1074 | $style = $item->getStyle(); |
1079 | 1075 | $item->clearStyle(); |
1080 | 1076 | return $style; |
1081 | - } |
|
1082 | - else |
|
1077 | + } else |
|
1083 | 1078 | return null; |
1084 | 1079 | } |
1085 | 1080 | |
@@ -1141,8 +1136,7 @@ discard block |
||
1141 | 1136 | $this->onItemCreated($param); |
1142 | 1137 | $this->getControls()->add($item); |
1143 | 1138 | return $item; |
1144 | - } |
|
1145 | - else |
|
1139 | + } else |
|
1146 | 1140 | return null; |
1147 | 1141 | } |
1148 | 1142 | |
@@ -1166,8 +1160,7 @@ discard block |
||
1166 | 1160 | $item->dataBind(); |
1167 | 1161 | $this->onItemDataBound($param); |
1168 | 1162 | return $item; |
1169 | - } |
|
1170 | - else |
|
1163 | + } else |
|
1171 | 1164 | return null; |
1172 | 1165 | } |
1173 | 1166 | |
@@ -1187,8 +1180,7 @@ discard block |
||
1187 | 1180 | return [$this->getItemRenderer(),$this->_itemTemplate]; |
1188 | 1181 | else |
1189 | 1182 | return $this->getAlternatingItemDisplay(); |
1190 | - } |
|
1191 | - else |
|
1183 | + } else |
|
1192 | 1184 | return [$classPath,$this->_selectedItemTemplate]; |
1193 | 1185 | } |
1194 | 1186 | |
@@ -1248,15 +1240,13 @@ discard block |
||
1248 | 1240 | $item->setItemIndex($itemIndex); |
1249 | 1241 | $item->setItemType($itemType); |
1250 | 1242 | } |
1251 | - } |
|
1252 | - elseif($template !== null) |
|
1243 | + } elseif($template !== null) |
|
1253 | 1244 | { |
1254 | 1245 | $item = new TDataListItem; |
1255 | 1246 | $item->setItemIndex($itemIndex); |
1256 | 1247 | $item->setItemType($itemType); |
1257 | 1248 | $template->instantiateIn($item); |
1258 | - } |
|
1259 | - else |
|
1249 | + } else |
|
1260 | 1250 | $item = null; |
1261 | 1251 | |
1262 | 1252 | return $item; |
@@ -1415,8 +1405,7 @@ discard block |
||
1415 | 1405 | $items->add($this->createItemInternal($i, $itemType)); |
1416 | 1406 | } |
1417 | 1407 | $this->_footer = $this->createItemInternal(-1, TListItemType::Footer); |
1418 | - } |
|
1419 | - else |
|
1408 | + } else |
|
1420 | 1409 | $this->createEmptyContent(); |
1421 | 1410 | $this->clearChildState(); |
1422 | 1411 | } |
@@ -1481,8 +1470,7 @@ discard block |
||
1481 | 1470 | $this->applyItemStyles(); |
1482 | 1471 | $repeatInfo = $this->getRepeatInfo(); |
1483 | 1472 | $repeatInfo->renderRepeater($writer, $this); |
1484 | - } |
|
1485 | - elseif($this->_emptyTemplate !== null || $this->getEmptyRenderer() !== '') |
|
1473 | + } elseif($this->_emptyTemplate !== null || $this->getEmptyRenderer() !== '') |
|
1486 | 1474 | parent::render($writer); |
1487 | 1475 | } |
1488 | 1476 | } |
@@ -178,8 +178,7 @@ discard block |
||
178 | 178 | $control->setItemType($item->getItemType()); |
179 | 179 | } |
180 | 180 | $cell->getControls()->add($control); |
181 | - } |
|
182 | - else |
|
181 | + } else |
|
183 | 182 | $control = $cell; |
184 | 183 | $control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
185 | 184 | break; |
@@ -196,15 +195,13 @@ discard block |
||
196 | 195 | } |
197 | 196 | $cell->getControls()->add($control); |
198 | 197 | $cell->registerObject('EditControl', $control); |
199 | - } |
|
200 | - else |
|
198 | + } else |
|
201 | 199 | { |
202 | 200 | $control = new TTextBox; |
203 | 201 | $cell->getControls()->add($control); |
204 | 202 | $cell->registerObject('TextBox', $control); |
205 | 203 | } |
206 | - } |
|
207 | - else |
|
204 | + } else |
|
208 | 205 | { |
209 | 206 | if(($classPath = $this->getItemRenderer()) !== '') |
210 | 207 | { |
@@ -215,8 +212,7 @@ discard block |
||
215 | 212 | $control->setItemType($item->getItemType()); |
216 | 213 | } |
217 | 214 | $cell->getControls()->add($control); |
218 | - } |
|
219 | - else |
|
215 | + } else |
|
220 | 216 | $control = $cell; |
221 | 217 | } |
222 | 218 | $control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
@@ -105,8 +105,7 @@ discard block |
||
105 | 105 | $this->_cachedActiveViewIndex = -1; |
106 | 106 | if($index >= 0) |
107 | 107 | $this->activateView($views->itemAt($index), true); |
108 | - } |
|
109 | - else |
|
108 | + } else |
|
110 | 109 | throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index); |
111 | 110 | } |
112 | 111 | |
@@ -161,8 +160,7 @@ discard block |
||
161 | 160 | $view->onActivate(null); |
162 | 161 | $this->onActiveViewChanged(null); |
163 | 162 | } |
164 | - } |
|
165 | - elseif($v->getActive()) |
|
163 | + } elseif($v->getActive()) |
|
166 | 164 | { |
167 | 165 | $v->setActive(false); |
168 | 166 | if($triggerEvent) |
@@ -240,8 +238,7 @@ discard block |
||
240 | 238 | { |
241 | 239 | $this->setActiveView($view); |
242 | 240 | return true; |
243 | - } |
|
244 | - else |
|
241 | + } else |
|
245 | 242 | throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID); |
246 | 243 | break; |
247 | 244 | case self::CMD_SWITCHVIEWINDEX: |
@@ -79,8 +79,7 @@ discard block |
||
79 | 79 | try |
80 | 80 | { |
81 | 81 | $result = $this->getTemplateControl()->evaluateExpression($this->_condition); |
82 | - } |
|
83 | - catch(\Exception $e) |
|
82 | + } catch(\Exception $e) |
|
84 | 83 | { |
85 | 84 | throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage()); |
86 | 85 | } |
@@ -88,8 +87,7 @@ discard block |
||
88 | 87 | { |
89 | 88 | if($this->_trueTemplate) |
90 | 89 | $this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this); |
91 | - } |
|
92 | - elseif($this->_falseTemplate) |
|
90 | + } elseif($this->_falseTemplate) |
|
93 | 91 | $this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this); |
94 | 92 | $this->_creatingChildren = false; |
95 | 93 | } |
@@ -117,8 +117,7 @@ |
||
117 | 117 | $text = THttpUtility::htmlEncode($text); |
118 | 118 | $cell->setText($text); |
119 | 119 | } |
120 | - } |
|
121 | - else |
|
120 | + } else |
|
122 | 121 | parent::initializeCell($cell, $columnIndex, $itemType); |
123 | 122 | } |
124 | 123 |
@@ -69,8 +69,7 @@ |
||
69 | 69 | { |
70 | 70 | $domain = substr($value, $pos + 1); |
71 | 71 | return $domain === ''?false:checkdnsrr($domain, 'MX'); |
72 | - } |
|
73 | - else |
|
72 | + } else |
|
74 | 73 | return false; |
75 | 74 | } |
76 | 75 | } |
@@ -467,8 +467,7 @@ discard block |
||
467 | 467 | $this->onItemCreated($param); |
468 | 468 | $this->getControls()->add($item); |
469 | 469 | return $item; |
470 | - } |
|
471 | - else |
|
470 | + } else |
|
472 | 471 | return null; |
473 | 472 | } |
474 | 473 | |
@@ -492,8 +491,7 @@ discard block |
||
492 | 491 | $item->dataBind(); |
493 | 492 | $this->onItemDataBound($param); |
494 | 493 | return $item; |
495 | - } |
|
496 | - else |
|
494 | + } else |
|
497 | 495 | return null; |
498 | 496 | } |
499 | 497 | |
@@ -543,15 +541,13 @@ discard block |
||
543 | 541 | $item->setItemIndex($itemIndex); |
544 | 542 | $item->setItemType($itemType); |
545 | 543 | } |
546 | - } |
|
547 | - elseif($template !== null) |
|
544 | + } elseif($template !== null) |
|
548 | 545 | { |
549 | 546 | $item = new TRepeaterItem; |
550 | 547 | $item->setItemIndex($itemIndex); |
551 | 548 | $item->setItemType($itemType); |
552 | 549 | $template->instantiateIn($item); |
553 | - } |
|
554 | - else |
|
550 | + } else |
|
555 | 551 | $item = null; |
556 | 552 | |
557 | 553 | return $item; |
@@ -635,8 +631,7 @@ discard block |
||
635 | 631 | $items->add($this->createItemInternal($i, $itemType, false, null)); |
636 | 632 | } |
637 | 633 | $this->_footer = $this->createItemInternal(-1, TListItemType::Footer); |
638 | - } |
|
639 | - else |
|
634 | + } else |
|
640 | 635 | $this->createEmptyContent(); |
641 | 636 | $this->clearChildState(); |
642 | 637 | } |
@@ -697,8 +692,7 @@ discard block |
||
697 | 692 | { |
698 | 693 | $this->onItemCommand($param); |
699 | 694 | return true; |
700 | - } |
|
701 | - else |
|
695 | + } else |
|
702 | 696 | return false; |
703 | 697 | } |
704 | 698 |