@@ -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 | } |
@@ -80,15 +80,15 @@ |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
83 | - catch(TRpcException $e) |
|
83 | + catch (TRpcException $e) |
|
84 | 84 | { |
85 | 85 | return $this->createErrorResponse($e); |
86 | 86 | } |
87 | - catch(THttpException $e) |
|
87 | + catch (THttpException $e) |
|
88 | 88 | { |
89 | 89 | throw $e; |
90 | 90 | } |
91 | - catch(\Exception $e) |
|
91 | + catch (\Exception $e) |
|
92 | 92 | { |
93 | 93 | return $this->createErrorResponse(new TRpcException('An internal error occured', '-32603')); |
94 | 94 | } |
@@ -26,6 +26,6 @@ |
||
26 | 26 | { |
27 | 27 | public function toJavaScriptLiteral() |
28 | 28 | { |
29 | - return TJavaScript::jsonEncode((string)$this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
29 | + return TJavaScript::jsonEncode((string) $this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -41,6 +41,6 @@ |
||
41 | 41 | public function insertAt($index, $item) |
42 | 42 | { |
43 | 43 | if(!is_string($item)) // string is possible if property tag is used. we simply ignore it in this case |
44 | - parent::insertAt($index, $item); // this will generate an exception in parent implementation |
|
44 | + parent::insertAt($index, $item); // this will generate an exception in parent implementation |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -86,12 +86,12 @@ |
||
86 | 86 | else |
87 | 87 | { |
88 | 88 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
89 | - if ($this->getHasControls()) |
|
89 | + if($this->getHasControls()) |
|
90 | 90 | { |
91 | 91 | // If we update a TActivePanel on callback, |
92 | 92 | // We shouldn't update all childs, because the whole content will be replaced by |
93 | 93 | // the parent |
94 | - foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
94 | + foreach($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
95 | 95 | { |
96 | 96 | $control->getActiveControl()->setEnableUpdate(false); |
97 | 97 | } |
@@ -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 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | if(count($params) > 0) |
105 | 105 | { |
106 | - if ($params[0] instanceof ISurroundable) |
|
106 | + if($params[0] instanceof ISurroundable) |
|
107 | 107 | $params[0] = $params[0]->getSurroundingTagID(); |
108 | 108 | elseif($params[0] instanceof TControl) |
109 | 109 | $params[0] = $params[0]->getClientID(); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function jQuery($element, $method, $params = []) |
121 | 121 | { |
122 | - if ($element instanceof ISurroundable) |
|
122 | + if($element instanceof ISurroundable) |
|
123 | 123 | $element = $element->getSurroundingTagID(); |
124 | 124 | elseif($element instanceof TControl) |
125 | 125 | $element = $element->getClientID(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | public function setAttribute($control, $name, $value) |
226 | 226 | { |
227 | 227 | // Attributes should be applied on Surrounding tag, except for 'disabled' attribute |
228 | - if ($control instanceof ISurroundable && strtolower($name) !== 'disabled') |
|
228 | + if($control instanceof ISurroundable && strtolower($name) !== 'disabled') |
|
229 | 229 | $control = $control->getSurroundingTagID(); |
230 | 230 | $this->callClientFunction('Prado.Element.setAttribute', [$control, $name, $value]); |
231 | 231 | } |
@@ -253,9 +253,9 @@ discard block |
||
253 | 253 | foreach($items as $item) |
254 | 254 | { |
255 | 255 | if($item->getHasAttributes()) |
256 | - $options[] = [$item->getText(),$item->getValue(), $item->getAttributes()->itemAt('Group')]; |
|
256 | + $options[] = [$item->getText(), $item->getValue(), $item->getAttributes()->itemAt('Group')]; |
|
257 | 257 | else |
258 | - $options[] = [$item->getText(),$item->getValue()]; |
|
258 | + $options[] = [$item->getText(), $item->getValue()]; |
|
259 | 259 | } |
260 | 260 | $this->callClientFunction('Prado.Element.setOptions', [$control, $options]); |
261 | 261 | } |
@@ -60,8 +60,7 @@ |
||
60 | 60 | $content = $response->createHtmlWriter(); |
61 | 61 | $content->getWriter()->setBoundary(TActivePageAdapter::CALLBACK_ERROR_HEADER); |
62 | 62 | $content->write($trace); |
63 | - } |
|
64 | - else |
|
63 | + } else |
|
65 | 64 | { |
66 | 65 | error_log("Error happened while processing an existing error:\n" . $exception->__toString()); |
67 | 66 | header('HTTP/1.0 500 Internal Server Error', true, 500); |
@@ -101,8 +101,7 @@ |
||
101 | 101 | if($this->getHasPreRendered()) { |
102 | 102 | $this->renderRepeater($writer); |
103 | 103 | if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(), $writer); |
104 | - } |
|
105 | - else { |
|
104 | + } else { |
|
106 | 105 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
107 | 106 | } |
108 | 107 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | $button->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
53 | 53 | $cell->getControls()->add($button); |
54 | 54 | $cell->registerObject('Button', $button); |
55 | - } |
|
56 | - else |
|
55 | + } else |
|
57 | 56 | parent::initializeCell($cell, $columnIndex, $itemType); |
58 | 57 | } |
59 | 58 | } |
60 | 59 | \ No newline at end of file |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $button->setCausesValidation($this->getCausesValidation()); |
50 | 50 | $button->setValidationGroup($this->getValidationGroup()); |
51 | 51 | if($this->getDataTextField() !== '' || ($buttonType === TButtonColumnType::ImageButton && $this->getDataImageUrlField() !== '')) |
52 | - $button->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
|
52 | + $button->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']); |
|
53 | 53 | $cell->getControls()->add($button); |
54 | 54 | $cell->registerObject('Button', $button); |
55 | 55 | } |