Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Web/UI/TTemplateControl.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -251,33 +251,33 @@  discard block
 block discarded – undo
251 251
 		public function tryToUpdateView($arObj, $throwExceptions = false)
252 252
 		{
253 253
 				$objAttrs = get_class_vars(get_class($arObj));
254
-				foreach (array_keys($objAttrs) as $key)
254
+				foreach(array_keys($objAttrs) as $key)
255 255
 				{
256 256
 						try
257 257
 						{
258
-								if ($key != "RELATIONS")
258
+								if($key != "RELATIONS")
259 259
 								{
260 260
 										$control = $this->{$key};
261
-										if ($control instanceof TTextBox)
261
+										if($control instanceof TTextBox)
262 262
 												$control->Text = $arObj->{$key};
263
-										elseif ($control instanceof TCheckBox)
263
+										elseif($control instanceof TCheckBox)
264 264
 												$control->Checked = (boolean) $arObj->{$key};
265
-										elseif ($control instanceof TDatePicker)
265
+										elseif($control instanceof TDatePicker)
266 266
 												$control->Date = $arObj->{$key};
267 267
 								}
268 268
 								else
269 269
 								{
270
-										foreach ($objAttrs["RELATIONS"] as $relKey => $relValues)
270
+										foreach($objAttrs["RELATIONS"] as $relKey => $relValues)
271 271
 										{
272 272
 												$relControl = $this->{$relKey};
273
-												switch ($relValues[0])
273
+												switch($relValues[0])
274 274
 												{
275 275
 														case TActiveRecord::BELONGS_TO:
276 276
 														case TActiveRecord::HAS_ONE:
277 277
 																$relControl->Text = $arObj->{$relKey};
278 278
 																break;
279 279
 														case TActiveRecord::HAS_MANY:
280
-																if ($relControl instanceof TListControl)
280
+																if($relControl instanceof TListControl)
281 281
 																{
282 282
 																		$relControl->DataSource = $arObj->{$relKey};
283 283
 																		$relControl->dataBind();
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 						}
291 291
 						catch (Exception $ex)
292 292
 						{
293
-								if ($throwExceptions)
293
+								if($throwExceptions)
294 294
 										throw $ex;
295 295
 						}
296 296
 				}
@@ -305,23 +305,23 @@  discard block
 block discarded – undo
305 305
 		public function tryToUpdateAR($arObj, $throwExceptions = false)
306 306
 		{
307 307
 				$objAttrs = get_class_vars(get_class($arObj));
308
-				foreach (array_keys($objAttrs) as $key)
308
+				foreach(array_keys($objAttrs) as $key)
309 309
 				{
310 310
 						try
311 311
 						{
312
-								if ($key == "RELATIONS")
312
+								if($key == "RELATIONS")
313 313
 										break;
314 314
 								$control = $this->{$key};
315
-								if ($control instanceof TTextBox)
315
+								if($control instanceof TTextBox)
316 316
 										$arObj->{$key} = $control->Text;
317
-								elseif ($control instanceof TCheckBox)
317
+								elseif($control instanceof TCheckBox)
318 318
 										$arObj->{$key} = $control->Checked;
319
-								elseif ($control instanceof TDatePicker)
319
+								elseif($control instanceof TDatePicker)
320 320
 										$arObj->{$key} = $control->Date;
321 321
 						}
322 322
 						catch (Exception $ex)
323 323
 						{
324
-								if ($throwExceptions)
324
+								if($throwExceptions)
325 325
 										throw $ex;
326 326
 						}
327 327
 				}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TInPlaceTextBox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	{
104 104
 		$client = $this->getPage()->getCallbackClient();
105 105
 		$code = $this->getClientClassName() . '.' . $func;
106
-		$client->callClientFunction($code, [$this,$value]);
106
+		$client->callClientFunction($code, [$this, $value]);
107 107
 	}
108 108
 
109 109
 	/**
@@ -158,14 +158,14 @@  discard block
 block discarded – undo
158 158
 	 * @param boolean value
159 159
 	 * @since 3.1.2
160 160
 	 */
161
-	public function setReadOnly ($value)
161
+	public function setReadOnly($value)
162 162
 	{
163 163
 		$value = TPropertyValue::ensureBoolean($value);
164 164
 		if(TTextBox::getReadOnly() === $value)
165 165
 			return;
166 166
 
167 167
 		TTextBox::setReadOnly($value);
168
-		if ($this->getActiveControl()->canUpdateClientSide())
168
+		if($this->getActiveControl()->canUpdateClientSide())
169 169
 		{
170 170
 			$this->callClientFunction('setReadOnly', $value);
171 171
 		}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveListBox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	{
108 108
 		parent::addAttributesToRender($writer);
109 109
 		$writer->addAttribute('id', $this->getClientID());
110
-		if ($this->getAutoPostBack())
110
+		if($this->getAutoPostBack())
111 111
 			$this->getActiveControl()->registerCallbackClientScript(
112 112
 				$this->getClientClassName(), $this->getPostBackOptions());
113 113
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveFileUpload.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * TActiveControlAdapter. If you override this class, be sure to set the
90 90
 	 * adapter appropriately by, for example, by calling this constructor.
91 91
 	 */
92
-	public function __construct(){
92
+	public function __construct() {
93 93
 		parent::__construct();
94 94
 		$this->setAdapter(new TActiveControlAdapter($this));
95 95
 	}
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function onFileUpload($param)
116 116
 	{
117
-		if ($this->_flag->getValue() && $this->getPage()->getIsPostBack() && $param == $this->_target->getUniqueID()){
117
+		if($this->_flag->getValue() && $this->getPage()->getIsPostBack() && $param == $this->_target->getUniqueID()) {
118 118
 		  $params = new TActiveFileUploadCallbackParams;
119 119
 		  // save the files so that they will persist past the end of this return.
120
-		  foreach ($this->getFiles() as $file) {
120
+		  foreach($this->getFiles() as $file) {
121 121
 			  $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()), ''));
122 122
 			  $file->saveAs($localName);
123 123
 			  $file->setLocalName($localName);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
           	 Options = new Object();
130 130
           	 Options.clientID = '{$this->getClientID()}';
131 131
           	 Options.targetID = '{$this->_target->getUniqueID()}';
132
-          	 Options.errorCode = '" . (int)!$this->getHasAllFiles() . "';
132
+          	 Options.errorCode = '" . (int) !$this->getHasAllFiles() . "';
133 133
           	 Options.callbackToken = '{$this->pushParamsAndGetToken($params)}';
134 134
           	 Options.fileName = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileName') : $this->getFileName(), JSON_HEX_APOS) . "';
135 135
              Options.fileSize = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileSize') : $this->getFileSize(), JSON_HEX_APOS) . "';
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return string the path where the uploaded file will be stored temporarily, in namespace format
147 147
 	 * default "Application.runtime.*"
148 148
 	 */
149
-	public function getTempPath(){
149
+	public function getTempPath() {
150 150
 		return $this->getViewState('TempPath', 'Application.runtime.*');
151 151
 	}
152 152
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * @param string the path where the uploaded file will be stored temporarily in namespace format
155 155
 	 * default "Application.runtime.*"
156 156
 	 */
157
-	public function setTempPath($value){
157
+	public function setTempPath($value) {
158 158
 		$this->setViewState('TempPath', $value, 'Application.runtime.*');
159 159
 	}
160 160
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @return boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true.
163 163
 	 * Note: When set to false, you will need to trigger the callback yourself.
164 164
 	 */
165
-	public function getAutoPostBack(){
165
+	public function getAutoPostBack() {
166 166
 		return $this->getViewState('AutoPostBack', true);
167 167
 	}
168 168
 
@@ -170,28 +170,28 @@  discard block
 block discarded – undo
170 170
 	 * @param boolean a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true.
171 171
 	 * Note: When set to false, you will need to trigger the callback yourself.
172 172
 	 */
173
-	public function setAutoPostBack($value){
173
+	public function setAutoPostBack($value) {
174 174
 		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), true);
175 175
 	}
176 176
 
177 177
 	/**
178 178
 	 * @return string A chuck of javascript that will need to be called if {{@link getAutoPostBack AutoPostBack} is set to false}
179 179
 	 */
180
-	public function getCallbackJavascript(){
180
+	public function getCallbackJavascript() {
181 181
 		return "Prado.WebUI.TActiveFileUpload.fileChanged(\"{$this->getClientID()}\")";
182 182
 	}
183 183
 
184 184
 	/**
185 185
 	 * @throws TInvalidDataValueException if the {@link getTempPath TempPath} is not writable.
186 186
 	 */
187
-	public function onInit($sender){
187
+	public function onInit($sender) {
188 188
 		parent::onInit($sender);
189 189
 
190
-		if (!Prado::getApplication()->getCache())
191
-		  if (!Prado::getApplication()->getSecurityManager())
190
+		if(!Prado::getApplication()->getCache())
191
+		  if(!Prado::getApplication()->getSecurityManager())
192 192
 			throw new Exception('TActiveFileUpload needs either an application level cache or a security manager to work securely');
193 193
 
194
-		if (!is_writable(Prado::getPathOfNamespace($this->getTempPath()))){
194
+		if(!is_writable(Prado::getPathOfNamespace($this->getTempPath()))) {
195 195
 			throw new TInvalidDataValueException("activefileupload_temppath_invalid", $this->getTempPath());
196 196
 		}
197 197
 	}
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 	 * This method is mainly used by framework and control developers.
204 204
 	 * @param TCallbackEventParameter the event parameter
205 205
 	 */
206
-	public function raiseCallbackEvent($param){
206
+	public function raiseCallbackEvent($param) {
207 207
 		$cp = $param->getCallbackParameter();
208
-		if ($key = $cp->targetID == $this->_target->getUniqueID()){
208
+		if($key = $cp->targetID == $this->_target->getUniqueID()) {
209 209
 
210 210
 			$params = $this->popParamsByToken($cp->callbackToken);
211 211
 	  foreach($params->files as $index => $file)
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
234 234
 
235 235
 	protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params)
236 236
 	{
237
-		if ($cache = Prado::getApplication()->getCache())
237
+		if($cache = Prado::getApplication()->getCache())
238 238
 			{
239 239
 				// this is the most secure method, file info can't be forged from client side, no matter what
240 240
 				$token = md5('TActiveFileUpload::Params::' . $this->ClientID . '::' . rand(1000 * 1000, 9999 * 1000));
241 241
 				$cache->set($token, serialize($params), 5 * 60); // expire in 5 minutes - the callback should arrive back in seconds, actually
242 242
 			}
243
-		elseif ($mgr = Prado::getApplication()->getSecurityManager())
243
+		elseif($mgr = Prado::getApplication()->getSecurityManager())
244 244
 			{
245 245
 				// this is a less secure method, file info can be still forged from client side, but only if attacker knows the secret application key
246 246
 				$token = urlencode(base64_encode($mgr->encrypt(serialize($params))));
@@ -253,14 +253,14 @@  discard block
 block discarded – undo
253 253
 
254 254
 	protected function popParamsByToken($token)
255 255
 	{
256
-		if ($cache = Prado::getApplication()->getCache())
256
+		if($cache = Prado::getApplication()->getCache())
257 257
 			{
258 258
 				$v = $cache->get($token);
259 259
 				assert($v != '');
260 260
 				$cache->delete($token); // remove it from cache so it can't be used again and won't take up space either
261 261
 				$params = unserialize($v);
262 262
 			}
263
-		elseif ($mgr = Prado::getApplication()->getSecurityManager())
263
+		elseif($mgr = Prado::getApplication()->getSecurityManager())
264 264
 			{
265 265
 				$v = $mgr->decrypt(base64_decode(urldecode($token)));
266 266
 				$params = unserialize($v);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		if(!$this->getPage()->getIsPostBack() && isset($_GET['TActiveFileUpload_InputId']) && isset($_GET['TActiveFileUpload_TargetId']) && $_GET['TActiveFileUpload_InputId'] == $this->getClientID())
284 284
 		{
285 285
 		  $params = new TActiveFileUploadCallbackParams;
286
-		  foreach ($this->getFiles() as $file) {
286
+		  foreach($this->getFiles() as $file) {
287 287
 			$localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()), ''));
288 288
 			$file->setLocalName($localName);
289 289
 			// tricky workaround to intercept "uploaded file too big" error: real uploads happens in onFileUpload instead
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
           	 Options = new Object();
296 296
           	 Options.clientID = '{$_GET['TActiveFileUpload_InputId']}';
297 297
           	 Options.targetID = '{$_GET['TActiveFileUpload_TargetId']}';
298
-			       Options.errorCode = '" . (int)!$this->getHasAllFiles() . "';
298
+			       Options.errorCode = '" . (int) !$this->getHasAllFiles() . "';
299 299
           	 Options.callbackToken = '{$this->pushParamsAndGetToken($params)}';
300 300
           	 Options.fileName = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileName') : $this->getFileName(), JSON_HEX_APOS) . "';
301 301
              Options.fileSize = '" . TJavaScript::jsonEncode($this->getMultiple() ? array_column($params->files, 'fileSize') : $this->getFileSize(), JSON_HEX_APOS) . "';
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
 	/**
344 344
 	 * Removes localfile on ending of the callback.
345 345
 	 */
346
-	public function onUnload($param){
347
-		if ($this->getPage()->getIsCallback())
346
+	public function onUnload($param) {
347
+		if($this->getPage()->getIsCallback())
348 348
 		{
349 349
 		  foreach($this->getFiles() as $file)
350
-			if($file->getHasFile() && file_exists($file->getLocalName())){
350
+			if($file->getHasFile() && file_exists($file->getLocalName())) {
351 351
 			  unlink($file->getLocalName());
352 352
 		  }
353 353
 		}
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	/**
358 358
 	 * @return TBaseActiveCallbackControl standard callback control options.
359 359
 	 */
360
-	public function getActiveControl(){
360
+	public function getActiveControl() {
361 361
 		return $this->getAdapter()->getBaseActiveControl();
362 362
 	}
363 363
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 	 * Adds ID attribute, and renders the javascript for active component.
374 374
 	 * @param THtmlWriter the writer used for the rendering purpose
375 375
 	 */
376
-	public function addAttributesToRender($writer){
376
+	public function addAttributesToRender($writer) {
377 377
 		parent::addAttributesToRender($writer);
378 378
 		$writer->addAttribute('id', $this->getClientID());
379 379
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	/**
384 384
 	 * @return string corresponding javascript class name for this control.
385 385
 	 */
386
-	protected function getClientClassName(){
386
+	protected function getClientClassName() {
387 387
 		return 'Prado.WebUI.TActiveFileUpload';
388 388
 	}
389 389
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 	 * 					completeID => complete client ID,
398 398
 	 * 					errorID => error client ID)
399 399
 	 */
400
-	protected function getClientOptions(){
400
+	protected function getClientOptions() {
401 401
 		$options['ID'] = $this->getClientID();
402 402
 		$options['EventTarget'] = $this->getUniqueID();
403 403
 
@@ -419,9 +419,9 @@  discard block
 block discarded – undo
419 419
 	 * If true, you will not be able to save the uploaded file again.
420 420
 	 * @return boolean true if the file saving is successful
421 421
 	 */
422
-	public function saveAs($fileName, $deleteTempFile = true, $index = 0){
423
-		if (($this->getErrorCode($index) === UPLOAD_ERR_OK) && (file_exists($this->getLocalName($index)))){
424
-			if ($deleteTempFile)
422
+	public function saveAs($fileName, $deleteTempFile = true, $index = 0) {
423
+		if(($this->getErrorCode($index) === UPLOAD_ERR_OK) && (file_exists($this->getLocalName($index)))) {
424
+			if($deleteTempFile)
425 425
 				return rename($this->getLocalName($index), $fileName);
426 426
 			else
427 427
 				return copy($this->getLocalName($index), $fileName);
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	 * @return TImage the image displayed when an upload
434 434
 	 * 		completes successfully.
435 435
 	 */
436
-	public function getSuccessImage(){
436
+	public function getSuccessImage() {
437 437
 		$this->ensureChildControls();
438 438
 		return $this->_success;
439 439
 	}
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	 * @return TImage the image displayed when an upload
443 443
 	 * 		does not complete successfully.
444 444
 	 */
445
-	public function getErrorImage(){
445
+	public function getErrorImage() {
446 446
 		$this->ensureChildControls();
447 447
 		return $this->_error;
448 448
 	}
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 	 * @return TImage the image displayed when an upload
452 452
 	 * 		is in progress.
453 453
 	 */
454
-	public function getBusyImage(){
454
+	public function getBusyImage() {
455 455
 		$this->ensureChildControls();
456 456
 		return $this->_busy;
457 457
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveRadioButton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 	protected function renderInputTag($writer, $clientID, $onclick)
136 136
 	{
137 137
 		parent::renderInputTag($writer, $clientID, $onclick);
138
-		if ($this->getAutoPostBack())
138
+		if($this->getAutoPostBack())
139 139
 			$this->getActiveControl()->registerCallbackClientScript(
140 140
 				$this->getClientClassName(), $this->getPostBackOptions());
141 141
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackPageStateTracker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 			{
111 111
 				$diff = new $details[0]($new, $old, $this->_nullObject);
112 112
 				if(($change = $diff->getDifference()) !== $this->_nullObject)
113
-					$changes[] = [$details[1],[$change]];
113
+					$changes[] = [$details[1], [$change]];
114 114
 			}
115 115
 		}
116 116
 		return $changes;
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDatePicker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	/**
88 88
 	 * @return TBaseActiveCallbackControl standard callback control options.
89 89
 	 */
90
-	public function getActiveControl(){
90
+	public function getActiveControl() {
91 91
 		return $this->getAdapter()->getBaseActiveControl();
92 92
 	}
93 93
 
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 	 * Client-side Text property can only be updated after the OnLoad stage.
96 96
 	 * @param string text content for the textbox
97 97
 	 */
98
-	public function setText($value){
98
+	public function setText($value) {
99 99
 		if(parent::getText() === $value)
100 100
 			return;
101 101
 
102 102
 		parent::setText($value);
103
-		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){
103
+		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {
104 104
 			$cb = $this->getPage()->getCallbackClient();
105 105
 			$cb->setValue($this, $value);
106
-			if ($this->getInputMode() == TDatePickerInputMode::DropDownList)
106
+			if($this->getInputMode() == TDatePickerInputMode::DropDownList)
107 107
 			{
108 108
 				$dt = new \DateTime;
109 109
 				$dt->setTimeStamp($this->getTimeStampFromText());
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * This method is mainly used by framework and control developers.
123 123
 	 * @param TCallbackEventParameter the event parameter
124 124
 	 */
125
-	public function raiseCallbackEvent($param){
125
+	public function raiseCallbackEvent($param) {
126 126
 		$this->onCallback($param);
127 127
 	}
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * handler can be invoked.
134 134
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
135 135
 	 */
136
-	public function onCallback($param){
136
+	public function onCallback($param) {
137 137
 		$this->raiseEvent('OnCallback', $this, $param);
138 138
 	}
139 139
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveCheckBox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 	protected function renderInputTag($writer, $clientID, $onclick)
141 141
 	{
142 142
 		parent::renderInputTag($writer, $clientID, $onclick);
143
-		if ($this->getAutoPostBack())
143
+		if($this->getAutoPostBack())
144 144
 			$this->getActiveControl()->registerCallbackClientScript(
145 145
 				$this->getClientClassName(), $this->getPostBackOptions());
146 146
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackClientScript.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.