@@ -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 | } |
@@ -301,8 +301,7 @@ discard block |
||
| 301 | 301 | { |
| 302 | 302 | $this->setValue($value); |
| 303 | 303 | return $this->_dataChanged = true; |
| 304 | - } |
|
| 305 | - else |
|
| 304 | + } else |
|
| 306 | 305 | return false; |
| 307 | 306 | } |
| 308 | 307 | |
@@ -474,8 +473,7 @@ discard block |
||
| 474 | 473 | if ($value < $minValue) unset($values[$idx]); |
| 475 | 474 | if ($value > $maxValue) unset($values[$idx]); |
| 476 | 475 | } |
| 477 | - } |
|
| 478 | - else |
|
| 476 | + } else |
|
| 479 | 477 | { |
| 480 | 478 | // Values are not provided, generate automatically using stepsize |
| 481 | 479 | $step = $this->getStepSize(); |
@@ -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 | |
@@ -117,8 +117,7 @@ discard block |
||
| 117 | 117 | $this->_cache = $this->getApplication()->getModule($this->_cacheModuleID); |
| 118 | 118 | if(!($this->_cache instanceof ICache)) |
| 119 | 119 | throw new TConfigurationException('outputcache_cachemoduleid_invalid', $this->_cacheModuleID); |
| 120 | - } |
|
| 121 | - else |
|
| 120 | + } else |
|
| 122 | 121 | $this->_cache = $this->getApplication()->getCache(); |
| 123 | 122 | if($this->_cache !== null) |
| 124 | 123 | { |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | $param->setCacheTime(isset($data[3])?$data[3]:0); |
| 131 | 130 | $this->onCheckDependency($param); |
| 132 | 131 | $this->_dataCached = $param->getIsValid(); |
| 133 | - } |
|
| 134 | - else |
|
| 132 | + } else |
|
| 135 | 133 | $this->_dataCached = false; |
| 136 | 134 | if($this->_dataCached) |
| 137 | 135 | list($this->_contents, $this->_state, $this->_actions, $this->_cacheTime) = $data; |
@@ -155,8 +153,7 @@ discard block |
||
| 155 | 153 | $stack->push($this); |
| 156 | 154 | parent::initRecursive($namingContainer); |
| 157 | 155 | $stack->pop(); |
| 158 | - } |
|
| 159 | - else |
|
| 156 | + } else |
|
| 160 | 157 | parent::initRecursive($namingContainer); |
| 161 | 158 | } |
| 162 | 159 | |
@@ -176,8 +173,7 @@ discard block |
||
| 176 | 173 | $stack->push($this); |
| 177 | 174 | parent::loadRecursive(); |
| 178 | 175 | $stack->pop(); |
| 179 | - } |
|
| 180 | - else |
|
| 176 | + } else |
|
| 181 | 177 | { |
| 182 | 178 | if($this->_dataCached) |
| 183 | 179 | $this->performActions(); |
@@ -215,8 +211,7 @@ discard block |
||
| 215 | 211 | $stack->push($this); |
| 216 | 212 | parent::preRenderRecursive(); |
| 217 | 213 | $stack->pop(); |
| 218 | - } |
|
| 219 | - else |
|
| 214 | + } else |
|
| 220 | 215 | parent::preRenderRecursive(); |
| 221 | 216 | } |
| 222 | 217 | |
@@ -497,8 +492,7 @@ discard block |
||
| 497 | 492 | $content = $textwriter->flush(); |
| 498 | 493 | $data = [$content,$this->_state,$this->_actions,time()]; |
| 499 | 494 | $this->_cache->set($this->getCacheKey(), $data, $this->getDuration(), $this->getCacheDependency()); |
| 500 | - } |
|
| 501 | - else |
|
| 495 | + } else |
|
| 502 | 496 | parent::render($writer); |
| 503 | 497 | } |
| 504 | 498 | } |
| 505 | 499 | \ No newline at end of file |
@@ -433,8 +433,7 @@ discard block |
||
| 433 | 433 | } |
| 434 | 434 | $control->setData($text); |
| 435 | 435 | } |
| 436 | - } |
|
| 437 | - elseif($this->getAllowSorting()) |
|
| 436 | + } elseif($this->getAllowSorting()) |
|
| 438 | 437 | { |
| 439 | 438 | $sortExpression = $this->getSortExpression(); |
| 440 | 439 | if(($url = $this->getHeaderImageUrl()) !== '') |
@@ -447,8 +446,7 @@ discard block |
||
| 447 | 446 | $button->setAlternateText($text); |
| 448 | 447 | $button->setCausesValidation(false); |
| 449 | 448 | $cell->getControls()->add($button); |
| 450 | - } |
|
| 451 | - elseif($text !== '') |
|
| 449 | + } elseif($text !== '') |
|
| 452 | 450 | { |
| 453 | 451 | $button = new TLinkButton; |
| 454 | 452 | $button->setText($text); |
@@ -456,11 +454,9 @@ discard block |
||
| 456 | 454 | $button->setCommandParameter($sortExpression); |
| 457 | 455 | $button->setCausesValidation(false); |
| 458 | 456 | $cell->getControls()->add($button); |
| 459 | - } |
|
| 460 | - else |
|
| 457 | + } else |
|
| 461 | 458 | $cell->setText(' '); |
| 462 | - } |
|
| 463 | - else |
|
| 459 | + } else |
|
| 464 | 460 | { |
| 465 | 461 | if(($url = $this->getHeaderImageUrl()) !== '') |
| 466 | 462 | { |
@@ -469,8 +465,7 @@ discard block |
||
| 469 | 465 | if($text !== '') |
| 470 | 466 | $image->setAlternateText($text); |
| 471 | 467 | $cell->getControls()->add($image); |
| 472 | - } |
|
| 473 | - elseif($text !== '') |
|
| 468 | + } elseif($text !== '') |
|
| 474 | 469 | $cell->setText($text); |
| 475 | 470 | else |
| 476 | 471 | $cell->setText(' '); |
@@ -504,8 +499,7 @@ discard block |
||
| 504 | 499 | } |
| 505 | 500 | $control->setData($text); |
| 506 | 501 | } |
| 507 | - } |
|
| 508 | - elseif($text !== '') |
|
| 502 | + } elseif($text !== '') |
|
| 509 | 503 | $cell->setText($text); |
| 510 | 504 | else |
| 511 | 505 | $cell->setText(' '); |
@@ -535,13 +529,11 @@ discard block |
||
| 535 | 529 | if(eval("\$result=$expression;") === false) |
| 536 | 530 | throw new Exception(''); |
| 537 | 531 | return $result; |
| 538 | - } |
|
| 539 | - catch(Exception $e) |
|
| 532 | + } catch(Exception $e) |
|
| 540 | 533 | { |
| 541 | 534 | throw new TInvalidDataValueException('datagridcolumn_expression_invalid', get_class($this), $expression, $e->getMessage()); |
| 542 | 535 | } |
| 543 | - } |
|
| 544 | - else |
|
| 536 | + } else |
|
| 545 | 537 | return sprintf($formatString, $value); |
| 546 | 538 | } |
| 547 | 539 | } |
| 548 | 540 | \ No newline at end of file |
@@ -115,8 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | if($this->getEnableClientScript() && $this->needPostBackScript()) |
| 117 | 117 | $this->renderClientControlScript($writer); |
| 118 | - } |
|
| 119 | - elseif($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 118 | + } elseif($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 120 | 119 | $writer->addAttribute('disabled', 'disabled'); |
| 121 | 120 | |
| 122 | 121 | parent::addAttributesToRender($writer); |
@@ -150,8 +149,7 @@ discard block |
||
| 150 | 149 | { |
| 151 | 150 | $group = $this->getValidationGroup(); |
| 152 | 151 | return $this->getPage()->getValidators($group)->getCount() > 0; |
| 153 | - } |
|
| 154 | - else |
|
| 152 | + } else |
|
| 155 | 153 | return false; |
| 156 | 154 | } |
| 157 | 155 | |