@@ -193,8 +193,7 @@ |
||
| 193 | 193 | { |
| 194 | 194 | parent::renderContents($writer); |
| 195 | 195 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer, false); |
| 196 | - } |
|
| 197 | - else |
|
| 196 | + } else |
|
| 198 | 197 | parent::render($writer); |
| 199 | 198 | } |
| 200 | 199 | } |
@@ -92,8 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | $cs->renderScriptFilesEnd($writer); |
| 94 | 94 | $cs->renderEndScripts($writer); |
| 95 | - } |
|
| 96 | - else |
|
| 95 | + } else |
|
| 97 | 96 | { |
| 98 | 97 | $cs->renderHiddenFieldsBegin($writer); |
| 99 | 98 | |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | $dt->format('j'), |
| 102 | 102 | $dt->format('Y') |
| 103 | 103 | ); |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | return parent::getDateTimeValue($container, $column, $record); |
| 107 | 106 | } |
| 108 | 107 | } |
@@ -184,8 +184,7 @@ discard block |
||
| 184 | 184 | $key = md5($this->getEncryptionKey()); |
| 185 | 185 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($this->_cryptAlgorithm)); |
| 186 | 186 | return $iv . openssl_encrypt($data, $this->_cryptAlgorithm, $key, null, $iv); |
| 187 | - } |
|
| 188 | - else |
|
| 187 | + } else |
|
| 189 | 188 | throw new TNotSupportedException('securitymanager_openssl_required'); |
| 190 | 189 | } |
| 191 | 190 | |
@@ -202,8 +201,7 @@ discard block |
||
| 202 | 201 | $key = md5($this->getEncryptionKey()); |
| 203 | 202 | $iv = $this->substr($data, 0, openssl_cipher_iv_length($this->_cryptAlgorithm)); |
| 204 | 203 | return openssl_decrypt($this->substr($data, $this->strlen($iv), $this->strlen($data)), $this->_cryptAlgorithm, $key, null, $iv); |
| 205 | - } |
|
| 206 | - else |
|
| 204 | + } else |
|
| 207 | 205 | throw new TNotSupportedException('securitymanager_openssl_required'); |
| 208 | 206 | } |
| 209 | 207 | |
@@ -79,16 +79,13 @@ |
||
| 79 | 79 | ]); |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | - } |
|
| 83 | - catch(TRpcException $e) |
|
| 82 | + } catch(TRpcException $e) |
|
| 84 | 83 | { |
| 85 | 84 | return $this->createErrorResponse($e); |
| 86 | - } |
|
| 87 | - catch(THttpException $e) |
|
| 85 | + } catch(THttpException $e) |
|
| 88 | 86 | { |
| 89 | 87 | throw $e; |
| 90 | - } |
|
| 91 | - catch(\Exception $e) |
|
| 88 | + } catch(\Exception $e) |
|
| 92 | 89 | { |
| 93 | 90 | return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603')); |
| 94 | 91 | } |
@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | 162 | return '{' . $results . '}'; |
| 163 | - } |
|
| 164 | - else |
|
| 163 | + } else |
|
| 165 | 164 | { |
| 166 | 165 | foreach($value as $v) |
| 167 | 166 | { |
@@ -174,8 +173,7 @@ discard block |
||
| 174 | 173 | } |
| 175 | 174 | return '[' . $results . ']'; |
| 176 | 175 | } |
| 177 | - } |
|
| 178 | - elseif(is_int($value)) |
|
| 176 | + } elseif(is_int($value)) |
|
| 179 | 177 | return "$value"; |
| 180 | 178 | elseif(is_float($value)) |
| 181 | 179 | { |
@@ -195,8 +193,7 @@ discard block |
||
| 195 | 193 | return str_replace($locale['decimal_point'], '.', "$value"); |
| 196 | 194 | break; |
| 197 | 195 | } |
| 198 | - } |
|
| 199 | - elseif(is_object($value)) |
|
| 196 | + } elseif(is_object($value)) |
|
| 200 | 197 | if ($value instanceof TJavaScriptLiteral) |
| 201 | 198 | return $value->toJavaScriptLiteral(); |
| 202 | 199 | else |
@@ -107,8 +107,7 @@ |
||
| 107 | 107 | $cache->set(self::TEMPLATE_CACHE_PREFIX . $fileName, [$template,$timestamps]); |
| 108 | 108 | return $template; |
| 109 | 109 | } |
| 110 | - } |
|
| 111 | - else |
|
| 110 | + } else |
|
| 112 | 111 | return null; |
| 113 | 112 | } |
| 114 | 113 | |
@@ -82,8 +82,7 @@ |
||
| 82 | 82 | parent::render($writer); |
| 83 | 83 | if($this->getActiveControl()->canUpdateClientSide()) |
| 84 | 84 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
| 85 | - } |
|
| 86 | - else |
|
| 85 | + } else |
|
| 87 | 86 | { |
| 88 | 87 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
| 89 | 88 | if ($this->getHasControls()) |
@@ -435,13 +435,11 @@ discard block |
||
| 435 | 435 | { |
| 436 | 436 | $boundary = $this->getRenderedContentBoundary($content); |
| 437 | 437 | $content = null; |
| 438 | - } |
|
| 439 | - elseif($content instanceof THtmlWriter) |
|
| 438 | + } elseif($content instanceof THtmlWriter) |
|
| 440 | 439 | { |
| 441 | 440 | $boundary = $this->getResponseContentBoundary($content); |
| 442 | 441 | $content = null; |
| 443 | - } |
|
| 444 | - else |
|
| 442 | + } else |
|
| 445 | 443 | $boundary = null; |
| 446 | 444 | |
| 447 | 445 | $this->callClientFunction('Prado.Element.replace', [$element, $content, $boundary, $self]); |
@@ -488,8 +486,7 @@ discard block |
||
| 488 | 486 | if($content instanceof TControl) |
| 489 | 487 | { |
| 490 | 488 | $boundary = $this->getRenderedContentBoundary($content); |
| 491 | - } |
|
| 492 | - elseif($content instanceof THtmlWriter) |
|
| 489 | + } elseif($content instanceof THtmlWriter) |
|
| 493 | 490 | { |
| 494 | 491 | $boundary = $this->getResponseContentBoundary($content); |
| 495 | 492 | } |