Completed
Push — prado-3.3 ( f5b914 )
by Fabio
07:15
created
framework/Web/UI/WebControls/TCompareValidator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function getDataType()
61 61
 	{
62
-		return $this->getViewState('DataType',TValidationDataType::String);
62
+		return $this->getViewState('DataType', TValidationDataType::String);
63 63
 	}
64 64
 
65 65
 	/**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function setDataType($value)
71 71
 	{
72
-		$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String);
72
+		$this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'TValidationDataType'), TValidationDataType::String);
73 73
 	}
74 74
 
75 75
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function getControlToCompare()
79 79
 	{
80
-		return $this->getViewState('ControlToCompare','');
80
+		return $this->getViewState('ControlToCompare', '');
81 81
 	}
82 82
 
83 83
 	/**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function setControlToCompare($value)
88 88
 	{
89
-		$this->setViewState('ControlToCompare',$value,'');
89
+		$this->setViewState('ControlToCompare', $value, '');
90 90
 	}
91 91
 
92 92
 	/**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function getValueToCompare()
96 96
 	{
97
-		return $this->getViewState('ValueToCompare','');
97
+		return $this->getViewState('ValueToCompare', '');
98 98
 	}
99 99
 
100 100
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setValueToCompare($value)
105 105
 	{
106
-		$this->setViewState('ValueToCompare',$value,'');
106
+		$this->setViewState('ValueToCompare', $value, '');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function getOperator()
113 113
 	{
114
-		return $this->getViewState('Operator',TValidationCompareOperator::Equal);
114
+		return $this->getViewState('Operator', TValidationCompareOperator::Equal);
115 115
 	}
116 116
 
117 117
 	/**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function setOperator($value)
122 122
 	{
123
-		$this->setViewState('Operator',TPropertyValue::ensureEnum($value,'TValidationCompareOperator'),TValidationCompareOperator::Equal);
123
+		$this->setViewState('Operator', TPropertyValue::ensureEnum($value, 'TValidationCompareOperator'), TValidationCompareOperator::Equal);
124 124
 	}
125 125
 
126 126
 	/**
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
 		else
163 163
 			$value2=$this->getValueToCompare();
164 164
 
165
-		$values = $this->getComparisonValues($value, $value2);
165
+		$values=$this->getComparisonValues($value, $value2);
166 166
 		switch($this->getOperator())
167 167
 		{
168 168
 			case TValidationCompareOperator::Equal:
169
-				return $values[0] == $values[1];
169
+				return $values[0]==$values[1];
170 170
 			case TValidationCompareOperator::NotEqual:
171
-				return $values[0] != $values[1];
171
+				return $values[0]!=$values[1];
172 172
 			case TValidationCompareOperator::GreaterThan:
173 173
 				return $values[0] > $values[1];
174 174
 			case TValidationCompareOperator::GreaterThanEqual:
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
 			case TValidationDataType::Float:
198 198
 				return array(floatval($value1), floatval($value2));
199 199
 			case TValidationDataType::Date:
200
-				$dateFormat = $this->getDateFormat();
200
+				$dateFormat=$this->getDateFormat();
201 201
 				if($dateFormat!=='')
202 202
 				{
203
-					$formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat);
203
+					$formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat);
204 204
 					return array($formatter->parse($value1), $formatter->parse($value2));
205 205
 				}
206 206
 				else
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	protected function getClientScriptOptions()
217 217
 	{
218
-		$options = parent::getClientScriptOptions();
218
+		$options=parent::getClientScriptOptions();
219 219
 		if(($name=$this->getControlToCompare())!=='')
220 220
 		{
221 221
 			if(($control=$this->findControl($name))!==null)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBaseValidator.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * them specially.
92 92
 	 * @var array list of control class names
93 93
 	 */
94
-	private static $_clientClass = array('THtmlArea', 'THtmlArea4', 'TDatePicker', 'TListBox', 'TCheckBoxList');
94
+	private static $_clientClass=array('THtmlArea', 'THtmlArea4', 'TDatePicker', 'TListBox', 'TCheckBoxList');
95 95
 
96 96
 	/**
97 97
 	 * Constructor.
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 		$display=$this->getDisplay();
137 137
 		$visible=$this->getEnabled(true) && !$this->getIsValid();
138 138
 		if($display===TValidatorDisplayStyle::None || (!$visible && $display===TValidatorDisplayStyle::Dynamic))
139
-			$writer->addStyleAttribute('display','none');
139
+			$writer->addStyleAttribute('display', 'none');
140 140
 		else if(!$visible)
141
-			$writer->addStyleAttribute('visibility','hidden');
142
-		$writer->addAttribute('id',$this->getClientID());
141
+			$writer->addStyleAttribute('visibility', 'hidden');
142
+		$writer->addAttribute('id', $this->getClientID());
143 143
 		parent::addAttributesToRender($writer);
144 144
 		$this->renderClientControlScript($writer);
145 145
 	}
@@ -150,29 +150,29 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	protected function getClientScriptOptions()
152 152
 	{
153
-		$control = $this->getValidationTarget();
154
-		$options['ID'] = $this->getClientID();
155
-		$options['FormID'] = $this->getPage()->getForm()->getClientID();
156
-		$options['Display'] = $this->getDisplay();
157
-		$options['ErrorMessage'] = $this->getErrorMessage();
153
+		$control=$this->getValidationTarget();
154
+		$options['ID']=$this->getClientID();
155
+		$options['FormID']=$this->getPage()->getForm()->getClientID();
156
+		$options['Display']=$this->getDisplay();
157
+		$options['ErrorMessage']=$this->getErrorMessage();
158 158
 		if($this->getFocusOnError())
159 159
 		{
160
-			$options['FocusOnError'] = $this->getFocusOnError();
161
-			$options['FocusElementID'] = $this->getFocusElementID();
160
+			$options['FocusOnError']=$this->getFocusOnError();
161
+			$options['FocusElementID']=$this->getFocusElementID();
162 162
 		}
163
-		$options['ValidationGroup'] = $this->getValidationGroup();
163
+		$options['ValidationGroup']=$this->getValidationGroup();
164 164
 		if($control)
165
-			$options['ControlToValidate'] = $control->getClientID();
166
-		$options['ControlCssClass'] = $this->getControlCssClass();
165
+			$options['ControlToValidate']=$control->getClientID();
166
+		$options['ControlCssClass']=$this->getControlCssClass();
167 167
 
168
-		$options['ControlType'] = $this->getClientControlClass($control);
169
-		$options['Enabled'] = $this->getEnabled(true);
168
+		$options['ControlType']=$this->getClientControlClass($control);
169
+		$options['Enabled']=$this->getEnabled(true);
170 170
 
171 171
 		//get date format from date picker target control
172 172
 		if($control instanceof TDatePicker)
173
-			$options['DateFormat'] = $control->getDateFormat();
173
+			$options['DateFormat']=$control->getDateFormat();
174 174
 
175
-		$options = array_merge($options,$this->getClientSide()->getOptions()->toArray());
175
+		$options=array_merge($options, $this->getClientSide()->getOptions()->toArray());
176 176
 
177 177
 		return $options;
178 178
 	}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	public function getClientSide()
212 212
 	{
213 213
 		if($this->_clientSide===null)
214
-			$this->_clientSide = $this->createClientSide();
214
+			$this->_clientSide=$this->createClientSide();
215 215
 		return $this->_clientSide;
216 216
 	}
217 217
 
@@ -231,15 +231,15 @@  discard block
 block discarded – undo
231 231
 	 */
232 232
 	public function renderClientControlScript($writer)
233 233
 	{
234
-		$scripts = $this->getPage()->getClientScript();
235
-		if ($this->getEnableClientScript())
234
+		$scripts=$this->getPage()->getClientScript();
235
+		if($this->getEnableClientScript())
236 236
 			$scripts->registerPradoScript('validator');
237 237
 		$formID=$this->getPage()->getForm()->getClientID();
238
-		$scriptKey = "TBaseValidator:$formID";
238
+		$scriptKey="TBaseValidator:$formID";
239 239
 		if($this->getEnableClientScript() && !$scripts->isEndScriptRegistered($scriptKey))
240 240
 		{
241
-			$manager['FormID'] = $formID;
242
-			$options = TJavaScript::encode($manager);
241
+			$manager['FormID']=$formID;
242
+			$options=TJavaScript::encode($manager);
243 243
 			$scripts->registerEndScript($scriptKey, "new Prado.ValidationManager({$options});");
244 244
 		}
245 245
 		if($this->getEnableClientScript())
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 * Override parent implementation to update the control CSS Class before
251 251
 	 * the validated control is rendered
252 252
 	 */
253
-	public function onPreRender ($param)
253
+	public function onPreRender($param)
254 254
 	{
255 255
 		parent::onPreRender($param);
256 256
 		$this->updateControlCssClass();
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
 			$control=$this->getValidationTarget();
269 269
 			if($control instanceof TWebControl)
270 270
 			{
271
-				$class = preg_replace ('/ '.preg_quote($cssClass).'/', '',$control->getCssClass());
271
+				$class=preg_replace('/ '.preg_quote($cssClass).'/', '', $control->getCssClass());
272 272
 				if(!$this->getIsValid())
273 273
 				{
274
-					$class .= ' '.$cssClass;
274
+					$class.=' '.$cssClass;
275 275
 					$control->setCssClass($class);
276
-				} elseif ($control->getIsValid())
276
+				} elseif($control->getIsValid())
277 277
 					$control->setCssClass($class);
278 278
 			}
279 279
 		}
@@ -284,11 +284,11 @@  discard block
 block discarded – undo
284 284
 	 */
285 285
 	protected function registerClientScriptValidator()
286 286
 	{
287
-		$key = 'prado:'.$this->getClientID();
287
+		$key='prado:'.$this->getClientID();
288 288
 		if(!$this->getPage()->getClientScript()->isEndScriptRegistered($key))
289 289
 		{
290
-			$options = TJavaScript::encode($this->getClientScriptOptions());
291
-			$script = 'new '.$this->getClientClassName().'('.$options.');';
290
+			$options=TJavaScript::encode($this->getClientScriptOptions());
291
+			$script='new '.$this->getClientClassName().'('.$options.');';
292 292
 			$this->getPage()->getClientScript()->registerEndScript($key, $script);
293 293
 		}
294 294
 	}
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 */
308 308
 	public function setForControl($value)
309 309
 	{
310
-		throw new TNotSupportedException('basevalidator_forcontrol_unsupported',get_class($this));
310
+		throw new TNotSupportedException('basevalidator_forcontrol_unsupported', get_class($this));
311 311
 	}
312 312
 
313 313
 	/**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 	 */
328 328
 	public function getDisplay()
329 329
 	{
330
-		return $this->getViewState('Display',TValidatorDisplayStyle::Fixed);
330
+		return $this->getViewState('Display', TValidatorDisplayStyle::Fixed);
331 331
 	}
332 332
 
333 333
 	/**
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	 */
336 336
 	public function setDisplay($value)
337 337
 	{
338
-		$this->setViewState('Display',TPropertyValue::ensureEnum($value,'TValidatorDisplayStyle'),TValidatorDisplayStyle::Fixed);
338
+		$this->setViewState('Display', TPropertyValue::ensureEnum($value, 'TValidatorDisplayStyle'), TValidatorDisplayStyle::Fixed);
339 339
 	}
340 340
 
341 341
 	/**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	 */
344 344
 	public function getEnableClientScript()
345 345
 	{
346
-		return $this->getViewState('EnableClientScript',true);
346
+		return $this->getViewState('EnableClientScript', true);
347 347
 	}
348 348
 
349 349
 	/**
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 	 */
352 352
 	public function setEnableClientScript($value)
353 353
 	{
354
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
354
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
355 355
 	}
356 356
 
357 357
 	/**
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 	 */
360 360
 	public function getErrorMessage()
361 361
 	{
362
-		return $this->getViewState('ErrorMessage','');
362
+		return $this->getViewState('ErrorMessage', '');
363 363
 	}
364 364
 
365 365
 	/**
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 	 */
369 369
 	public function setErrorMessage($value)
370 370
 	{
371
-		$this->setViewState('ErrorMessage',$value,'');
371
+		$this->setViewState('ErrorMessage', $value, '');
372 372
 	}
373 373
 
374 374
 	/**
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	 */
377 377
 	public function getControlToValidate()
378 378
 	{
379
-		return $this->getViewState('ControlToValidate','');
379
+		return $this->getViewState('ControlToValidate', '');
380 380
 	}
381 381
 
382 382
 	/**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	 */
388 388
 	public function setControlToValidate($value)
389 389
 	{
390
-		$this->setViewState('ControlToValidate',$value,'');
390
+		$this->setViewState('ControlToValidate', $value, '');
391 391
 	}
392 392
 
393 393
 	/**
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 	 */
396 396
 	public function getFocusOnError()
397 397
 	{
398
-		return $this->getViewState('FocusOnError',false);
398
+		return $this->getViewState('FocusOnError', false);
399 399
 	}
400 400
 
401 401
 	/**
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 	 */
404 404
 	public function setFocusOnError($value)
405 405
 	{
406
-		$this->setViewState('FocusOnError',TPropertyValue::ensureBoolean($value),false);
406
+		$this->setViewState('FocusOnError', TPropertyValue::ensureBoolean($value), false);
407 407
 	}
408 408
 
409 409
 	/**
@@ -413,13 +413,13 @@  discard block
 block discarded – undo
413 413
 	 */
414 414
 	public function getFocusElementID()
415 415
 	{
416
-		if(($id=$this->getViewState('FocusElementID',''))==='')
416
+		if(($id=$this->getViewState('FocusElementID', ''))==='')
417 417
 		{
418 418
 			$target=$this->getValidationTarget();
419 419
 			/* Workaround: TCheckBoxList and TRadioButtonList nests the actual
420 420
 			 * inputs inside a table; we ensure the first input gets focused
421 421
 			 */
422
-			if($target instanceof TCheckBoxList && $target->getItemCount()>0)
422
+			if($target instanceof TCheckBoxList && $target->getItemCount() > 0)
423 423
 			{
424 424
 				$id=$target->getClientID().'_c0';
425 425
 			} else {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	public function getValidationGroup()
445 445
 	{
446
-		return $this->getViewState('ValidationGroup','');
446
+		return $this->getViewState('ValidationGroup', '');
447 447
 	}
448 448
 
449 449
 	/**
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 	 */
452 452
 	public function setValidationGroup($value)
453 453
 	{
454
-		$this->setViewState('ValidationGroup',$value,'');
454
+		$this->setViewState('ValidationGroup', $value, '');
455 455
 	}
456 456
 
457 457
 	/**
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 		if(($id=$this->getControlToValidate())!=='' && ($control=$this->findControl($id))!==null)
482 482
 			return $control;
483 483
 		else
484
-			throw new TConfigurationException('basevalidator_controltovalidate_invalid',get_class($this));
484
+			throw new TConfigurationException('basevalidator_controltovalidate_invalid', get_class($this));
485 485
 	}
486 486
 
487 487
 	/**
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 		if($control instanceof IValidatable)
496 496
 			return $control->getValidationPropertyValue();
497 497
 		else
498
-			throw new TInvalidDataTypeException('basevalidator_validatable_required',get_class($this));
498
+			throw new TInvalidDataTypeException('basevalidator_validatable_required', get_class($this));
499 499
 	}
500 500
 
501 501
 	/**
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 	 */
545 545
 	public function getControlCssClass()
546 546
 	{
547
-		return $this->getViewState('ControlCssClass','');
547
+		return $this->getViewState('ControlCssClass', '');
548 548
 	}
549 549
 
550 550
 	/**
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 	 */
553 553
 	public function setControlCssClass($value)
554 554
 	{
555
-		$this->setViewState('ControlCssClass',$value,'');
555
+		$this->setViewState('ControlCssClass', $value, '');
556 556
 	}
557 557
 
558 558
 	/**
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 	 */
568 568
 	public function onValidationSuccess()
569 569
 	{
570
-		$this->raiseEvent('OnValidationSuccess',$this,null);
570
+		$this->raiseEvent('OnValidationSuccess', $this, null);
571 571
 	}
572 572
 
573 573
 	/**
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 	 */
576 576
 	public function onValidationError()
577 577
 	{
578
-		$this->raiseEvent('OnValidationError',$this,null);
578
+		$this->raiseEvent('OnValidationError', $this, null);
579 579
 	}
580 580
 
581 581
 	/**
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 	 */
587 587
 	public function onValidate()
588 588
 	{
589
-		$this->raiseEvent('OnValidate',$this,null);
589
+		$this->raiseEvent('OnValidate', $this, null);
590 590
 	}
591 591
 
592 592
 	/**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 	 */
696 696
 	public function getObserveChanges()
697 697
 	{
698
-		$changes = $this->getOption('ObserveChanges');
698
+		$changes=$this->getOption('ObserveChanges');
699 699
 		return ($changes===null) ? true : $changes;
700 700
 	}
701 701
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TAccordion.php 1 patch
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function getActiveViewIndex()
96 96
 	{
97
-		return $this->getViewState('ActiveViewIndex',0);
97
+		return $this->getViewState('ActiveViewIndex', 0);
98 98
 	}
99 99
 
100 100
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function setActiveViewIndex($value)
105 105
 	{
106
-		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
106
+		$this->setViewState('ActiveViewIndex', TPropertyValue::ensureInteger($value), 0);
107 107
 		$this->setActiveViewID('');
108 108
 	}
109 109
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function getActiveViewID()
117 117
 	{
118
-		return $this->getViewState('ActiveViewID','');
118
+		return $this->getViewState('ActiveViewID', '');
119 119
 	}
120 120
 
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function setActiveViewID($value)
125 125
 	{
126
-		$this->setViewState('ActiveViewID',$value,'');
126
+		$this->setViewState('ActiveViewID', $value, '');
127 127
 	}
128 128
 
129 129
 	/**
@@ -139,17 +139,17 @@  discard block
 block discarded – undo
139 139
 		$views=$this->getViews();
140 140
 		if(($id=$this->getActiveViewID())!=='')
141 141
 		{
142
-			if(($index=$views->findIndexByID($id))>=0)
142
+			if(($index=$views->findIndexByID($id)) >= 0)
143 143
 				$activeView=$views->itemAt($index);
144 144
 			else
145
-				throw new TInvalidDataValueException('accordion_activeviewid_invalid',$id);
145
+				throw new TInvalidDataValueException('accordion_activeviewid_invalid', $id);
146 146
 		}
147
-		else if(($index=$this->getActiveViewIndex())>=0)
147
+		else if(($index=$this->getActiveViewIndex()) >= 0)
148 148
 		{
149
-			if($index<$views->getCount())
149
+			if($index < $views->getCount())
150 150
 				$activeView=$views->itemAt($index);
151 151
 			else
152
-				throw new TInvalidDataValueException('accordion_activeviewindex_invalid',$index);
152
+				throw new TInvalidDataValueException('accordion_activeviewindex_invalid', $index);
153 153
 		}
154 154
 		else
155 155
 		{
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	public function setActiveView($view)
175 175
 	{
176
-		if($this->getViews()->indexOf($view)>=0)
176
+		if($this->getViews()->indexOf($view) >= 0)
177 177
 			$this->activateView($view);
178 178
 		else
179 179
 			throw new TInvalidOperationException('accordion_view_inexistent');
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	*/
185 185
 	public function getCssUrl()
186 186
 	{
187
-		return $this->getViewState('CssUrl','default');
187
+		return $this->getViewState('CssUrl', 'default');
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	*/
193 193
 	public function setCssUrl($value)
194 194
 	{
195
-		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
195
+		$this->setViewState('CssUrl', TPropertyValue::ensureString($value), '');
196 196
 	}
197 197
 
198 198
 	/**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	public function getCssClass()
202 202
 	{
203 203
 		$cssClass=parent::getCssClass();
204
-			return $cssClass===''?'accordion':$cssClass;
204
+			return $cssClass==='' ? 'accordion' : $cssClass;
205 205
 	}
206 206
 
207 207
 	/**
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	*/
226 226
 	public function getAnimationDuration()
227 227
 	{
228
-		return $this->getViewState('AnimationDuration','1');
228
+		return $this->getViewState('AnimationDuration', '1');
229 229
 	}
230 230
 
231 231
 	/**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	*/
234 234
 	public function setAnimationDuration($value)
235 235
 	{
236
-		$this->setViewState('AnimationDuration',$value);
236
+		$this->setViewState('AnimationDuration', $value);
237 237
 	}
238 238
 
239 239
 	/**
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getViewStyle()
243 243
 	{
244
-		if(($style=$this->getViewState('ViewStyle',null))===null)
244
+		if(($style=$this->getViewState('ViewStyle', null))===null)
245 245
 		{
246 246
 			$style=new TStyle;
247 247
 			$style->setCssClass('accordion-view');
248
-			$this->setViewState('ViewStyle',$style,null);
248
+			$this->setViewState('ViewStyle', $style, null);
249 249
 		}
250 250
 		return $style;
251 251
 	}
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
 	 */
272 272
 	public function getHeaderStyle()
273 273
 	{
274
-		if(($style=$this->getViewState('HeaderStyle',null))===null)
274
+		if(($style=$this->getViewState('HeaderStyle', null))===null)
275 275
 		{
276 276
 			$style=new TStyle;
277 277
 			$style->setCssClass('accordion-header');
278
-			$this->setViewState('HeaderStyle',$style,null);
278
+			$this->setViewState('HeaderStyle', $style, null);
279 279
 		}
280 280
 		return $style;
281 281
 	}
@@ -301,11 +301,11 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	public function getActiveHeaderStyle()
303 303
 	{
304
-		if(($style=$this->getViewState('ActiveHeaderStyle',null))===null)
304
+		if(($style=$this->getViewState('ActiveHeaderStyle', null))===null)
305 305
 		{
306 306
 			$style=new TStyle;
307 307
 			$style->setCssClass('accordion-header-active');
308
-			$this->setViewState('ActiveHeaderStyle',$style,null);
308
+			$this->setViewState('ActiveHeaderStyle', $style, null);
309 309
 		}
310 310
 		return $style;
311 311
 	}
@@ -355,11 +355,11 @@  discard block
 block discarded – undo
355 355
 	 * @param array the input data collection
356 356
 	 * @return boolean whether the data of the control has been changed
357 357
 	 */
358
-	public function loadPostData($key,$values)
358
+	public function loadPostData($key, $values)
359 359
 	{
360 360
 		if(($index=$values[$this->getClientID().'_1'])!==null)
361 361
 		{
362
-			$index=(int)$index;
362
+			$index=(int) $index;
363 363
 			$currentIndex=$this->getActiveViewIndex();
364 364
 			if($currentIndex!==$index)
365 365
 			{
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 	 */
400 400
 	protected function addAttributesToRender($writer)
401 401
 	{
402
-		$writer->addAttribute('id',$this->getClientID());
402
+		$writer->addAttribute('id', $this->getClientID());
403 403
 		$this->setCssClass($this->getCssClass());
404 404
 		parent::addAttributesToRender($writer);
405 405
 	}
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	public function onPreRender($param)
413 413
 	{
414 414
 		parent::onPreRender($param);
415
-		$this->getActiveView();  // determine the active view
415
+		$this->getActiveView(); // determine the active view
416 416
 		$this->registerStyleSheet();
417 417
 	}
418 418
 
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
 	 */
424 424
 	protected function registerStyleSheet()
425 425
 	{
426
-		$url = $this->getCssUrl();
426
+		$url=$this->getCssUrl();
427 427
 
428
-		if($url === '') {
428
+		if($url==='') {
429 429
 			return;
430 430
 		}
431 431
 
432
-		if($url === 'default') {
433
-			$url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'accordion.css');
432
+		if($url==='default') {
433
+			$url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'accordion.css');
434 434
 		}
435 435
 
436
-		if($url !== '') {
436
+		if($url!=='') {
437 437
 			$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
438 438
 		}
439 439
 	}
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 		$code="new $className($options);";
453 453
 		$cs->registerEndScript("prado:$id", $code);
454 454
 		// ensure an item is always active and visible
455
-		$index = $this->getActiveViewIndex();
455
+		$index=$this->getActiveViewIndex();
456 456
 		if(!$this->getViews()->itemAt($index)->Visible)
457 457
 			$index=0;
458 458
 		$cs->registerHiddenField($id.'_1', $index);
@@ -475,17 +475,17 @@  discard block
 block discarded – undo
475 475
 	 */
476 476
 	protected function getClientOptions()
477 477
 	{
478
-		$options['ID'] = $this->getClientID();
479
-		$options['ActiveHeaderCssClass'] = $this->getActiveHeaderCssClass();
480
-		$options['HeaderCssClass'] = $this->getHeaderCssClass();
481
-		$options['Duration'] = $this->getAnimationDuration();
478
+		$options['ID']=$this->getClientID();
479
+		$options['ActiveHeaderCssClass']=$this->getActiveHeaderCssClass();
480
+		$options['HeaderCssClass']=$this->getHeaderCssClass();
481
+		$options['Duration']=$this->getAnimationDuration();
482 482
 
483
-		if (($viewheight = $this->getViewHeight())>0)
484
-			$options['maxHeight'] = $viewheight;
485
-		$views = array();
483
+		if(($viewheight=$this->getViewHeight()) > 0)
484
+			$options['maxHeight']=$viewheight;
485
+		$views=array();
486 486
 		foreach($this->getViews() as $view)
487
-			$views[$view->getClientID()] = $view->getVisible() ? '1': '0';
488
-		$options['Views'] = $views;
487
+			$views[$view->getClientID()]=$view->getVisible() ? '1' : '0';
488
+		$options['Views']=$views;
489 489
 
490 490
 		return $options;
491 491
 	}
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 	public function renderContents($writer)
521 521
 	{
522 522
 		$views=$this->getViews();
523
-		if($views->getCount()>0)
523
+		if($views->getCount() > 0)
524 524
 		{
525 525
 			$writer->writeLine();
526 526
 			foreach($views as $view)
@@ -566,13 +566,13 @@  discard block
 block discarded – undo
566 566
 	protected function addAttributesToRender($writer)
567 567
 	{
568 568
 		if(!$this->getActive() && $this->getPage()->getClientSupportsJavaScript())
569
-			$this->getStyle()->setStyleField('display','none');
569
+			$this->getStyle()->setStyleField('display', 'none');
570 570
 
571 571
 		$this->getStyle()->mergeWith($this->getParent()->getViewStyle());
572 572
 
573 573
 		parent::addAttributesToRender($writer);
574 574
 
575
-		$writer->addAttribute('id',$this->getClientID());
575
+		$writer->addAttribute('id', $this->getClientID());
576 576
 	}
577 577
 
578 578
 	/**
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 	 */
581 581
 	public function getCaption()
582 582
 	{
583
-		return $this->getViewState('Caption','');
583
+		return $this->getViewState('Caption', '');
584 584
 	}
585 585
 
586 586
 	/**
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 	 */
589 589
 	public function setCaption($value)
590 590
 	{
591
-		$this->setViewState('Caption',TPropertyValue::ensureString($value),'');
591
+		$this->setViewState('Caption', TPropertyValue::ensureString($value), '');
592 592
 	}
593 593
 
594 594
 	/**
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 	 */
597 597
 	public function getNavigateUrl()
598 598
 	{
599
-		return $this->getViewState('NavigateUrl','');
599
+		return $this->getViewState('NavigateUrl', '');
600 600
 	}
601 601
 
602 602
 	/**
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 	 */
607 607
 	public function setNavigateUrl($value)
608 608
 	{
609
-		$this->setViewState('NavigateUrl',TPropertyValue::ensureString($value),'');
609
+		$this->setViewState('NavigateUrl', TPropertyValue::ensureString($value), '');
610 610
 	}
611 611
 
612 612
 	/**
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 	 */
615 615
 	public function getText()
616 616
 	{
617
-		return $this->getViewState('Text','');
617
+		return $this->getViewState('Text', '');
618 618
 	}
619 619
 
620 620
 	/**
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 	 */
625 625
 	public function setText($value)
626 626
 	{
627
-		$this->setViewState('Text',TPropertyValue::ensureString($value),'');
627
+		$this->setViewState('Text', TPropertyValue::ensureString($value), '');
628 628
 	}
629 629
 
630 630
 	/**
@@ -663,9 +663,9 @@  discard block
 block discarded – undo
663 663
 	{
664 664
 		if($this->getVisible(false) && $this->getPage()->getClientSupportsJavaScript())
665 665
 		{
666
-			$writer->addAttribute('id',$this->getClientID().'_0');
666
+			$writer->addAttribute('id', $this->getClientID().'_0');
667 667
 
668
-			$style=$this->getActive()?$this->getParent()->getActiveHeaderStyle():$this->getParent()->getHeaderStyle();
668
+			$style=$this->getActive() ? $this->getParent()->getActiveHeaderStyle() : $this->getParent()->getHeaderStyle();
669 669
 
670 670
 			$style->addAttributesToRender($writer);
671 671
 
@@ -684,14 +684,14 @@  discard block
 block discarded – undo
684 684
 	 */
685 685
 	protected function renderHeaderContent($writer)
686 686
 	{
687
-		$url = $this->getNavigateUrl();
687
+		$url=$this->getNavigateUrl();
688 688
 		if(($caption=$this->getCaption())==='')
689 689
 			$caption='&nbsp;';
690 690
 
691
-		if ($url!='')
691
+		if($url!='')
692 692
 			$writer->write("<a href=\"{$url}\">");
693 693
 		$writer->write("{$caption}");
694
-		if ($url!='')
694
+		if($url!='')
695 695
 			$writer->write("</a>");
696 696
 	}
697 697
 }
@@ -714,10 +714,10 @@  discard block
 block discarded – undo
714 714
 	 * @param mixed new item
715 715
 	 * @throws TInvalidDataTypeException if the item to be inserted is not a {@link TAccordionView} object.
716 716
 	 */
717
-	public function insertAt($index,$item)
717
+	public function insertAt($index, $item)
718 718
 	{
719 719
 		if($item instanceof TAccordionView)
720
-			parent::insertAt($index,$item);
720
+			parent::insertAt($index, $item);
721 721
 		else
722 722
 			throw new TInvalidDataTypeException('tabviewcollection_tabview_required');
723 723
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TOutputCache.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
 		if(!$this->_cacheChecked)
102 102
 		{
103 103
 			$this->_cacheChecked=true;
104
-			if($this->_duration>0 && ($this->_cachePostBack || !$this->getPage()->getIsPostBack()))
104
+			if($this->_duration > 0 && ($this->_cachePostBack || !$this->getPage()->getIsPostBack()))
105 105
 			{
106 106
 				if($this->_cacheModuleID!=='')
107 107
 				{
108 108
 					$this->_cache=$this->getApplication()->getModule($this->_cacheModuleID);
109 109
 					if(!($this->_cache instanceof ICache))
110
-						throw new TConfigurationException('outputcache_cachemoduleid_invalid',$this->_cacheModuleID);
110
+						throw new TConfigurationException('outputcache_cachemoduleid_invalid', $this->_cacheModuleID);
111 111
 				}
112 112
 				else
113 113
 					$this->_cache=$this->getApplication()->getCache();
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
 					if(is_array($data))
119 119
 					{
120 120
 						$param=new TOutputCacheCheckDependencyEventParameter;
121
-						$param->setCacheTime(isset($data[3])?$data[3]:0);
121
+						$param->setCacheTime(isset($data[3]) ? $data[3] : 0);
122 122
 						$this->onCheckDependency($param);
123 123
 						$this->_dataCached=$param->getIsValid();
124 124
 					}
125 125
 					else
126 126
 						$this->_dataCached=false;
127 127
 					if($this->_dataCached)
128
-						list($this->_contents,$this->_state,$this->_actions,$this->_cacheTime)=$data;
128
+						list($this->_contents, $this->_state, $this->_actions, $this->_cacheTime)=$data;
129 129
 				}
130 130
 			}
131 131
 		}
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
 		foreach($this->_actions as $action)
184 184
 		{
185 185
 			if($action[0]==='Page.ClientScript')
186
-				call_user_func_array(array($cs,$action[1]),$action[2]);
186
+				call_user_func_array(array($cs, $action[1]), $action[2]);
187 187
 			else if($action[0]==='Page')
188
-				call_user_func_array(array($page,$action[1]),$action[2]);
188
+				call_user_func_array(array($page, $action[1]), $action[2]);
189 189
 			else
190
-				call_user_func_array(array($this->getSubProperty($action[0]),$action[1]),$action[2]);
190
+				call_user_func_array(array($this->getSubProperty($action[0]), $action[1]), $action[2]);
191 191
 		}
192 192
 	}
193 193
 
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
 	 * @param array the collection of the state
220 220
 	 * @param boolean whether the viewstate should be loaded
221 221
 	 */
222
-	protected function loadStateRecursive(&$state,$needViewState=true)
222
+	protected function loadStateRecursive(&$state, $needViewState=true)
223 223
 	{
224 224
 		$st=unserialize($state);
225
-		parent::loadStateRecursive($st,$needViewState);
225
+		parent::loadStateRecursive($st, $needViewState);
226 226
 	}
227 227
 
228 228
 	/**
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 	 * @param string method name of the context object
256 256
 	 * @param array list of parameters to be passed to the action method
257 257
 	 */
258
-	public function registerAction($context,$funcName,$funcParams)
258
+	public function registerAction($context, $funcName, $funcParams)
259 259
 	{
260
-		$this->_actions[]=array($context,$funcName,$funcParams);
260
+		$this->_actions[]=array($context, $funcName, $funcParams);
261 261
 	}
262 262
 
263 263
 	public function getCacheKey()
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 		{
287 287
 			$params=array();
288 288
 			$request=$this->getRequest();
289
-			foreach(explode(',',$this->_varyByParam) as $name)
289
+			foreach(explode(',', $this->_varyByParam) as $name)
290 290
 			{
291 291
 				$name=trim($name);
292 292
 				$params[$name]=$request->itemAt($name);
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 	 */
379 379
 	public function setDuration($value)
380 380
 	{
381
-		if(($value=TPropertyValue::ensureInteger($value))<0)
382
-			throw new TInvalidDataValueException('outputcache_duration_invalid',get_class($this));
381
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
382
+			throw new TInvalidDataValueException('outputcache_duration_invalid', get_class($this));
383 383
 		$this->_duration=$value;
384 384
 	}
385 385
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 	 */
449 449
 	public function onCheckDependency($param)
450 450
 	{
451
-		$this->raiseEvent('OnCheckDependency',$this,$param);
451
+		$this->raiseEvent('OnCheckDependency', $this, $param);
452 452
 	}
453 453
 
454 454
 	/**
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 	 */
462 462
 	public function onCalculateKey($param)
463 463
 	{
464
-		$this->raiseEvent('OnCalculateKey',$this,$param);
464
+		$this->raiseEvent('OnCalculateKey', $this, $param);
465 465
 	}
466 466
 
467 467
 	/**
@@ -476,9 +476,9 @@  discard block
 block discarded – undo
476 476
 			$writer->write($this->_contents);
477 477
 		else if($this->_cacheAvailable)
478 478
 		{
479
-			$textwriter = new TTextWriter();
480
-			$multiwriter = new TOutputCacheTextWriterMulti(array($writer->getWriter(),$textwriter));
481
-			$htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $multiwriter);
479
+			$textwriter=new TTextWriter();
480
+			$multiwriter=new TOutputCacheTextWriterMulti(array($writer->getWriter(), $textwriter));
481
+			$htmlWriter=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $multiwriter);
482 482
 
483 483
 			$stack=$this->getPage()->getCachingStack();
484 484
 			$stack->push($this);
@@ -486,8 +486,8 @@  discard block
 block discarded – undo
486 486
 			$stack->pop();
487 487
 
488 488
 			$content=$textwriter->flush();
489
-			$data=array($content,$this->_state,$this->_actions,time());
490
-			$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
489
+			$data=array($content, $this->_state, $this->_actions, time());
490
+			$this->_cache->set($this->getCacheKey(), $data, $this->getDuration(), $this->getCacheDependency());
491 491
 		}
492 492
 		else
493 493
 			parent::render($writer);
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	public function __construct(Array $writers)
598 598
 	{
599 599
 		//parent::__construct();
600
-		$this->_writers = $writers;
600
+		$this->_writers=$writers;
601 601
 	}
602 602
 
603 603
 	public function write($s)
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 	public function flush()
610 610
 	{
611 611
 		foreach($this->_writers as $writer)
612
-			$s = $writer->flush();
612
+			$s=$writer->flush();
613 613
 		return $s;
614 614
 	}
615 615
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TClientScript.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	public function onPreRender($param)
106 106
 	{
107 107
 		parent::onPreRender($param);
108
-		$scripts = preg_split('/,|\s+/', $this->getPradoScripts());
109
-		$cs = $this->getPage()->getClientScript();
108
+		$scripts=preg_split('/,|\s+/', $this->getPradoScripts());
109
+		$cs=$this->getPage()->getClientScript();
110 110
 		foreach($scripts as $script)
111 111
 		{
112
-			if(($script = trim($script))!=='')
112
+			if(($script=trim($script))!=='')
113 113
 				$cs->registerPradoScript($script);
114 114
 		}
115 115
 	}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function render($writer)
124 124
 	{
125
-		if ($this->getFlushScriptFiles())
125
+		if($this->getFlushScriptFiles())
126 126
 			$this->getPage()->getClientScript()->flushScriptFiles($writer, $this);
127 127
 		$this->renderCustomScriptFile($writer);
128 128
 		$this->renderCustomScript($writer);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	protected function renderCustomScriptFile($writer)
136 136
 	{
137
-		if(($scriptUrl = $this->getScriptUrl())!=='')
137
+		if(($scriptUrl=$this->getScriptUrl())!=='')
138 138
 			$writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
139 139
 	}
140 140
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRatingList.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	/**
35 35
 	 * @var array list of published rating images.
36 36
 	 */
37
-	private $_ratingImages = array();
37
+	private $_ratingImages=array();
38 38
 
39 39
 	/**
40 40
 	 * Sets the default repeat direction to horizontal.
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function getReadOnly()
52 52
 	{
53
-		return $this->getViewState('ReadOnly',false);
53
+		return $this->getViewState('ReadOnly', false);
54 54
 	}
55 55
 
56 56
 	/**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	public function setReadOnly($value)
60 60
 	{
61
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
61
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
62 62
 	}
63 63
 
64 64
 	/**
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getRating()
108 108
 	{
109
-		$rating = $this->getViewState('Rating', null);
110
-		if ($rating === null)
111
-			return $this->getSelectedIndex()+1;
109
+		$rating=$this->getViewState('Rating', null);
110
+		if($rating===null)
111
+			return $this->getSelectedIndex() + 1;
112 112
 		else
113 113
 			return $rating;
114 114
 	}
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function setRating($value)
120 120
 	{
121
-		$value = TPropertyValue::ensureFloat($value);
121
+		$value=TPropertyValue::ensureFloat($value);
122 122
 		$this->setViewState('Rating', $value, null);
123
-		$index = $this->getRatingIndex($value);
123
+		$index=$this->getRatingIndex($value);
124 124
 		parent::setSelectedIndex($index);
125 125
 	}
126 126
 
127 127
 	public function setSelectedIndex($value)
128 128
 	{
129
-		$this->setRating($value+1);
129
+		$this->setRating($value + 1);
130 130
 		parent::setSelectedIndex($value);
131 131
 	}
132 132
 
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	protected function getRatingIndex($rating)
138 138
 	{
139
-		$interval = $this->getHalfRatingInterval();
140
-		$base = intval($rating)-1;
141
-		$remainder = $rating-$base-1;
142
-		return $remainder > $interval[1] ? $base+1 : $base;
139
+		$interval=$this->getHalfRatingInterval();
140
+		$base=intval($rating) - 1;
141
+		$remainder=$rating - $base - 1;
142
+		return $remainder > $interval[1] ? $base + 1 : $base;
143 143
 	}
144 144
 
145 145
 	/**
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function onSelectedIndexChanged($param)
149 149
 	{
150
-		$value = $this->getRating();
151
-		$value = TPropertyValue::ensureInteger($value);
150
+		$value=$this->getRating();
151
+		$value=TPropertyValue::ensureInteger($value);
152 152
 		$this->setRating($value);
153 153
 		parent::onSelectedIndexChanged($param);
154 154
 	}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 				return $control;
180 180
 		}
181 181
 		throw new TInvalidDataValueException(
182
-			'ratinglist_invalid_caption_id',$id,$this->getID());
182
+			'ratinglist_invalid_caption_id', $id, $this->getID());
183 183
 	}
184 184
 
185 185
 	/**
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
 	 */
247 247
 	protected function getPostBackOptions()
248 248
  	{
249
-		$options = parent::getPostBackOptions();
250
-		$options['AutoPostBack'] = $this->getAutoPostBack();
251
-		$options['ReadOnly'] = $this->getReadOnly();
252
-		$options['Style'] = $this->getRatingStyleCssClass();
253
-		$options['CaptionID'] = $this->getCaptionControlID();
254
-		$options['SelectedIndex'] = $this->getSelectedIndex();
255
-		$options['Rating'] = $this->getRating();
256
-		$options['HalfRating'] = $this->getHalfRatingInterval();
249
+		$options=parent::getPostBackOptions();
250
+		$options['AutoPostBack']=$this->getAutoPostBack();
251
+		$options['ReadOnly']=$this->getReadOnly();
252
+		$options['Style']=$this->getRatingStyleCssClass();
253
+		$options['CaptionID']=$this->getCaptionControlID();
254
+		$options['SelectedIndex']=$this->getSelectedIndex();
255
+		$options['Rating']=$this->getRating();
256
+		$options['HalfRating']=$this->getHalfRatingInterval();
257 257
 		return $options;
258 258
  	}
259 259
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
  	{
283 283
 		parent::onPreRender($param);
284 284
 		$this->publishStyle($this->getRatingStyle());
285
-		$this->_ratingImages = $this->publishImages($this->getRatingStyle());
285
+		$this->_ratingImages=$this->publishImages($this->getRatingStyle());
286 286
  		$this->registerClientScript();
287 287
 	}
288 288
 
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
 	 */
293 293
 	protected function publishStyle($style)
294 294
  	{
295
-		$cs = $this->getPage()->getClientScript();
296
-		$url = $this->getAssetUrl($style.'.css');
295
+		$cs=$this->getPage()->getClientScript();
296
+		$url=$this->getAssetUrl($style.'.css');
297 297
 		if(!$cs->isStyleSheetFileRegistered($url))
298 298
 			$cs->registerStyleSheetFile($url, $url);
299 299
 		return $url;
@@ -306,10 +306,10 @@  discard block
 block discarded – undo
306 306
 	 */
307 307
 	protected function publishImages($style, $fileExt='.gif')
308 308
  	{
309
-		$types = array('blank', 'selected', 'half', 'combined');
310
-		$files = array();
309
+		$types=array('blank', 'selected', 'half', 'combined');
310
+		$files=array();
311 311
 		foreach($types as $type)
312
-			$files[$type] = $this->getAssetUrl("{$style}_{$type}{$fileExt}");
312
+			$files[$type]=$this->getAssetUrl("{$style}_{$type}{$fileExt}");
313 313
 		return $files;
314 314
  	}
315 315
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	 */
329 329
 	protected function getAssetUrl($file='')
330 330
  	{
331
-		$base = $this->getPage()->getClientScript()->getPradoScriptAssetUrl();
331
+		$base=$this->getPage()->getClientScript()->getPradoScriptAssetUrl();
332 332
 		return $base.'/'.self::SCRIPT_PATH.'/'.$file;
333 333
  	}
334 334
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	 */
341 341
 	public function render($writer)
342 342
  	{
343
-		$writer->addAttribute('id',$this->getClientID());
343
+		$writer->addAttribute('id', $this->getClientID());
344 344
 		$this->getPage()->getClientScript()->registerPostBackControl(
345 345
 			$this->getClientClassName(), $this->getPostBackOptions());
346 346
 		parent::render($writer);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataSourceControl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public function onDataSourceChanged($param)
46 46
 	{
47
-		$this->raiseEvent('OnDataSourceChanged',$this,$param);
47
+		$this->raiseEvent('OnDataSourceChanged', $this, $param);
48 48
 	}
49 49
 
50 50
 	public function focus()
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	private $_dataSource;
96 96
 	private $_dataMember;
97 97
 
98
-	public function __construct($dataSource,$dataMember)
98
+	public function __construct($dataSource, $dataMember)
99 99
 	{
100 100
 		if(!is_array($dataSource) && !($dataSource instanceof IDataSource) && !($dataSource instanceof Traversable))
101 101
 			throw new TInvalidDataTypeException('readonlydatasource_datasource_invalid');
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		if($this->_dataSource instanceof IDataSource)
109 109
 			return $this->_dataSource->getView($viewName);
110 110
 		else
111
-			return new TReadOnlyDataSourceView($this,$this->_dataMember,$this->_dataSource);
111
+			return new TReadOnlyDataSourceView($this, $this->_dataMember, $this->_dataSource);
112 112
 	}
113 113
 }
114 114
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TMarkdown.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function processText($text)
53 53
 	{
54
-		$result = Parsedown::instance()->parse($text);
54
+		$result=Parsedown::instance()->parse($text);
55 55
 		return preg_replace_callback(
56 56
 				'/<pre><code class="language-(\w+)">((.|\n)*?)<\\/code><\\/pre>/im',
57 57
 				array($this, 'highlightCode'), $result);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	protected function highlightCode($matches)
66 66
 	{
67
-		$text = html_entity_decode($matches[2],ENT_QUOTES,'UTF-8');
67
+		$text=html_entity_decode($matches[2], ENT_QUOTES, 'UTF-8');
68 68
 		$this->setLanguage($matches[1]);
69 69
 		return parent::processText($text);
70 70
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataSourceView.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 	public function setStartRowIndex($value)
32 32
 	{
33
-		if(($value=TPropertyValue::ensureInteger($value))<0)
33
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
34 34
 			$value=0;
35 35
 		$this->_startRowIndex=$value;
36 36
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function setMaximumRows($value)
44 44
 	{
45
-		if(($value=TPropertyValue::ensureInteger($value))<0)
45
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
46 46
 			$value=0;
47 47
 		$this->_maximumRows=$value;
48 48
 	}
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 	public function setTotalRowCount($value)
66 66
 	{
67
-		if(($value=TPropertyValue::ensureInteger($value))<0)
67
+		if(($value=TPropertyValue::ensureInteger($value)) < 0)
68 68
 			$value=0;
69 69
 		$this->_totalRowCount=$value;
70 70
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	private $_owner;
83 83
 	private $_name;
84 84
 
85
-	public function __construct(IDataSource $owner,$viewName)
85
+	public function __construct(IDataSource $owner, $viewName)
86 86
 	{
87 87
 		$this->_owner=$owner;
88 88
 		$this->_name=$viewName;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @param array|TMap new values
112 112
 	 * @return integer affected rows
113 113
 	 */
114
-	public function update($keys,$values)
114
+	public function update($keys, $values)
115 115
 	{
116 116
 		throw new TNotSupportedException('datasourceview_update_unsupported');
117 117
 	}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
 	public function onDataSourceViewChanged($param)
170 170
 	{
171
-		$this->raiseEvent('OnDataSourceViewChanged',$this,$param);
171
+		$this->raiseEvent('OnDataSourceViewChanged', $this, $param);
172 172
 	}
173 173
 }
174 174
 
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
 {
184 184
 	private $_dataSource=null;
185 185
 
186
-	public function __construct(IDataSource $owner,$viewName,$dataSource)
186
+	public function __construct(IDataSource $owner, $viewName, $dataSource)
187 187
 	{
188
-		parent::__construct($owner,$viewName);
188
+		parent::__construct($owner, $viewName);
189 189
 		if($dataSource===null || is_array($dataSource))
190 190
 			$this->_dataSource=new TMap($dataSource);
191 191
 		else if($dataSource instanceof Traversable)
Please login to merge, or discard this patch.