@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | throw new TInvalidDataValueException('comparevalidator_controltocompare_invalid'); |
| 161 | 161 | if(($value2 = $this->getValidationValue($control2)) === '') |
| 162 | 162 | return false; |
| 163 | - } |
|
| 164 | - else |
|
| 163 | + } else |
|
| 165 | 164 | $value2 = $this->getValueToCompare(); |
| 166 | 165 | |
| 167 | 166 | $values = $this->getComparisonValues($value, $value2); |
@@ -204,8 +203,7 @@ discard block |
||
| 204 | 203 | { |
| 205 | 204 | $formatter = new TSimpleDateFormatter($dateFormat); |
| 206 | 205 | return [$formatter->parse($value1), $formatter->parse($value2)]; |
| 207 | - } |
|
| 208 | - else |
|
| 206 | + } else |
|
| 209 | 207 | return [strtotime($value1), strtotime($value2)]; |
| 210 | 208 | } |
| 211 | 209 | return [$value1, $value2]; |
@@ -198,8 +198,7 @@ discard block |
||
| 198 | 198 | $classPath = $this->getItemRenderer(); |
| 199 | 199 | $template = $this->_itemTemplate; |
| 200 | 200 | } |
| 201 | - } |
|
| 202 | - else |
|
| 201 | + } else |
|
| 203 | 202 | { |
| 204 | 203 | $template = $this->_itemTemplate; |
| 205 | 204 | $classPath = $this->getItemRenderer(); |
@@ -215,13 +214,11 @@ discard block |
||
| 215 | 214 | } |
| 216 | 215 | if($control instanceof \Prado\IDataRenderer) |
| 217 | 216 | $control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
| 218 | - } |
|
| 219 | - elseif($template !== null) |
|
| 217 | + } elseif($template !== null) |
|
| 220 | 218 | $template->instantiateIn($cell); |
| 221 | 219 | elseif($itemType !== TListItemType::EditItem) |
| 222 | 220 | $cell->setText(' '); |
| 223 | - } |
|
| 224 | - elseif($itemType === TListItemType::Header) |
|
| 221 | + } elseif($itemType === TListItemType::Header) |
|
| 225 | 222 | { |
| 226 | 223 | if(($classPath = $this->getHeaderRenderer()) !== '') |
| 227 | 224 | $this->initializeHeaderCell($cell, $columnIndex); |
@@ -229,8 +226,7 @@ discard block |
||
| 229 | 226 | $this->_headerTemplate->instantiateIn($cell); |
| 230 | 227 | else |
| 231 | 228 | $this->initializeHeaderCell($cell, $columnIndex); |
| 232 | - } |
|
| 233 | - elseif($itemType === TListItemType::Footer) |
|
| 229 | + } elseif($itemType === TListItemType::Footer) |
|
| 234 | 230 | { |
| 235 | 231 | if(($classPath = $this->getFooterRenderer()) !== '') |
| 236 | 232 | $this->initializeFooterCell($cell, $columnIndex); |
@@ -244,12 +244,10 @@ |
||
| 244 | 244 | { |
| 245 | 245 | foreach($_FILES[$key]['name'] as $index => $name) |
| 246 | 246 | $this->_files[$index] = new TFileUploadItem($name, $_FILES[$key]['size'][$index], $_FILES[$key]['type'][$index], $_FILES[$key]['error'][$index], $_FILES[$key]['tmp_name'][$index]); |
| 247 | - } |
|
| 248 | - else |
|
| 247 | + } else |
|
| 249 | 248 | $this->_files[0] = new TFileUploadItem($_FILES[$key]['name'], $_FILES[$key]['size'], $_FILES[$key]['type'], $_FILES[$key]['error'], $_FILES[$key]['tmp_name']); |
| 250 | 249 | return $this->_dataChanged = true; |
| 251 | - } |
|
| 252 | - else |
|
| 250 | + } else |
|
| 253 | 251 | return false; |
| 254 | 252 | } |
| 255 | 253 | |
@@ -260,8 +260,7 @@ |
||
| 260 | 260 | if($maxValue !== '') |
| 261 | 261 | $valid = $valid && $this->isLessThan($value, $formatter->parse($maxValue)); |
| 262 | 262 | return $valid; |
| 263 | - } |
|
| 264 | - else |
|
| 263 | + } else |
|
| 265 | 264 | { |
| 266 | 265 | $value = strtotime($value); |
| 267 | 266 | if($minValue !== '') |
@@ -305,8 +305,7 @@ |
||
| 305 | 305 | $writer->addAttribute('href', $this->getNavigateUrl()); |
| 306 | 306 | if(($target = $this->getTarget()) !== '') |
| 307 | 307 | $writer->addAttribute('target', $target); |
| 308 | - } |
|
| 309 | - elseif($mode === THotSpotMode::Inactive) |
|
| 308 | + } elseif($mode === THotSpotMode::Inactive) |
|
| 310 | 309 | $writer->addAttribute('nohref', 'true'); |
| 311 | 310 | $text = $this->getAlternateText(); |
| 312 | 311 | $writer->addAttribute('title', $text); |
@@ -143,15 +143,13 @@ discard block |
||
| 143 | 143 | $activeView = $views->itemAt($index); |
| 144 | 144 | else |
| 145 | 145 | throw new TInvalidDataValueException('tabpanel_activeviewid_invalid', $id); |
| 146 | - } |
|
| 147 | - elseif(($index = $this->getActiveViewIndex()) >= 0) |
|
| 146 | + } elseif(($index = $this->getActiveViewIndex()) >= 0) |
|
| 148 | 147 | { |
| 149 | 148 | if($index < $views->getCount()) |
| 150 | 149 | $activeView = $views->itemAt($index); |
| 151 | 150 | else |
| 152 | 151 | throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid', $index); |
| 153 | - } |
|
| 154 | - else |
|
| 152 | + } else |
|
| 155 | 153 | { |
| 156 | 154 | foreach($views as $index => $view) |
| 157 | 155 | { |
@@ -327,8 +325,7 @@ discard block |
||
| 327 | 325 | $this->setActiveViewIndex($index); |
| 328 | 326 | $this->setActiveViewID($view->getID(false)); |
| 329 | 327 | $view->setActive(true); |
| 330 | - } |
|
| 331 | - else |
|
| 328 | + } else |
|
| 332 | 329 | $v->setActive(false); |
| 333 | 330 | } |
| 334 | 331 | } |
@@ -211,8 +211,7 @@ discard block |
||
| 211 | 211 | $button = $this->createButton('Edit', $this->getEditText(), false, ''); |
| 212 | 212 | $cell->getControls()->add($button); |
| 213 | 213 | $cell->registerObject('EditButton', $button); |
| 214 | - } |
|
| 215 | - elseif($itemType === TListItemType::EditItem) |
|
| 214 | + } elseif($itemType === TListItemType::EditItem) |
|
| 216 | 215 | { |
| 217 | 216 | $controls = $cell->getControls(); |
| 218 | 217 | $button = $this->createButton('Update', $this->getUpdateText(), $this->getCausesValidation(), $this->getValidationGroup()); |
@@ -222,8 +221,7 @@ discard block |
||
| 222 | 221 | $button = $this->createButton('Cancel', $this->getCancelText(), false, ''); |
| 223 | 222 | $controls->add($button); |
| 224 | 223 | $cell->registerObject('CancelButton', $button); |
| 225 | - } |
|
| 226 | - else |
|
| 224 | + } else |
|
| 227 | 225 | parent::initializeCell($cell, $columnIndex, $itemType); |
| 228 | 226 | } |
| 229 | 227 | |
@@ -271,8 +271,7 @@ discard block |
||
| 271 | 271 | $cell->getControls()->add($listControl); |
| 272 | 272 | $cell->registerObject('DropDownList', $listControl); |
| 273 | 273 | $control = $listControl; |
| 274 | - } |
|
| 275 | - else |
|
| 274 | + } else |
|
| 276 | 275 | $control = $cell; |
| 277 | 276 | $control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
| 278 | 277 | break; |
@@ -308,8 +307,7 @@ discard block |
||
| 308 | 307 | $value = $text; |
| 309 | 308 | $formatString = $this->getDataTextFormatString(); |
| 310 | 309 | $text = $this->formatDataValue($formatString, $text); |
| 311 | - } |
|
| 312 | - else |
|
| 310 | + } else |
|
| 313 | 311 | $text = $value; |
| 314 | 312 | if($sender instanceof TTableCell) |
| 315 | 313 | $sender->setText($text); |
@@ -807,8 +807,7 @@ discard block |
||
| 807 | 807 | $this->_navigation->renderControl($writer); |
| 808 | 808 | $writer->write("\n</td></tr></table>\n"); |
| 809 | 809 | $this->renderEndTag($writer); |
| 810 | - } |
|
| 811 | - else |
|
| 810 | + } else |
|
| 812 | 811 | { |
| 813 | 812 | $this->applyControlProperties(); |
| 814 | 813 | $this->renderBeginTag($writer); |
@@ -906,8 +905,7 @@ discard block |
||
| 906 | 905 | { |
| 907 | 906 | $container->setVisible(true); |
| 908 | 907 | $showStandard = false; |
| 909 | - } |
|
| 910 | - else |
|
| 908 | + } else |
|
| 911 | 909 | $container->setVisible(false); |
| 912 | 910 | } |
| 913 | 911 | } |
@@ -1032,11 +1030,9 @@ discard block |
||
| 1032 | 1030 | return TWizardStepType::Finish; |
| 1033 | 1031 | else |
| 1034 | 1032 | return TWizardStepType::Step; |
| 1035 | - } |
|
| 1036 | - else |
|
| 1033 | + } else |
|
| 1037 | 1034 | return $type; |
| 1038 | - } |
|
| 1039 | - else |
|
| 1035 | + } else |
|
| 1040 | 1036 | return $type; |
| 1041 | 1037 | } |
| 1042 | 1038 | |
@@ -1103,8 +1099,7 @@ discard block |
||
| 1103 | 1099 | $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); |
| 1104 | 1100 | $this->_sideBarDataList->dataBind(); |
| 1105 | 1101 | } |
| 1106 | - } |
|
| 1107 | - else |
|
| 1102 | + } else |
|
| 1108 | 1103 | { |
| 1109 | 1104 | $this->_sideBar = new TPanel; |
| 1110 | 1105 | $this->getControls()->add($this->_sideBar); |
@@ -1141,8 +1136,7 @@ discard block |
||
| 1141 | 1136 | { |
| 1142 | 1137 | if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($newStepIndex)) |
| 1143 | 1138 | $this->setActiveStepIndex($newStepIndex); |
| 1144 | - } |
|
| 1145 | - else |
|
| 1139 | + } else |
|
| 1146 | 1140 | $this->setActiveStepIndex($stepIndex); |
| 1147 | 1141 | } |
| 1148 | 1142 | } |
@@ -1286,8 +1280,7 @@ discard block |
||
| 1286 | 1280 | $previousStepIndex = $history->pop(); |
| 1287 | 1281 | if($activeStepIndex === $previousStepIndex && $history->getCount() > 0) |
| 1288 | 1282 | $previousStepIndex = $history->pop(); |
| 1289 | - } |
|
| 1290 | - else |
|
| 1283 | + } else |
|
| 1291 | 1284 | { |
| 1292 | 1285 | $previousStepIndex = $history->peek(); |
| 1293 | 1286 | if($activeStepIndex === $previousStepIndex && $history->getCount() > 1) |
@@ -1298,8 +1291,7 @@ discard block |
||
| 1298 | 1291 | } |
| 1299 | 1292 | } |
| 1300 | 1293 | return $activeStepIndex === $previousStepIndex ? -1 : $previousStepIndex; |
| 1301 | - } |
|
| 1302 | - else |
|
| 1294 | + } else |
|
| 1303 | 1295 | return -1; |
| 1304 | 1296 | } |
| 1305 | 1297 | |
@@ -1363,8 +1355,7 @@ discard block |
||
| 1363 | 1355 | $navParam->setNextStepIndex($index + 1); |
| 1364 | 1356 | $this->onNextButtonClick($navParam); |
| 1365 | 1357 | $handled = true; |
| 1366 | - } |
|
| 1367 | - elseif(strcasecmp($command, self::CMD_PREVIOUS) === 0) |
|
| 1358 | + } elseif(strcasecmp($command, self::CMD_PREVIOUS) === 0) |
|
| 1368 | 1359 | { |
| 1369 | 1360 | if($type !== TWizardStepType::Finish && $type !== TWizardStepType::Step) |
| 1370 | 1361 | throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_PREVIOUS); |
@@ -1373,8 +1364,7 @@ discard block |
||
| 1373 | 1364 | $navParam->setNextStepIndex($prevIndex); |
| 1374 | 1365 | $this->onPreviousButtonClick($navParam); |
| 1375 | 1366 | $handled = true; |
| 1376 | - } |
|
| 1377 | - elseif(strcasecmp($command, self::CMD_COMPLETE) === 0) |
|
| 1367 | + } elseif(strcasecmp($command, self::CMD_COMPLETE) === 0) |
|
| 1378 | 1368 | { |
| 1379 | 1369 | if($type !== TWizardStepType::Finish) |
| 1380 | 1370 | throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_COMPLETE); |
@@ -1382,8 +1372,7 @@ discard block |
||
| 1382 | 1372 | $navParam->setNextStepIndex($index + 1); |
| 1383 | 1373 | $this->onCompleteButtonClick($navParam); |
| 1384 | 1374 | $handled = true; |
| 1385 | - } |
|
| 1386 | - elseif(strcasecmp($command, self::CMD_MOVETO) === 0) |
|
| 1375 | + } elseif(strcasecmp($command, self::CMD_MOVETO) === 0) |
|
| 1387 | 1376 | { |
| 1388 | 1377 | if($this->_cancelNavigation) // may be set in onSideBarButtonClick |
| 1389 | 1378 | $navParam->setCancelNavigation(true); |
@@ -1399,8 +1388,7 @@ discard block |
||
| 1399 | 1388 | } |
| 1400 | 1389 | if ($requestedIndex < 0) |
| 1401 | 1390 | throw new TConfigurationException('wizard_step_invalid'); |
| 1402 | - } |
|
| 1403 | - else |
|
| 1391 | + } else |
|
| 1404 | 1392 | $requestedIndex = TPropertyValue::ensureInteger($requestedStep); |
| 1405 | 1393 | $navParam->setNextStepIndex($requestedIndex); |
| 1406 | 1394 | $handled = true; |
@@ -1417,8 +1405,7 @@ discard block |
||
| 1417 | 1405 | $this->getPreviousStepIndex(true); // pop out the previous move from history |
| 1418 | 1406 | $this->setActiveStepIndex($nextStepIndex); |
| 1419 | 1407 | } |
| 1420 | - } |
|
| 1421 | - else |
|
| 1408 | + } else |
|
| 1422 | 1409 | $this->setActiveStepIndex($index); |
| 1423 | 1410 | return true; |
| 1424 | 1411 | } |