@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function getOptions() |
99 | 99 | { |
100 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
100 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
101 | 101 | { |
102 | 102 | $options = new TJuiControlOptions($this); |
103 | 103 | $this->setViewState('JuiOptions', $options); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * Raises the OnActivate event |
161 | 161 | * @param object $params event parameters |
162 | 162 | */ |
163 | - public function onActivate ($params) |
|
163 | + public function onActivate($params) |
|
164 | 164 | { |
165 | 165 | $this->raiseEvent('OnActivate', $this, $params); |
166 | 166 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * Raises the OnCreate event |
170 | 170 | * @param object $params event parameters |
171 | 171 | */ |
172 | - public function onCreate ($params) |
|
172 | + public function onCreate($params) |
|
173 | 173 | { |
174 | 174 | $this->raiseEvent('OnCreate', $this, $params); |
175 | 175 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Raises the OnDeactivate event |
179 | 179 | * @param object $params event parameters |
180 | 180 | */ |
181 | - public function onDeactivate ($params) |
|
181 | + public function onDeactivate($params) |
|
182 | 182 | { |
183 | 183 | $this->raiseEvent('OnDeactivate', $this, $params); |
184 | 184 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * Raises the OnDrop event |
188 | 188 | * @param object $params event parameters |
189 | 189 | */ |
190 | - public function onDrop ($params) |
|
190 | + public function onDrop($params) |
|
191 | 191 | { |
192 | 192 | $this->raiseEvent('OnDrop', $this, $params); |
193 | 193 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * Raises the OnOut event |
197 | 197 | * @param object $params event parameters |
198 | 198 | */ |
199 | - public function OnOut ($params) |
|
199 | + public function OnOut($params) |
|
200 | 200 | { |
201 | 201 | $this->raiseEvent('OnOut', $this, $params); |
202 | 202 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * Raises the OnOver event |
206 | 206 | * @param object $params event parameters |
207 | 207 | */ |
208 | - public function OnOver ($params) |
|
208 | + public function OnOver($params) |
|
209 | 209 | { |
210 | 210 | $this->raiseEvent('OnOver', $this, $params); |
211 | 211 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function getOptions() |
79 | 79 | { |
80 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
80 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
81 | 81 | { |
82 | 82 | $options = new TJuiControlOptions($this); |
83 | 83 | $this->setViewState('JuiOptions', $options); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * Raises the OnCreate event |
141 | 141 | * @param object $params event parameters |
142 | 142 | */ |
143 | - public function onCreate ($params) |
|
143 | + public function onCreate($params) |
|
144 | 144 | { |
145 | 145 | $this->raiseEvent('OnCreate', $this, $params); |
146 | 146 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * Raises the OnDrag event |
150 | 150 | * @param object $params event parameters |
151 | 151 | */ |
152 | - public function onDrag ($params) |
|
152 | + public function onDrag($params) |
|
153 | 153 | { |
154 | 154 | $this->raiseEvent('OnDrag', $this, $params); |
155 | 155 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * Raises the OnStart event |
159 | 159 | * @param object $params event parameters |
160 | 160 | */ |
161 | - public function onStart ($params) |
|
161 | + public function onStart($params) |
|
162 | 162 | { |
163 | 163 | $this->raiseEvent('OnStart', $this, $params); |
164 | 164 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * Raises the OnStop event |
168 | 168 | * @param object $params event parameters |
169 | 169 | */ |
170 | - public function onStop ($params) |
|
170 | + public function onStop($params) |
|
171 | 171 | { |
172 | 172 | $this->raiseEvent('OnStop', $this, $params); |
173 | 173 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function getOptions() |
75 | 75 | { |
76 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
76 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
77 | 77 | { |
78 | 78 | $options = new TJuiControlOptions($this); |
79 | 79 | $this->setViewState('JuiOptions', $options); |
@@ -182,7 +182,7 @@ |
||
182 | 182 | */ |
183 | 183 | public function save($data) |
184 | 184 | { |
185 | - $timestamp = (string)microtime(true); |
|
185 | + $timestamp = (string) microtime(true); |
|
186 | 186 | $key = $this->calculateKey($timestamp); |
187 | 187 | $this->getCache()->add($key, $data, $this->_timeout); |
188 | 188 | $this->_page->setClientState(TPageStateFormatter::serialize($this->_page, $timestamp)); |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | protected function getCaptchaControl() |
53 | 53 | { |
54 | 54 | $control = $this->getValidationTarget(); |
55 | - if (!$control) |
|
55 | + if(!$control) |
|
56 | 56 | throw new Exception('No target control specified for TReCaptchaValidator'); |
57 | - if (!($control instanceof TReCaptcha)) |
|
57 | + if(!($control instanceof TReCaptcha)) |
|
58 | 58 | throw new Exception('TReCaptchaValidator only works with TReCaptcha controls'); |
59 | 59 | return $control; |
60 | 60 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | protected function evaluateIsValid() |
77 | 77 | { |
78 | 78 | // check validity only once (if trying to evaulate multiple times, all redundant checks would fail) |
79 | - if (null === $this->_isvalid) |
|
79 | + if(null === $this->_isvalid) |
|
80 | 80 | { |
81 | 81 | $control = $this->getCaptchaControl(); |
82 | 82 | $this->_isvalid = $control->validate(); |
@@ -96,15 +96,15 @@ discard block |
||
96 | 96 | $cs->registerHiddenField($this->getClientID() . '_1', $value); |
97 | 97 | |
98 | 98 | // update validator display |
99 | - if ($control = $this->getValidationTarget()) |
|
99 | + if($control = $this->getValidationTarget()) |
|
100 | 100 | { |
101 | 101 | $fn = 'captchaUpdateValidatorStatus_' . $this->getClientID(); |
102 | 102 | |
103 | 103 | // check if we need to request a new captcha too |
104 | - if ($this->Page->IsCallback) |
|
104 | + if($this->Page->IsCallback) |
|
105 | 105 | { |
106 | - if ($control->getVisible(true)) |
|
107 | - if (null !== $this->_isvalid) |
|
106 | + if($control->getVisible(true)) |
|
107 | + if(null !== $this->_isvalid) |
|
108 | 108 | { |
109 | 109 | // if the response has been tested and we reach the pre-render phase |
110 | 110 | // then we need to regenerate the token, because it won't test positive |
@@ -153,7 +153,7 @@ |
||
153 | 153 | { |
154 | 154 | $writer->addAttribute('id', $this->getClientID() . '_0'); |
155 | 155 | |
156 | - $style = $this->getActive()?$this->getParent()->getActiveTabStyle():$this->getParent()->getTabStyle(); |
|
156 | + $style = $this->getActive() ? $this->getParent()->getActiveTabStyle() : $this->getParent()->getTabStyle(); |
|
157 | 157 | $style->addAttributesToRender($writer); |
158 | 158 | |
159 | 159 | $writer->renderBeginTag($this->getTagName()); |
@@ -53,15 +53,15 @@ discard block |
||
53 | 53 | protected function _getZappableSleepProps(&$exprops) |
54 | 54 | { |
55 | 55 | parent::_getZappableSleepProps($exprops); |
56 | - if ($this->_backImageUrl === null) |
|
56 | + if($this->_backImageUrl === null) |
|
57 | 57 | $exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_backImageUrl"; |
58 | - if ($this->_direction === null) |
|
58 | + if($this->_direction === null) |
|
59 | 59 | $exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_direction"; |
60 | - if ($this->_horizontalAlign === null) |
|
60 | + if($this->_horizontalAlign === null) |
|
61 | 61 | $exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_horizontalAlign"; |
62 | - if ($this->_scrollBars === null) |
|
62 | + if($this->_scrollBars === null) |
|
63 | 63 | $exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_scrollBars"; |
64 | - if ($this->_wrap === null) |
|
64 | + if($this->_wrap === null) |
|
65 | 65 | $exprops[] = "\0Prado\Web\UI\WebControls\TPanelStyle\0_wrap"; |
66 | 66 | } |
67 | 67 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function getBackImageUrl() |
107 | 107 | { |
108 | - return $this->_backImageUrl === null?'':$this->_backImageUrl; |
|
108 | + return $this->_backImageUrl === null ? '' : $this->_backImageUrl; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getDirection() |
124 | 124 | { |
125 | - return $this->_direction === null?TContentDirection::NotSet:$this->_direction; |
|
125 | + return $this->_direction === null ?TContentDirection::NotSet : $this->_direction; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getWrap() |
140 | 140 | { |
141 | - return $this->_wrap === null?true:$this->_wrap; |
|
141 | + return $this->_wrap === null ?true:$this->_wrap; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function getHorizontalAlign() |
157 | 157 | { |
158 | - return $this->_horizontalAlign === null?THorizontalAlign::NotSet:$this->_horizontalAlign; |
|
158 | + return $this->_horizontalAlign === null ?THorizontalAlign::NotSet : $this->_horizontalAlign; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function getScrollBars() |
174 | 174 | { |
175 | - return $this->_scrollBars === null?TScrollBars::None:$this->_scrollBars; |
|
175 | + return $this->_scrollBars === null ?TScrollBars::None : $this->_scrollBars; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | if($this->getCausesValidation()) |
64 | 64 | $this->getPage()->validate($this->getValidationGroup()); |
65 | - $this->onClick(new TBulletedListEventParameter((int)$param)); |
|
65 | + $this->onClick(new TBulletedListEventParameter((int) $param)); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $this->regenerateToken(); |
341 | 341 | return false; |
342 | 342 | } |
343 | - return ($this->getToken() === ($this->getCaseSensitive()?$input:strtoupper($input))); |
|
343 | + return ($this->getToken() === ($this->getCaseSensitive() ? $input : strtoupper($input))); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | /** |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | */ |
384 | 384 | protected function getTokenImageOptions() |
385 | 385 | { |
386 | - $privateKey = $this->getPrivateKey(); // call this method to ensure private key is generated |
|
386 | + $privateKey = $this->getPrivateKey(); // call this method to ensure private key is generated |
|
387 | 387 | $token = $this->getToken(); |
388 | 388 | $options = []; |
389 | 389 | $options['publicKey'] = $this->getPublicKey(); |
@@ -394,10 +394,10 @@ discard block |
||
394 | 394 | $options['theme'] = $this->getTokenImageTheme(); |
395 | 395 | if(($randomSeed = $this->getViewState('RandomSeed', 0)) === 0) |
396 | 396 | { |
397 | - $randomSeed = (int)(microtime(true) * 1000000); |
|
397 | + $randomSeed = (int) (microtime(true) * 1000000); |
|
398 | 398 | $this->setViewState('RandomSeed', $randomSeed); |
399 | 399 | } |
400 | - $options['randomSeed'] = $this->getChangingTokenBackground()?0:$randomSeed; |
|
400 | + $options['randomSeed'] = $this->getChangingTokenBackground() ? 0 : $randomSeed; |
|
401 | 401 | $str = serialize($options); |
402 | 402 | return base64_encode(md5($privateKey . $str) . $str); |
403 | 403 | } |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | protected function generateToken($publicKey, $privateKey, $alphabet, $tokenLength, $caseSensitive) |
456 | 456 | { |
457 | 457 | $token = substr($this->hash2string(md5($publicKey . $privateKey), $alphabet) . $this->hash2string(md5($privateKey . $publicKey), $alphabet), 0, $tokenLength); |
458 | - return $caseSensitive?$token:strtoupper($token); |
|
458 | + return $caseSensitive ? $token : strtoupper($token); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | /** |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $hexLength = strlen($hex); |
472 | 472 | $base = strlen($alphabet); |
473 | 473 | $result = ''; |
474 | - for($i = 0;$i < $hexLength;$i += 6) |
|
474 | + for($i = 0; $i < $hexLength; $i += 6) |
|
475 | 475 | { |
476 | 476 | $number = hexdec(substr($hex, $i, 6)); |
477 | 477 | while($number) |