@@ -123,8 +123,7 @@ discard block |
||
| 123 | 123 | $user = Prado::createComponent($this->_userClass, $this); |
| 124 | 124 | $user->setIsGuest(true); |
| 125 | 125 | return $user; |
| 126 | - } |
|
| 127 | - else |
|
| 126 | + } else |
|
| 128 | 127 | return $this->_userFactory->createUser($username); |
| 129 | 128 | } |
| 130 | 129 | |
@@ -175,8 +174,7 @@ discard block |
||
| 175 | 174 | return $conn->getDbConnection(); |
| 176 | 175 | else |
| 177 | 176 | throw new TConfigurationException('dbusermanager_connectionid_invalid', $connectionID); |
| 178 | - } |
|
| 179 | - else |
|
| 177 | + } else |
|
| 180 | 178 | throw new TConfigurationException('dbusermanager_connectionid_required'); |
| 181 | 179 | } |
| 182 | 180 | |
@@ -99,8 +99,7 @@ |
||
| 99 | 99 | { |
| 100 | 100 | $this->_everyone = true; |
| 101 | 101 | break; |
| 102 | - } |
|
| 103 | - elseif($user === '?') |
|
| 102 | + } elseif($user === '?') |
|
| 104 | 103 | $this->_guest = true; |
| 105 | 104 | elseif($user === '@') |
| 106 | 105 | $this->_authenticated = true; |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | $this->_d[] = $item; |
| 84 | 84 | ++$this->_c; |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - elseif($data !== null) |
|
| 86 | + } elseif($data !== null) |
|
| 88 | 87 | throw new TInvalidDataTypeException('stack_data_not_iterable'); |
| 89 | 88 | } |
| 90 | 89 | |
@@ -84,8 +84,7 @@ |
||
| 84 | 84 | $this->_d[] = $item; |
| 85 | 85 | ++$this->_c; |
| 86 | 86 | } |
| 87 | - } |
|
| 88 | - elseif($data !== null) |
|
| 87 | + } elseif($data !== null) |
|
| 89 | 88 | throw new TInvalidDataTypeException('queue_data_not_iterable'); |
| 90 | 89 | } |
| 91 | 90 | |
@@ -124,11 +124,9 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | eval('$array=array' . $value . ';'); |
| 126 | 126 | return $array; |
| 127 | - } |
|
| 128 | - else |
|
| 127 | + } else |
|
| 129 | 128 | return $len > 0?[$value]:[]; |
| 130 | - } |
|
| 131 | - else |
|
| 129 | + } else |
|
| 132 | 130 | return (array)$value; |
| 133 | 131 | } |
| 134 | 132 | |
@@ -171,8 +169,7 @@ discard block |
||
| 171 | 169 | throw new TInvalidDataValueException( |
| 172 | 170 | 'propertyvalue_enumvalue_invalid', $value, |
| 173 | 171 | implode(' | ', $types[$enums]->getConstants())); |
| 174 | - } |
|
| 175 | - elseif(!is_array($enums)) |
|
| 172 | + } elseif(!is_array($enums)) |
|
| 176 | 173 | { |
| 177 | 174 | $enums = func_get_args(); |
| 178 | 175 | array_shift($enums); |
@@ -142,8 +142,7 @@ |
||
| 142 | 142 | { |
| 143 | 143 | $fcontent = include $fname; |
| 144 | 144 | $this->loadFromPhp($fcontent, dirname($fname), $configPagePath); |
| 145 | - } |
|
| 146 | - else |
|
| 145 | + } else |
|
| 147 | 146 | { |
| 148 | 147 | $dom = new TXmlDocument; |
| 149 | 148 | if($dom->loadFromFile($fname)) |
@@ -173,8 +173,7 @@ discard block |
||
| 173 | 173 | if(!is_file($dst . DIRECTORY_SEPARATOR . $fileName) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance) |
| 174 | 174 | $this->copyFile($fullpath, $dst); |
| 175 | 175 | return $this->_published[$path] = $this->_baseUrl . '/' . $dir . '/' . $fileName; |
| 176 | - } |
|
| 177 | - else |
|
| 176 | + } else |
|
| 178 | 177 | { |
| 179 | 178 | $dir = $this->hash($fullpath); |
| 180 | 179 | if(!is_dir($this->_basePath . DIRECTORY_SEPARATOR . $dir) || $checkTimestamp || $this->getApplication()->getMode() !== TApplicationMode::Performance) |
@@ -297,8 +296,7 @@ discard block |
||
| 297 | 296 | @copy($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file); |
| 298 | 297 | @chmod($dst . DIRECTORY_SEPARATOR . $file, PRADO_CHMOD); |
| 299 | 298 | } |
| 300 | - } |
|
| 301 | - else |
|
| 299 | + } else |
|
| 302 | 300 | $this->copyDirectory($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file); |
| 303 | 301 | } |
| 304 | 302 | closedir($folder); |
@@ -117,8 +117,7 @@ discard block |
||
| 117 | 117 | closedir($dir); |
| 118 | 118 | if($cacheValid) |
| 119 | 119 | $this->_skins = $skins; |
| 120 | - } |
|
| 121 | - else |
|
| 120 | + } else |
|
| 122 | 121 | { |
| 123 | 122 | $cacheValid = true; |
| 124 | 123 | $this->_cssFiles = $cssFiles; |
@@ -295,20 +294,16 @@ discard block |
||
| 295 | 294 | { |
| 296 | 295 | $setter = 'set' . $name; |
| 297 | 296 | $control->$setter($value); |
| 298 | - } |
|
| 299 | - else |
|
| 297 | + } else |
|
| 300 | 298 | throw new TConfigurationException('theme_property_readonly', $type, $name); |
| 301 | - } |
|
| 302 | - else |
|
| 299 | + } else |
|
| 303 | 300 | throw new TConfigurationException('theme_property_undefined', $type, $name); |
| 304 | - } |
|
| 305 | - else // complex property |
|
| 301 | + } else // complex property |
|
| 306 | 302 | $control->setSubProperty($name, $value); |
| 307 | 303 | } |
| 308 | 304 | } |
| 309 | 305 | return true; |
| 310 | - } |
|
| 311 | - else |
|
| 306 | + } else |
|
| 312 | 307 | return false; |
| 313 | 308 | } |
| 314 | 309 | |
@@ -51,8 +51,7 @@ discard block |
||
| 51 | 51 | $control->setData($text); |
| 52 | 52 | } |
| 53 | 53 | $cell->getControls()->add($control); |
| 54 | - } |
|
| 55 | - elseif($this->getAllowSorting()) |
|
| 54 | + } elseif($this->getAllowSorting()) |
|
| 56 | 55 | { |
| 57 | 56 | $sortExpression = $this->getSortExpression(); |
| 58 | 57 | if(($url = $this->getHeaderImageUrl()) !== '') |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | $button->setAlternateText($text); |
| 66 | 65 | $button->setCausesValidation(false); |
| 67 | 66 | $cell->getControls()->add($button); |
| 68 | - } |
|
| 69 | - elseif($text !== '') |
|
| 67 | + } elseif($text !== '') |
|
| 70 | 68 | { |
| 71 | 69 | $button = new TActiveLinkButton; |
| 72 | 70 | $button->setText($text); |
@@ -74,11 +72,9 @@ discard block |
||
| 74 | 72 | $button->setCommandParameter($sortExpression); |
| 75 | 73 | $button->setCausesValidation(false); |
| 76 | 74 | $cell->getControls()->add($button); |
| 77 | - } |
|
| 78 | - else |
|
| 75 | + } else |
|
| 79 | 76 | $cell->setText(' '); |
| 80 | - } |
|
| 81 | - else |
|
| 77 | + } else |
|
| 82 | 78 | { |
| 83 | 79 | if(($url = $this->getHeaderImageUrl()) !== '') |
| 84 | 80 | { |
@@ -87,8 +83,7 @@ discard block |
||
| 87 | 83 | if($text !== '') |
| 88 | 84 | $image->setAlternateText($text); |
| 89 | 85 | $cell->getControls()->add($image); |
| 90 | - } |
|
| 91 | - elseif($text !== '') |
|
| 86 | + } elseif($text !== '') |
|
| 92 | 87 | $cell->setText($text); |
| 93 | 88 | else |
| 94 | 89 | $cell->setText(' '); |