Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/WebControls/TSlider.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
 	 * Returns the value of the TSlider control.
180 180
 	 * This method is required by {@link IDataRenderer}.
181 181
 	 * It is the same as {@link getValue()}.
182
-	 * @return string the value of the TSlider control.
182
+	 * @return double the value of the TSlider control.
183 183
 	 * @see getValue
184 184
 	 */
185 185
 	public function getData()
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function setDirection($value)
75 75
 	{
76
-		$this->setViewState('Direction', TPropertyValue::ensureEnum($value,'TSliderDirection'),TSliderDirection::Horizontal);
76
+		$this->setViewState('Direction', TPropertyValue::ensureEnum($value, 'TSliderDirection'), TSliderDirection::Horizontal);
77 77
 	}
78 78
 
79 79
 	/**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	public function getCssUrl()
83 83
 	{
84
-		return $this->getViewState('CssUrl','');
84
+		return $this->getViewState('CssUrl', '');
85 85
 	}
86 86
 
87 87
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function setCssUrl($value)
91 91
 	{
92
-		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
92
+		$this->setViewState('CssUrl', TPropertyValue::ensureString($value), '');
93 93
 	}
94 94
 
95 95
 	/**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function getMaxValue()
99 99
 	{
100
-		return $this->getViewState('MaxValue',100.0);
100
+		return $this->getViewState('MaxValue', 100.0);
101 101
 	}
102 102
 
103 103
 	/**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function setMaxValue($value)
107 107
 	{
108
-		$this->setViewState('MaxValue', TPropertyValue::ensureFloat($value),100.0);
108
+		$this->setViewState('MaxValue', TPropertyValue::ensureFloat($value), 100.0);
109 109
 	}
110 110
 
111 111
 	/**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	 */
114 114
 	public function getMinValue()
115 115
 	{
116
-		return $this->getViewState('MinValue',0.0);
116
+		return $this->getViewState('MinValue', 0.0);
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function setMinValue($value)
123 123
 	{
124
-		$this->setViewState('MinValue', TPropertyValue::ensureFloat($value),0.0);
124
+		$this->setViewState('MinValue', TPropertyValue::ensureFloat($value), 0.0);
125 125
 	}
126 126
 
127 127
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	/**
148 148
 	 * @return boolean wether to display a progress indicator or not. Defaults to true.
149 149
 	 */
150
-	public function getProgressIndicator ()
150
+	public function getProgressIndicator()
151 151
 	{
152 152
 		return $this->getViewState('ProgressIndicator', true);
153 153
 	}
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	/**
156 156
 	 * @param boolean wether to display a progress indicator or not. Defaults to true.
157 157
 	 */
158
-	public function setProgressIndicator ($value)
158
+	public function setProgressIndicator($value)
159 159
 	{
160 160
 		$this->setViewState('ProgressIndicator', TPropertyValue::ensureBoolean($value), true);
161 161
 	}
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 */
165 165
 	public function getValue()
166 166
 	{
167
-		return $this->getViewState('Value',0.0);
167
+		return $this->getViewState('Value', 0.0);
168 168
 	}
169 169
 
170 170
 	/**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	public function setValue($value)
174 174
 	{
175
-		$this->setViewState('Value', TPropertyValue::ensureFloat($value),0.0);
175
+		$this->setViewState('Value', TPropertyValue::ensureFloat($value), 0.0);
176 176
 	}
177 177
 
178 178
 	/**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	public function getAutoPostBack()
226 226
 	{
227
-		return $this->getViewState('AutoPostBack',false);
227
+		return $this->getViewState('AutoPostBack', false);
228 228
 	}
229 229
 
230 230
 	/**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function setAutoPostBack($value)
237 237
 	{
238
-		$this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),false);
238
+		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), false);
239 239
 	}
240 240
 
241 241
 	/**
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	 */
281 281
 	public function onValueChanged($param)
282 282
 	{
283
-		$this->raiseEvent('OnValueChanged',$this,$param);
283
+		$this->raiseEvent('OnValueChanged', $this, $param);
284 284
 	}
285 285
 
286 286
 	/**
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
 	 * @param array the input data collection
291 291
 	 * @return boolean whether the data of the component has been changed
292 292
 	 */
293
-	public function loadPostData($key,$values)
293
+	public function loadPostData($key, $values)
294 294
 	{
295
-		$value=(float)$values[$this->getClientID().'_1'];
295
+		$value=(float) $values[$this->getClientID().'_1'];
296 296
 		if($this->getValue()!==$value)
297 297
 		{
298 298
 			$this->setValue($value);
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 	public function getClientSide()
317 317
 	{
318 318
 		if($this->_clientScript===null)
319
-			$this->_clientScript = $this->createClientScript();
319
+			$this->_clientScript=$this->createClientScript();
320 320
 		return $this->_clientScript;
321 321
 	}
322 322
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 	/**
332 332
 	 * @return string the HTML tag name for slider. Defaults to div.
333 333
 	 */
334
-	public function getTagName ()
334
+	public function getTagName()
335 335
 	{
336 336
 		return "div";
337 337
 	}
@@ -343,10 +343,10 @@  discard block
 block discarded – undo
343 343
 	protected function addAttributesToRender($writer)
344 344
 	{
345 345
 		parent::addAttributesToRender($writer);
346
-		$writer->addAttribute('id',$this->getClientID());
347
-		if ($this->getCssClass()==='')
346
+		$writer->addAttribute('id', $this->getClientID());
347
+		if($this->getCssClass()==='')
348 348
 		{
349
-			$class=($this->getDirection()==TSliderDirection::Horizontal)?'HorizontalSlider':'VerticalSlider';
349
+			$class=($this->getDirection()==TSliderDirection::Horizontal) ? 'HorizontalSlider' : 'VerticalSlider';
350 350
 			$writer->addAttribute('class', 'Slider '.$class);
351 351
 		}
352 352
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 		$writer->addAttribute('id', $this->getClientID().'_track');
363 363
 		$writer->renderBeginTag('div');
364 364
 		// Render the 'Progress Indicator'
365
-		if ($this->getProgressIndicator())
365
+		if($this->getProgressIndicator())
366 366
 		{
367 367
 			$writer->addAttribute('class', 'Progress');
368 368
 			$writer->addAttribute('id', $this->getClientID().'_progress');
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 	 * This method is invoked right before the control rendering, if the control is visible.
400 400
 	 * @param mixed event parameter
401 401
 	 */
402
-	public function onPreRender ($param)
402
+	public function onPreRender($param)
403 403
 	{
404 404
 		parent::onPreRender($param);
405 405
 		$this->registerStyleSheet();
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			$url=$manager->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'TSlider');
422 422
 			$url.='/TSlider.css';
423 423
 		}
424
-		$this->getPage()->getClientScript()->registerStyleSheetFile($url,$url);
424
+		$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
425 425
 	}
426 426
 
427 427
 	/**
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
 	protected function registerSliderClientScript()
431 431
 	{
432 432
 		$page=$this->getPage();
433
-		$cs = $page->getClientScript();
433
+		$cs=$page->getClientScript();
434 434
 		$cs->registerPradoScript("slider");
435 435
 		$id=$this->getClientID();
436
-		$cs->registerHiddenField($id.'_1',$this->getValue());
436
+		$cs->registerHiddenField($id.'_1', $this->getValue());
437 437
 		$page->registerRequiresPostData($this);
438
-		$cs->registerPostBackControl($this->getClientClassName(),$this->getSliderOptions());
438
+		$cs->registerPostBackControl($this->getClientClassName(), $this->getSliderOptions());
439 439
 	}
440 440
 
441 441
 	/**
@@ -445,30 +445,30 @@  discard block
 block discarded – undo
445 445
 	protected function getSliderOptions()
446 446
 	{
447 447
 		// PostBack Options :
448
-		$options['ID'] = $this->getClientID();
449
-		$options['EventTarget'] = $this->getUniqueID();
450
-		$options['AutoPostBack'] = $this->getAutoPostBack();
448
+		$options['ID']=$this->getClientID();
449
+		$options['EventTarget']=$this->getUniqueID();
450
+		$options['AutoPostBack']=$this->getAutoPostBack();
451 451
 
452 452
 		// Slider Control options
453 453
 		$minValue=$this->getMinValue();
454 454
 		$maxValue=$this->getMaxValue();
455
-		$options['axis'] = strtolower($this->getDirection());
456
-		$options['maximum'] = $maxValue;
457
-		$options['minimum'] = $minValue;
458
-		$options['range'] = array($minValue, $maxValue);
459
-		$options['sliderValue'] = $this->getValue();
460
-		$options['disabled'] = !$this->getEnabled();
455
+		$options['axis']=strtolower($this->getDirection());
456
+		$options['maximum']=$maxValue;
457
+		$options['minimum']=$minValue;
458
+		$options['range']=array($minValue, $maxValue);
459
+		$options['sliderValue']=$this->getValue();
460
+		$options['disabled']=!$this->getEnabled();
461 461
 		$values=$this->getValues();
462
-		if (!empty($values))
462
+		if(!empty($values))
463 463
 		{
464 464
 			// Values are provided. Check if min/max are present in them
465
-			if (!in_array($minValue, $values)) $values[]=$minValue;
466
-			if (!in_array($maxValue, $values)) $values[]=$maxValue;
465
+			if(!in_array($minValue, $values)) $values[]=$minValue;
466
+			if(!in_array($maxValue, $values)) $values[]=$maxValue;
467 467
 			// Remove all values outsize the range [min..max]
468
-			foreach ($values as $idx=>$value)
468
+			foreach($values as $idx=>$value)
469 469
 			{
470
-				if ($value < $minValue) unset ($values[$idx]);
471
-				if ($value > $maxValue) unset ($values[$idx]);
470
+				if($value < $minValue) unset ($values[$idx]);
471
+				if($value > $maxValue) unset ($values[$idx]);
472 472
 			}
473 473
 		}
474 474
 		else
@@ -476,19 +476,19 @@  discard block
 block discarded – undo
476 476
 			// Values are not provided, generate automatically using stepsize
477 477
 			$step=$this->getStepSize();
478 478
 			// We want at most self::MAX_STEPS values, so, change the step if necessary
479
-			if (($maxValue-$minValue)/$step > self::MAX_STEPS)
479
+			if(($maxValue - $minValue) / $step > self::MAX_STEPS)
480 480
 			{
481
-				$step=($maxValue-$minValue)/self::MAX_STEPS;
481
+				$step=($maxValue - $minValue) / self::MAX_STEPS;
482 482
 			}
483 483
 			$values=array();
484
-			for ($i=$minValue;$i<=$maxValue;$i+=$step)
484
+			for($i=$minValue; $i <= $maxValue; $i+=$step)
485 485
 				$values[]=$i;
486 486
 			// Add max if it's not in the array because of step
487
-			if (!in_array($maxValue, $values)) $values[]=$maxValue;
487
+			if(!in_array($maxValue, $values)) $values[]=$maxValue;
488 488
 		}
489
-		$options['values'] = $values;
489
+		$options['values']=$values;
490 490
 		if($this->_clientScript!==null)
491
-			$options = array_merge($options,$this->_clientScript->getOptions()->toArray());
491
+			$options=array_merge($options, $this->_clientScript->getOptions()->toArray());
492 492
 		return $options;
493 493
 	}
494 494
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@  discard block
 block discarded – undo
189 189
 				return file_put_contents($fileName,file_get_contents($this->_localName))!==false;
190 190
 			else
191 191
 				return false;
192
-		}
193
-		else
192
+		} else
194 193
 			return false;
195 194
 	}
196 195
 
@@ -211,8 +210,7 @@  discard block
 block discarded – undo
211 210
 			$this->_errorCode=$_FILES[$key]['error'];
212 211
 			$this->_localName=$_FILES[$key]['tmp_name'];
213 212
 			return $this->_dataChanged=true;
214
-		}
215
-		else
213
+		} else
216 214
 			return false;
217 215
 	}
218 216
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TStyle.php 3 patches
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	}
230 230
 
231 231
 	/**
232
-	 * @return TDisplayStyle display style
232
+	 * @return string display style
233 233
 	 */
234 234
 	public function getDisplayStyle()
235 235
 	{
@@ -286,6 +286,7 @@  discard block
 block discarded – undo
286 286
 	 * Sets custom style fields from a string.
287 287
 	 * Custom style fields will be overwritten by style fields explicitly defined.
288 288
 	 * @param string the custom style of the control
289
+	 * @param string $value
289 290
 	 */
290 291
 	public function setCustomStyle($value)
291 292
 	{
@@ -305,6 +306,8 @@  discard block
 block discarded – undo
305 306
 	 * Style fields set by this method will overwrite those set by {@link setCustomStyle}.
306 307
 	 * @param string style field name
307 308
 	 * @param string style field value
309
+	 * @param string $name
310
+	 * @param string $value
308 311
 	 */
309 312
 	public function setStyleField($name,$value)
310 313
 	{
@@ -695,7 +698,7 @@  discard block
 block discarded – undo
695 698
 
696 699
 
697 700
 	/**
698
-	 * @return boolean whether the table borders should be collapsed. Defaults to false.
701
+	 * @return boolean|null whether the table borders should be collapsed. Defaults to false.
699 702
 	 */
700 703
 	public function getBorderCollapse()
701 704
 	{
@@ -858,7 +861,7 @@  discard block
 block discarded – undo
858 861
 	}
859 862
 
860 863
 	/**
861
-	 * @return boolean whether the content wraps within the table item. Defaults to true.
864
+	 * @return boolean|null whether the content wraps within the table item. Defaults to true.
862 865
 	 */
863 866
 	public function getWrap()
864 867
 	{
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
 	protected function __getZappableSleepProps(&$exprops)
56 56
 	{
57 57
 		parent::__getZappableSleepProps($exprops);
58
-		if ($this->_fields===array())
59
-			$exprops[] = "\0TStyle\0_fields";
58
+		if($this->_fields===array())
59
+			$exprops[]="\0TStyle\0_fields";
60 60
 		if($this->_font===null)
61
-			$exprops[] = "\0TStyle\0_font";
61
+			$exprops[]="\0TStyle\0_font";
62 62
 		if($this->_class===null)
63
-			$exprops[] = "\0TStyle\0_class";
64
-		if ($this->_customStyle===null)
65
-			$exprops[] = "\0TStyle\0_customStyle";
66
-		if ($this->_displayStyle==='Fixed')
67
-			$exprops[] = "\0TStyle\0_displayStyle";
63
+			$exprops[]="\0TStyle\0_class";
64
+		if($this->_customStyle===null)
65
+			$exprops[]="\0TStyle\0_customStyle";
66
+		if($this->_displayStyle==='Fixed')
67
+			$exprops[]="\0TStyle\0_displayStyle";
68 68
 	}
69 69
 
70 70
 	/**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function __clone()
84 84
 	{
85 85
 		if($this->_font!==null)
86
-			$this->_font = clone($this->_font);
86
+			$this->_font=clone($this->_font);
87 87
 	}
88 88
 
89 89
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function getBackColor()
93 93
 	{
94
-		return isset($this->_fields['background-color'])?$this->_fields['background-color']:'';
94
+		return isset($this->_fields['background-color']) ? $this->_fields['background-color'] : '';
95 95
 	}
96 96
 
97 97
 	/**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function getBorderColor()
112 112
 	{
113
-		return isset($this->_fields['border-color'])?$this->_fields['border-color']:'';
113
+		return isset($this->_fields['border-color']) ? $this->_fields['border-color'] : '';
114 114
 	}
115 115
 
116 116
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function getBorderStyle()
131 131
 	{
132
-		return isset($this->_fields['border-style'])?$this->_fields['border-style']:'';
132
+		return isset($this->_fields['border-style']) ? $this->_fields['border-style'] : '';
133 133
 	}
134 134
 
135 135
 	/**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function getBorderWidth()
151 151
 	{
152
-		return isset($this->_fields['border-width'])?$this->_fields['border-width']:'';
152
+		return isset($this->_fields['border-width']) ? $this->_fields['border-width'] : '';
153 153
 	}
154 154
 
155 155
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getCssClass()
170 170
 	{
171
-		return $this->_class===null?'':$this->_class;
171
+		return $this->_class===null ? '' : $this->_class;
172 172
 	}
173 173
 
174 174
 	/**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function hasFont()
204 204
 	{
205
-		return $this->_font !== null;
205
+		return $this->_font!==null;
206 206
 	}
207 207
 
208 208
 	/**
@@ -210,20 +210,20 @@  discard block
 block discarded – undo
210 210
 	 */
211 211
 	public function setDisplayStyle($value)
212 212
 	{
213
-		$this->_displayStyle = TPropertyValue::ensureEnum($value, 'TDisplayStyle');
213
+		$this->_displayStyle=TPropertyValue::ensureEnum($value, 'TDisplayStyle');
214 214
 		switch($this->_displayStyle)
215 215
 		{
216 216
 			case TDisplayStyle::None:
217
-				$this->_fields['display'] = 'none';
217
+				$this->_fields['display']='none';
218 218
 				break;
219 219
 			case TDisplayStyle::Dynamic:
220
-				$this->_fields['display'] = ''; //remove the display property
220
+				$this->_fields['display']=''; //remove the display property
221 221
 				break;
222 222
 			case TDisplayStyle::Fixed:
223
-				$this->_fields['visibility'] = 'visible';
223
+				$this->_fields['visibility']='visible';
224 224
 				break;
225 225
 			case TDisplayStyle::Hidden:
226
-				$this->_fields['visibility'] = 'hidden';
226
+				$this->_fields['visibility']='hidden';
227 227
 				break;
228 228
 		}
229 229
 	}
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getForeColor()
243 243
 	{
244
-		return isset($this->_fields['color'])?$this->_fields['color']:'';
244
+		return isset($this->_fields['color']) ? $this->_fields['color'] : '';
245 245
 	}
246 246
 
247 247
 	/**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	public function getHeight()
262 262
 	{
263
-		return isset($this->_fields['height'])?$this->_fields['height']:'';
263
+		return isset($this->_fields['height']) ? $this->_fields['height'] : '';
264 264
 	}
265 265
 
266 266
 	/**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function getCustomStyle()
281 281
 	{
282
-		return $this->_customStyle===null?'':$this->_customStyle;
282
+		return $this->_customStyle===null ? '' : $this->_customStyle;
283 283
 	}
284 284
 
285 285
 	/**
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 */
298 298
 	public function getStyleField($name)
299 299
 	{
300
-		return isset($this->_fields[$name])?$this->_fields[$name]:'';
300
+		return isset($this->_fields[$name]) ? $this->_fields[$name] : '';
301 301
 	}
302 302
 
303 303
 	/**
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 * @param string style field name
307 307
 	 * @param string style field value
308 308
 	 */
309
-	public function setStyleField($name,$value)
309
+	public function setStyleField($name, $value)
310 310
 	{
311 311
 		$this->_fields[$name]=$value;
312 312
 	}
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 */
334 334
 	public function getWidth()
335 335
 	{
336
-		return isset($this->_fields['width'])?$this->_fields['width']:'';
336
+		return isset($this->_fields['width']) ? $this->_fields['width'] : '';
337 337
 	}
338 338
 
339 339
 	/**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 	{
366 366
 		if($style instanceof TStyle)
367 367
 		{
368
-			$this->_fields=array_merge($this->_fields,$style->_fields);
368
+			$this->_fields=array_merge($this->_fields, $style->_fields);
369 369
 			if($style->_class!==null)
370 370
 				$this->_class=$style->_class;
371 371
 			if($style->_customStyle!==null)
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	{
386 386
 		if($style instanceof TStyle)
387 387
 		{
388
-			$this->_fields=array_merge($style->_fields,$this->_fields);
388
+			$this->_fields=array_merge($style->_fields, $this->_fields);
389 389
 			if($this->_class===null)
390 390
 				$this->_class=$style->_class;
391 391
 			if($this->_customStyle===null)
@@ -403,18 +403,18 @@  discard block
 block discarded – undo
403 403
 	{
404 404
 		if($this->_customStyle!==null)
405 405
 		{
406
-			foreach(explode(';',$this->_customStyle) as $style)
406
+			foreach(explode(';', $this->_customStyle) as $style)
407 407
 			{
408
-				$arr=explode(':',$style,2);
408
+				$arr=explode(':', $style, 2);
409 409
 				if(isset($arr[1]) && trim($arr[0])!=='')
410
-					$writer->addStyleAttribute(trim($arr[0]),trim($arr[1]));
410
+					$writer->addStyleAttribute(trim($arr[0]), trim($arr[1]));
411 411
 			}
412 412
 		}
413 413
 		$writer->addStyleAttributes($this->_fields);
414 414
 		if($this->_font!==null)
415 415
 			$this->_font->addAttributesToRender($writer);
416 416
 		if($this->_class!==null)
417
-			$writer->addAttribute('class',$this->_class);
417
+			$writer->addAttribute('class', $this->_class);
418 418
 	}
419 419
 
420 420
 	/**
@@ -492,18 +492,18 @@  discard block
 block discarded – undo
492 492
 	protected function __getZappableSleepProps(&$exprops)
493 493
 	{
494 494
 		parent::__getZappableSleepProps($exprops);
495
-		if ($this->_backImageUrl===null)
496
-			$exprops[] = "\0TTableStyle\0_backImageUrl";
497
-		if ($this->_horizontalAlign===null)
498
-			$exprops[] = "\0TTableStyle\0_horizontalAlign";
499
-		if ($this->_cellPadding===null)
500
-			$exprops[] = "\0TTableStyle\0_cellPadding";
501
-		if ($this->_cellSpacing===null)
502
-			$exprops[] = "\0TTableStyle\0_cellSpacing";
503
-		if ($this->_gridLines===null)
504
-			$exprops[] = "\0TTableStyle\0_gridLines";
505
-		if ($this->_borderCollapse===null)
506
-			$exprops[] = "\0TTableStyle\0_borderCollapse";
495
+		if($this->_backImageUrl===null)
496
+			$exprops[]="\0TTableStyle\0_backImageUrl";
497
+		if($this->_horizontalAlign===null)
498
+			$exprops[]="\0TTableStyle\0_horizontalAlign";
499
+		if($this->_cellPadding===null)
500
+			$exprops[]="\0TTableStyle\0_cellPadding";
501
+		if($this->_cellSpacing===null)
502
+			$exprops[]="\0TTableStyle\0_cellSpacing";
503
+		if($this->_gridLines===null)
504
+			$exprops[]="\0TTableStyle\0_gridLines";
505
+		if($this->_borderCollapse===null)
506
+			$exprops[]="\0TTableStyle\0_borderCollapse";
507 507
 	}
508 508
 
509 509
 	/**
@@ -582,25 +582,25 @@  discard block
 block discarded – undo
582 582
 	public function addAttributesToRender($writer)
583 583
 	{
584 584
 		if(($url=trim($this->getBackImageUrl()))!=='')
585
-			$writer->addStyleAttribute('background-image','url('.$url.')');
585
+			$writer->addStyleAttribute('background-image', 'url('.$url.')');
586 586
 
587 587
 		if(($horizontalAlign=$this->getHorizontalAlign())!==THorizontalAlign::NotSet)
588
-			$writer->addStyleAttribute('text-align',strtolower($horizontalAlign));
588
+			$writer->addStyleAttribute('text-align', strtolower($horizontalAlign));
589 589
 
590
-		if(($cellPadding=$this->getCellPadding())>=0)
591
-			$writer->addAttribute('cellpadding',"$cellPadding");
590
+		if(($cellPadding=$this->getCellPadding()) >= 0)
591
+			$writer->addAttribute('cellpadding', "$cellPadding");
592 592
 
593
-		if(($cellSpacing=$this->getCellSpacing())>=0)
594
-			$writer->addAttribute('cellspacing',"$cellSpacing");
593
+		if(($cellSpacing=$this->getCellSpacing()) >= 0)
594
+			$writer->addAttribute('cellspacing', "$cellSpacing");
595 595
 
596 596
 		if($this->getBorderCollapse())
597
-			$writer->addStyleAttribute('border-collapse','collapse');
597
+			$writer->addStyleAttribute('border-collapse', 'collapse');
598 598
 
599 599
 		switch($this->getGridLines())
600 600
 		{
601
-			case TTableGridLines::Horizontal : $writer->addAttribute('rules','rows'); break;
602
-			case TTableGridLines::Vertical : $writer->addAttribute('rules','cols'); break;
603
-			case TTableGridLines::Both : $writer->addAttribute('rules','all'); break;
601
+			case TTableGridLines::Horizontal : $writer->addAttribute('rules', 'rows'); break;
602
+			case TTableGridLines::Vertical : $writer->addAttribute('rules', 'cols'); break;
603
+			case TTableGridLines::Both : $writer->addAttribute('rules', 'all'); break;
604 604
 		}
605 605
 
606 606
 		parent::addAttributesToRender($writer);
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
 	 */
612 612
 	public function getBackImageUrl()
613 613
 	{
614
-		return $this->_backImageUrl===null?'':$this->_backImageUrl;
614
+		return $this->_backImageUrl===null ? '' : $this->_backImageUrl;
615 615
 	}
616 616
 
617 617
 	/**
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 	 */
629 629
 	public function getHorizontalAlign()
630 630
 	{
631
-		return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign;
631
+		return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign;
632 632
 	}
633 633
 
634 634
 	/**
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	 */
638 638
 	public function setHorizontalAlign($value)
639 639
 	{
640
-		$this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign');
640
+		$this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign');
641 641
 	}
642 642
 
643 643
 	/**
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 	 */
646 646
 	public function getCellPadding()
647 647
 	{
648
-		return $this->_cellPadding===null?-1:$this->_cellPadding;
648
+		return $this->_cellPadding===null ?-1 : $this->_cellPadding;
649 649
 	}
650 650
 
651 651
 	/**
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 	 */
655 655
 	public function setCellPadding($value)
656 656
 	{
657
-		if(($this->_cellPadding=TPropertyValue::ensureInteger($value))<-1)
657
+		if(($this->_cellPadding=TPropertyValue::ensureInteger($value)) < -1)
658 658
 			throw new TInvalidDataValueException('tablestyle_cellpadding_invalid');
659 659
 	}
660 660
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 	 */
664 664
 	public function getCellSpacing()
665 665
 	{
666
-		return $this->_cellSpacing===null?-1:$this->_cellSpacing;
666
+		return $this->_cellSpacing===null ?-1 : $this->_cellSpacing;
667 667
 	}
668 668
 
669 669
 	/**
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 	 */
673 673
 	public function setCellSpacing($value)
674 674
 	{
675
-		if(($this->_cellSpacing=TPropertyValue::ensureInteger($value))<-1)
675
+		if(($this->_cellSpacing=TPropertyValue::ensureInteger($value)) < -1)
676 676
 			throw new TInvalidDataValueException('tablestyle_cellspacing_invalid');
677 677
 	}
678 678
 
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 	 */
682 682
 	public function getGridLines()
683 683
 	{
684
-		return $this->_gridLines===null?TTableGridLines::None:$this->_gridLines;
684
+		return $this->_gridLines===null ? TTableGridLines::None : $this->_gridLines;
685 685
 	}
686 686
 
687 687
 	/**
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 	 */
691 691
 	public function setGridLines($value)
692 692
 	{
693
-		$this->_gridLines=TPropertyValue::ensureEnum($value,'TTableGridLines');
693
+		$this->_gridLines=TPropertyValue::ensureEnum($value, 'TTableGridLines');
694 694
 	}
695 695
 
696 696
 
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 	 */
700 700
 	public function getBorderCollapse()
701 701
 	{
702
-		return $this->_borderCollapse===null?false:$this->_borderCollapse;
702
+		return $this->_borderCollapse===null ? false : $this->_borderCollapse;
703 703
 	}
704 704
 
705 705
 	/**
@@ -743,12 +743,12 @@  discard block
 block discarded – undo
743 743
 	protected function __getZappableSleepProps(&$exprops)
744 744
 	{
745 745
 		parent::__getZappableSleepProps($exprops);
746
-		if ($this->_horizontalAlign===null)
747
-			$exprops[] = "\0TTableItemStyle\0_horizontalAlign";
748
-		if ($this->_verticalAlign===null)
749
-			$exprops[] = "\0TTableItemStyle\0_verticalAlign";
750
-		if ($this->_wrap===null)
751
-			$exprops[] = "\0TTableItemStyle\0_wrap";
746
+		if($this->_horizontalAlign===null)
747
+			$exprops[]="\0TTableItemStyle\0_horizontalAlign";
748
+		if($this->_verticalAlign===null)
749
+			$exprops[]="\0TTableItemStyle\0_verticalAlign";
750
+		if($this->_wrap===null)
751
+			$exprops[]="\0TTableItemStyle\0_wrap";
752 752
 	}
753 753
 
754 754
 	/**
@@ -812,13 +812,13 @@  discard block
 block discarded – undo
812 812
 	public function addAttributesToRender($writer)
813 813
 	{
814 814
 		if(!$this->getWrap())
815
-			$writer->addStyleAttribute('white-space','nowrap');
815
+			$writer->addStyleAttribute('white-space', 'nowrap');
816 816
 
817 817
 		if(($horizontalAlign=$this->getHorizontalAlign())!==THorizontalAlign::NotSet)
818
-			$writer->addAttribute('align',strtolower($horizontalAlign));
818
+			$writer->addAttribute('align', strtolower($horizontalAlign));
819 819
 
820 820
 		if(($verticalAlign=$this->getVerticalAlign())!==TVerticalAlign::NotSet)
821
-			$writer->addAttribute('valign',strtolower($verticalAlign));
821
+			$writer->addAttribute('valign', strtolower($verticalAlign));
822 822
 
823 823
 		parent::addAttributesToRender($writer);
824 824
 	}
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
 	 */
829 829
 	public function getHorizontalAlign()
830 830
 	{
831
-		return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign;
831
+		return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign;
832 832
 	}
833 833
 
834 834
 	/**
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 	 */
838 838
 	public function setHorizontalAlign($value)
839 839
 	{
840
-		$this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign');
840
+		$this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign');
841 841
 	}
842 842
 
843 843
 	/**
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 	 */
846 846
 	public function getVerticalAlign()
847 847
 	{
848
-		return $this->_verticalAlign===null?TVerticalAlign::NotSet:$this->_verticalAlign;
848
+		return $this->_verticalAlign===null ? TVerticalAlign::NotSet : $this->_verticalAlign;
849 849
 	}
850 850
 
851 851
 	/**
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
 	 */
855 855
 	public function setVerticalAlign($value)
856 856
 	{
857
-		$this->_verticalAlign=TPropertyValue::ensureEnum($value,'TVerticalAlign');
857
+		$this->_verticalAlign=TPropertyValue::ensureEnum($value, 'TVerticalAlign');
858 858
 	}
859 859
 
860 860
 	/**
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 	 */
863 863
 	public function getWrap()
864 864
 	{
865
-		return $this->_wrap===null?true:$this->_wrap;
865
+		return $this->_wrap===null ? true : $this->_wrap;
866 866
 	}
867 867
 
868 868
 	/**
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	 */
74 74
 	public function __construct($style=null)
75 75
 	{
76
-    parent::__construct();
76
+	parent::__construct();
77 77
 		if($style!==null)
78 78
 			$this->copyFrom($style);
79 79
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTable.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -144,6 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 	/**
146 146
 	 * @param string table caption
147
+	 * @param string $value
147 148
 	 */
148 149
 	public function setCaption($value)
149 150
 	{
@@ -160,6 +161,7 @@  discard block
 block discarded – undo
160 161
 
161 162
 	/**
162 163
 	 * @param TTableCaptionAlign table caption alignment.
164
+	 * @param TTableCaptionAlign $value
163 165
 	 */
164 166
 	public function setCaptionAlign($value)
165 167
 	{
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -306,8 +306,7 @@  discard block
 block discarded – undo
306 306
 					{
307 307
 						if($index===0 && $currentSection===TTableRowSection::Header)
308 308
 							$writer->renderBeginTag('thead');
309
-					}
310
-					else
309
+					} else
311 310
 					{
312 311
 						if($currentSection===TTableRowSection::Header)
313 312
 						{
@@ -318,8 +317,7 @@  discard block
 block discarded – undo
318 317
 							else
319 318
 								$writer->renderBeginTag('tfoot');
320 319
 							$currentSection=$section;
321
-						}
322
-						else if($currentSection===TTableRowSection::Body)
320
+						} else if($currentSection===TTableRowSection::Body)
323 321
 						{
324 322
 							$writer->renderEndTag();
325 323
 							if($section===TTableRowSection::Footer)
@@ -327,16 +325,14 @@  discard block
 block discarded – undo
327 325
 							else
328 326
 								throw new TConfigurationException('table_tablesection_outoforder');
329 327
 							$currentSection=$section;
330
-						}
331
-						else // Footer
328
+						} else // Footer
332 329
 							throw new TConfigurationException('table_tablesection_outoforder');
333 330
 					}
334 331
 					$row->renderControl($writer);
335 332
 					$writer->writeLine();
336 333
 				}
337 334
 				$writer->renderEndTag();
338
-			}
339
-			else
335
+			} else
340 336
 			{
341 337
 				$writer->writeLine();
342 338
 				foreach($this->getControls() as $row)
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 				if(($border=$this->getBorderWidth())==='')
111 111
 					$border=1;
112 112
 				else
113
-					$border=(int)$border;
113
+					$border=(int) $border;
114 114
 			}
115 115
 		}
116
-		$writer->addAttribute('border',"$border");
116
+		$writer->addAttribute('border', "$border");
117 117
 	}
118 118
 
119 119
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function getCaption()
141 141
 	{
142
-		return $this->getViewState('Caption','');
142
+		return $this->getViewState('Caption', '');
143 143
 	}
144 144
 
145 145
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function setCaption($value)
149 149
 	{
150
-		$this->setViewState('Caption',$value,'');
150
+		$this->setViewState('Caption', $value, '');
151 151
 	}
152 152
 
153 153
 	/**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public function getCaptionAlign()
157 157
 	{
158
-		return $this->getViewState('CaptionAlign',TTableCaptionAlign::NotSet);
158
+		return $this->getViewState('CaptionAlign', TTableCaptionAlign::NotSet);
159 159
 	}
160 160
 
161 161
 	/**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	public function setCaptionAlign($value)
165 165
 	{
166
-		$this->setViewState('CaptionAlign',TPropertyValue::ensureEnum($value,'TTableCaptionAlign'),TTableCaptionAlign::NotSet);
166
+		$this->setViewState('CaptionAlign', TPropertyValue::ensureEnum($value, 'TTableCaptionAlign'), TTableCaptionAlign::NotSet);
167 167
 	}
168 168
 
169 169
 	/**
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		if(($caption=$this->getCaption())!=='')
273 273
 		{
274 274
 			if(($align=$this->getCaptionAlign())!==TTableCaptionAlign::NotSet)
275
-				$writer->addAttribute('align',strtolower($align));
275
+				$writer->addAttribute('align', strtolower($align));
276 276
 			$writer->renderBeginTag('caption');
277 277
 			$writer->write($caption);
278 278
 			$writer->renderEndTag();
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 					{
312 312
 						if($currentSection===TTableRowSection::Header)
313 313
 						{
314
-							if($index>0)
314
+							if($index > 0)
315 315
 								$writer->renderEndTag();
316 316
 							if($section===TTableRowSection::Body)
317 317
 								$writer->renderBeginTag('tbody');
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
 	 * @param mixed new item
370 370
 	 * @throws TInvalidDataTypeException if the item to be inserted is not a TTableRow object.
371 371
 	 */
372
-	public function insertAt($index,$item)
372
+	public function insertAt($index, $item)
373 373
 	{
374 374
 		if($item instanceof TTableRow)
375
-			parent::insertAt($index,$item);
375
+			parent::insertAt($index, $item);
376 376
 		else
377 377
 			throw new TInvalidDataTypeException('tablerowcollection_tablerow_required');
378 378
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTabPanel.php 4 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	private $_active=false;
547 547
 
548 548
 	/**
549
-	 * @return the tag name for the view element
549
+	 * @return string tag name for the view element
550 550
 	 */
551 551
 	protected function getTagName()
552 552
 	{
@@ -714,6 +714,7 @@  discard block
 block discarded – undo
714 714
 	/**
715 715
 	 * Finds the index of the tab view whose ID is the same as the one being looked for.
716 716
 	 * @param string the explicit ID of the tab view to be looked for
717
+	 * @param string $id
717 718
 	 * @return integer the index of the tab view found, -1 if not found.
718 719
 	 */
719 720
 	public function findIndexByID($id)
Please login to merge, or discard this patch.
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-     * Returns the index of the active tab view.
85
-     * Note, this property may not return the correct index.
86
-     * To ensure the correctness, call {@link getActiveView()} first.
84
+	 * Returns the index of the active tab view.
85
+	 * Note, this property may not return the correct index.
86
+	 * To ensure the correctness, call {@link getActiveView()} first.
87 87
 	 * @return integer the zero-based index of the active tab view. If -1, it means no active tab view. Default is 0 (the first view is active).
88 88
 	 */
89 89
 	public function getActiveViewIndex()
@@ -100,24 +100,24 @@  discard block
 block discarded – undo
100 100
 		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
101 101
 	}
102 102
 
103
-    /**
104
-     * Returns the ID of the active tab view.
105
-     * Note, this property may not return the correct ID.
106
-     * To ensure the correctness, call {@link getActiveView()} first.
107
-     * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
-     */
109
-    public function getActiveViewID()
110
-    {
103
+	/**
104
+	 * Returns the ID of the active tab view.
105
+	 * Note, this property may not return the correct ID.
106
+	 * To ensure the correctness, call {@link getActiveView()} first.
107
+	 * @return string The ID of the active tab view. Defaults to '', meaning not set.
108
+	 */
109
+	public function getActiveViewID()
110
+	{
111 111
 		return $this->getViewState('ActiveViewID','');
112
-    }
112
+	}
113 113
 
114
-    /**
115
-     * @param string The ID of the active tab view.
116
-     */
117
-    public function setActiveViewID($value)
118
-    {
114
+	/**
115
+	 * @param string The ID of the active tab view.
116
+	 */
117
+	public function setActiveViewID($value)
118
+	{
119 119
 		$this->setViewState('ActiveViewID',$value,'');
120
-    }
120
+	}
121 121
 
122 122
 	/**
123 123
 	 * Returns the currently active view.
@@ -172,63 +172,63 @@  discard block
 block discarded – undo
172 172
 			throw new TInvalidOperationException('tabpanel_view_inexistent');
173 173
 	}
174 174
 
175
-    /**
176
-     * @return bool status of automatic tab switch on hover
177
-     */
178
-    public function getAutoSwitch()
179
-    {
180
-        return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
-    }
182
-
183
-    /**
184
-     * @param bool whether to enable automatic tab switch on hover
185
-     */
186
-    public function setAutoSwitch($value)
187
-    {
188
-        $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
-    }
190
-
191
-
192
-    /**
193
-     * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
-     */
195
-    public function getCssUrl()
196
-    {
197
-        return $this->getViewState('CssUrl','default');
198
-    }
199
-
200
-    /**
201
-     * @param string URL for the CSS file including all relevant CSS class definitions.
202
-     */
203
-    public function setCssUrl($value)
204
-    {
205
-        $this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
-    }
207
-
208
-    /**
209
-     * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
-     */
211
-    public function getCssClass()
212
-    {
213
-    	$cssClass=parent::getCssClass();
214
-    	return $cssClass===''?'tab-panel':$cssClass;
215
-    }
216
-
217
-    /**
218
-     * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
-     */
220
-    public function getViewCssClass()
221
-    {
222
-        return $this->getViewStyle()->getCssClass();
223
-    }
224
-
225
-    /**
226
-     * @param string CSS class for the currently displayed view div.
227
-     */
228
-    public function setViewCssClass($value)
229
-    {
230
-        $this->getViewStyle()->setCssClass($value);
231
-    }
175
+	/**
176
+	 * @return bool status of automatic tab switch on hover
177
+	 */
178
+	public function getAutoSwitch()
179
+	{
180
+		return TPropertyValue::ensureBoolean($this->getViewState('AutoSwitch'));
181
+	}
182
+
183
+	/**
184
+	 * @param bool whether to enable automatic tab switch on hover
185
+	 */
186
+	public function setAutoSwitch($value)
187
+	{
188
+		$this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
189
+	}
190
+
191
+
192
+	/**
193
+	 * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to ''.
194
+	 */
195
+	public function getCssUrl()
196
+	{
197
+		return $this->getViewState('CssUrl','default');
198
+	}
199
+
200
+	/**
201
+	 * @param string URL for the CSS file including all relevant CSS class definitions.
202
+	 */
203
+	public function setCssUrl($value)
204
+	{
205
+		$this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
206
+	}
207
+
208
+	/**
209
+	 * @return string CSS class for the whole tab control div. Defaults to 'tab-panel'.
210
+	 */
211
+	public function getCssClass()
212
+	{
213
+		$cssClass=parent::getCssClass();
214
+		return $cssClass===''?'tab-panel':$cssClass;
215
+	}
216
+
217
+	/**
218
+	 * @return string CSS class for the currently displayed view div. Defaults to 'tab-view'.
219
+	 */
220
+	public function getViewCssClass()
221
+	{
222
+		return $this->getViewStyle()->getCssClass();
223
+	}
224
+
225
+	/**
226
+	 * @param string CSS class for the currently displayed view div.
227
+	 */
228
+	public function setViewCssClass($value)
229
+	{
230
+		$this->getViewStyle()->setCssClass($value);
231
+	}
232 232
 
233 233
 	/**
234 234
 	 * @return TStyle the style for all the view div
@@ -244,21 +244,21 @@  discard block
 block discarded – undo
244 244
 		return $style;
245 245
 	}
246 246
 
247
-    /**
248
-     * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
-     */
250
-    public function getTabCssClass()
251
-    {
252
-        return $this->getTabStyle()->getCssClass();
253
-    }
247
+	/**
248
+	 * @return string CSS class for non-active tabs. Defaults to 'tab-normal'.
249
+	 */
250
+	public function getTabCssClass()
251
+	{
252
+		return $this->getTabStyle()->getCssClass();
253
+	}
254 254
 
255
-    /**
256
-     * @param string CSS class for non-active tabs.
257
-     */
258
-    public function setTabCssClass($value)
259
-    {
260
-        $this->getTabStyle()->setCssClass($value);
261
-    }
255
+	/**
256
+	 * @param string CSS class for non-active tabs.
257
+	 */
258
+	public function setTabCssClass($value)
259
+	{
260
+		$this->getTabStyle()->setCssClass($value);
261
+	}
262 262
 
263 263
 	/**
264 264
 	 * @return TStyle the style for all the inactive tab div
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
 		return $style;
275 275
 	}
276 276
 
277
-    /**
278
-     * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
-     */
280
-    public function getActiveTabCssClass()
281
-    {
282
-        return $this->getActiveTabStyle()->getCssClass();
283
-    }
284
-
285
-    /**
286
-     * @param string CSS class for the active tab.
287
-     */
288
-    public function setActiveTabCssClass($value)
289
-    {
290
-        $this->getActiveTabStyle()->setCssClass($value);
291
-    }
277
+	/**
278
+	 * @return string CSS class for the active tab. Defaults to 'tab-active'.
279
+	 */
280
+	public function getActiveTabCssClass()
281
+	{
282
+		return $this->getActiveTabStyle()->getCssClass();
283
+	}
284
+
285
+	/**
286
+	 * @param string CSS class for the active tab.
287
+	 */
288
+	public function setActiveTabCssClass($value)
289
+	{
290
+		$this->getActiveTabStyle()->setCssClass($value);
291
+	}
292 292
 
293 293
 	/**
294 294
 	 * @return TStyle the style for the active tab div
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,15 +136,13 @@  discard block
 block discarded – undo
136 136
 				$activeView=$views->itemAt($index);
137 137
 			else
138 138
 				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id);
139
-		}
140
-		else if(($index=$this->getActiveViewIndex())>=0)
139
+		} else if(($index=$this->getActiveViewIndex())>=0)
141 140
 		{
142 141
 			if($index<$views->getCount())
143 142
 				$activeView=$views->itemAt($index);
144 143
 			else
145 144
 				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index);
146
-		}
147
-		else
145
+		} else
148 146
 		{
149 147
 			foreach($views as $index=>$view)
150 148
 			{
@@ -320,8 +318,7 @@  discard block
 block discarded – undo
320 318
 				$this->setActiveViewIndex($index);
321 319
 				$this->setActiveViewID($view->getID(false));
322 320
 				$view->setActive(true);
323
-			}
324
-			else
321
+			} else
325 322
 				$v->setActive(false);
326 323
 		}
327 324
 	}
Please login to merge, or discard this patch.
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function getActiveViewIndex()
90 90
 	{
91
-		return $this->getViewState('ActiveViewIndex',0);
91
+		return $this->getViewState('ActiveViewIndex', 0);
92 92
 	}
93 93
 
94 94
 	/**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function setActiveViewIndex($value)
99 99
 	{
100
-		$this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0);
100
+		$this->setViewState('ActiveViewIndex', TPropertyValue::ensureInteger($value), 0);
101 101
 	}
102 102
 
103 103
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function getActiveViewID()
110 110
     {
111
-		return $this->getViewState('ActiveViewID','');
111
+		return $this->getViewState('ActiveViewID', '');
112 112
     }
113 113
 
114 114
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function setActiveViewID($value)
118 118
     {
119
-		$this->setViewState('ActiveViewID',$value,'');
119
+		$this->setViewState('ActiveViewID', $value, '');
120 120
     }
121 121
 
122 122
 	/**
@@ -132,17 +132,17 @@  discard block
 block discarded – undo
132 132
 		$views=$this->getViews();
133 133
 		if(($id=$this->getActiveViewID())!=='')
134 134
 		{
135
-			if(($index=$views->findIndexByID($id))>=0)
135
+			if(($index=$views->findIndexByID($id)) >= 0)
136 136
 				$activeView=$views->itemAt($index);
137 137
 			else
138
-				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id);
138
+				throw new TInvalidDataValueException('tabpanel_activeviewid_invalid', $id);
139 139
 		}
140
-		else if(($index=$this->getActiveViewIndex())>=0)
140
+		else if(($index=$this->getActiveViewIndex()) >= 0)
141 141
 		{
142
-			if($index<$views->getCount())
142
+			if($index < $views->getCount())
143 143
 				$activeView=$views->itemAt($index);
144 144
 			else
145
-				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index);
145
+				throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid', $index);
146 146
 		}
147 147
 		else
148 148
 		{
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 */
167 167
 	public function setActiveView($view)
168 168
 	{
169
-		if($this->getViews()->indexOf($view)>=0)
169
+		if($this->getViews()->indexOf($view) >= 0)
170 170
 			$this->activateView($view);
171 171
 		else
172 172
 			throw new TInvalidOperationException('tabpanel_view_inexistent');
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      */
186 186
     public function setAutoSwitch($value)
187 187
     {
188
-        $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value));
188
+        $this->setViewState('AutoSwitch', TPropertyValue::ensureBoolean($value));
189 189
     }
190 190
 
191 191
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     public function getCssUrl()
196 196
     {
197
-        return $this->getViewState('CssUrl','default');
197
+        return $this->getViewState('CssUrl', 'default');
198 198
     }
199 199
 
200 200
     /**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function setCssUrl($value)
204 204
     {
205
-        $this->setViewState('CssUrl',TPropertyValue::ensureString($value),'');
205
+        $this->setViewState('CssUrl', TPropertyValue::ensureString($value), '');
206 206
     }
207 207
 
208 208
     /**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     public function getCssClass()
212 212
     {
213 213
     	$cssClass=parent::getCssClass();
214
-    	return $cssClass===''?'tab-panel':$cssClass;
214
+    	return $cssClass==='' ? 'tab-panel' : $cssClass;
215 215
     }
216 216
 
217 217
     /**
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function getViewStyle()
237 237
 	{
238
-		if(($style=$this->getViewState('ViewStyle',null))===null)
238
+		if(($style=$this->getViewState('ViewStyle', null))===null)
239 239
 		{
240 240
 			$style=new TStyle;
241 241
 			$style->setCssClass('tab-view');
242
-			$this->setViewState('ViewStyle',$style,null);
242
+			$this->setViewState('ViewStyle', $style, null);
243 243
 		}
244 244
 		return $style;
245 245
 	}
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function getTabStyle()
267 267
 	{
268
-		if(($style=$this->getViewState('TabStyle',null))===null)
268
+		if(($style=$this->getViewState('TabStyle', null))===null)
269 269
 		{
270 270
 			$style=new TStyle;
271 271
 			$style->setCssClass('tab-normal');
272
-			$this->setViewState('TabStyle',$style,null);
272
+			$this->setViewState('TabStyle', $style, null);
273 273
 		}
274 274
 		return $style;
275 275
 	}
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
 	 */
296 296
 	public function getActiveTabStyle()
297 297
 	{
298
-		if(($style=$this->getViewState('ActiveTabStyle',null))===null)
298
+		if(($style=$this->getViewState('ActiveTabStyle', null))===null)
299 299
 		{
300 300
 			$style=new TStyle;
301 301
 			$style->setCssClass('tab-active');
302
-			$this->setViewState('ActiveTabStyle',$style,null);
302
+			$this->setViewState('ActiveTabStyle', $style, null);
303 303
 		}
304 304
 		return $style;
305 305
 	}
@@ -333,11 +333,11 @@  discard block
 block discarded – undo
333 333
 	 * @param array the input data collection
334 334
 	 * @return boolean whether the data of the control has been changed
335 335
 	 */
336
-	public function loadPostData($key,$values)
336
+	public function loadPostData($key, $values)
337 337
 	{
338 338
 		if(($index=$values[$this->getClientID().'_1'])!==null)
339 339
 		{
340
-			$index=(int)$index;
340
+			$index=(int) $index;
341 341
 			$currentIndex=$this->getActiveViewIndex();
342 342
 			if($currentIndex!==$index)
343 343
 			{
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 */
378 378
 	protected function addAttributesToRender($writer)
379 379
 	{
380
-		$writer->addAttribute('id',$this->getClientID());
380
+		$writer->addAttribute('id', $this->getClientID());
381 381
 		$this->setCssClass($this->getCssClass());
382 382
 		parent::addAttributesToRender($writer);
383 383
 	}
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 	public function onPreRender($param)
391 391
 	{
392 392
 		parent::onPreRender($param);
393
-		$this->getActiveView();  // determine the active view
393
+		$this->getActiveView(); // determine the active view
394 394
 		$this->registerStyleSheet();
395 395
 
396 396
 		$page=$this->getPage();
@@ -405,17 +405,17 @@  discard block
 block discarded – undo
405 405
 	 */
406 406
 	protected function registerStyleSheet()
407 407
 	{
408
-		$url = $this->getCssUrl();
408
+		$url=$this->getCssUrl();
409 409
 
410
-		if($url === '') {
410
+		if($url==='') {
411 411
 			return;
412 412
 		}
413 413
 
414
-		if($url === 'default') {
415
-			$url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
414
+		if($url==='default') {
415
+			$url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css');
416 416
 		}
417 417
 
418
-		if($url !== '') {
418
+		if($url!=='') {
419 419
 			$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
420 420
 		}
421 421
 	}
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 		$code="new $className($options);";
434 434
 		$cs->registerEndScript("prado:$id", $code);
435 435
 		// ensure an item is always active and visible
436
-		$index = $this->getActiveViewIndex();
436
+		$index=$this->getActiveViewIndex();
437 437
 		if(!$this->getViews()->itemAt($index)->Visible)
438 438
 			$index=0;
439 439
 		$cs->registerHiddenField($id.'_1', $index);
@@ -454,19 +454,19 @@  discard block
 block discarded – undo
454 454
 	 */
455 455
 	protected function getClientOptions()
456 456
 	{
457
-		$options['ID'] = $this->getClientID();
458
-		$options['ActiveCssClass'] = $this->getActiveTabCssClass();
459
-		$options['NormalCssClass'] = $this->getTabCssClass();
460
-		$viewIDs = array();
461
-		$viewVis = array();
457
+		$options['ID']=$this->getClientID();
458
+		$options['ActiveCssClass']=$this->getActiveTabCssClass();
459
+		$options['NormalCssClass']=$this->getTabCssClass();
460
+		$viewIDs=array();
461
+		$viewVis=array();
462 462
 		foreach($this->getViews() as $view)
463 463
 		{
464
-			$viewIDs[] = $view->getClientID();
465
-			$viewVis[] = $view->getVisible();
464
+			$viewIDs[]=$view->getClientID();
465
+			$viewVis[]=$view->getVisible();
466 466
 		}
467
-		$options['Views'] = $viewIDs;
468
-		$options['ViewsVis'] = $viewVis;
469
-		$options['AutoSwitch'] = $this->getAutoSwitch();
467
+		$options['Views']=$viewIDs;
468
+		$options['ViewsVis']=$viewVis;
469
+		$options['AutoSwitch']=$this->getAutoSwitch();
470 470
 
471 471
 		return $options;
472 472
 	}
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 	public function renderContents($writer)
502 502
 	{
503 503
 		$views=$this->getViews();
504
-		if($views->getCount()>0)
504
+		if($views->getCount() > 0)
505 505
 		{
506 506
 			$writer->writeLine();
507 507
 			// render tab bar
@@ -560,13 +560,13 @@  discard block
 block discarded – undo
560 560
 	protected function addAttributesToRender($writer)
561 561
 	{
562 562
 		if(!$this->getActive() && $this->getPage()->getClientSupportsJavaScript())
563
-			$this->getStyle()->setStyleField('display','none');
563
+			$this->getStyle()->setStyleField('display', 'none');
564 564
 
565 565
 		$this->getStyle()->mergeWith($this->getParent()->getViewStyle());
566 566
 
567 567
 		parent::addAttributesToRender($writer);
568 568
 
569
-		$writer->addAttribute('id',$this->getClientID());
569
+		$writer->addAttribute('id', $this->getClientID());
570 570
 	}
571 571
 
572 572
 	/**
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 	 */
575 575
 	public function getCaption()
576 576
 	{
577
-		return $this->getViewState('Caption','');
577
+		return $this->getViewState('Caption', '');
578 578
 	}
579 579
 
580 580
 	/**
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 	 */
583 583
 	public function setCaption($value)
584 584
 	{
585
-		$this->setViewState('Caption',TPropertyValue::ensureString($value),'');
585
+		$this->setViewState('Caption', TPropertyValue::ensureString($value), '');
586 586
 	}
587 587
 
588 588
 	/**
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 	 */
591 591
 	public function getNavigateUrl()
592 592
 	{
593
-		return $this->getViewState('NavigateUrl','');
593
+		return $this->getViewState('NavigateUrl', '');
594 594
 	}
595 595
 
596 596
 	/**
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 	 */
601 601
 	public function setNavigateUrl($value)
602 602
 	{
603
-		$this->setViewState('NavigateUrl',TPropertyValue::ensureString($value),'');
603
+		$this->setViewState('NavigateUrl', TPropertyValue::ensureString($value), '');
604 604
 	}
605 605
 
606 606
 	/**
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	 */
609 609
 	public function getText()
610 610
 	{
611
-		return $this->getViewState('Text','');
611
+		return $this->getViewState('Text', '');
612 612
 	}
613 613
 
614 614
 	/**
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 	 */
619 619
 	public function setText($value)
620 620
 	{
621
-		$this->setViewState('Text',TPropertyValue::ensureString($value),'');
621
+		$this->setViewState('Text', TPropertyValue::ensureString($value), '');
622 622
 	}
623 623
 
624 624
 	/**
@@ -657,9 +657,9 @@  discard block
 block discarded – undo
657 657
 	{
658 658
 		if($this->getVisible(false) && $this->getPage()->getClientSupportsJavaScript())
659 659
 		{
660
-			$writer->addAttribute('id',$this->getClientID().'_0');
660
+			$writer->addAttribute('id', $this->getClientID().'_0');
661 661
 
662
-			$style=$this->getActive()?$this->getParent()->getActiveTabStyle():$this->getParent()->getTabStyle();
662
+			$style=$this->getActive() ? $this->getParent()->getActiveTabStyle() : $this->getParent()->getTabStyle();
663 663
 			$style->addAttributesToRender($writer);
664 664
 
665 665
 			$writer->renderBeginTag($this->getTagName());
@@ -703,10 +703,10 @@  discard block
 block discarded – undo
703 703
 	 * @param mixed new item
704 704
 	 * @throws TInvalidDataTypeException if the item to be inserted is not a {@link TTabView} object.
705 705
 	 */
706
-	public function insertAt($index,$item)
706
+	public function insertAt($index, $item)
707 707
 	{
708 708
 		if($item instanceof TTabView)
709
-			parent::insertAt($index,$item);
709
+			parent::insertAt($index, $item);
710 710
 		else
711 711
 			throw new TInvalidDataTypeException('tabviewcollection_tabview_required');
712 712
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTemplateColumn.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	/**
121
-	 * @return ITemplate the item template
121
+	 * @return string the item template
122 122
 	 */
123 123
 	public function getItemTemplate()
124 124
 	{
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -197,8 +197,7 @@  discard block
 block discarded – undo
197 197
 					$classPath=$this->getItemRenderer();
198 198
 					$template=$this->_itemTemplate;
199 199
 				}
200
-			}
201
-			else
200
+			} else
202 201
 			{
203 202
 				$template=$this->_itemTemplate;
204 203
 				$classPath=$this->getItemRenderer();
@@ -214,13 +213,11 @@  discard block
 block discarded – undo
214 213
 				}
215 214
 				if($control instanceof IDataRenderer)
216 215
 					$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
217
-			}
218
-			else if($template!==null)
216
+			} else if($template!==null)
219 217
 				$template->instantiateIn($cell);
220 218
 			else if($itemType!==TListItemType::EditItem)
221 219
 				$cell->setText('&nbsp;');
222
-		}
223
-		else if($itemType===TListItemType::Header)
220
+		} else if($itemType===TListItemType::Header)
224 221
 		{
225 222
 			if(($classPath=$this->getHeaderRenderer())!=='')
226 223
 				$this->initializeHeaderCell($cell,$columnIndex);
@@ -228,8 +225,7 @@  discard block
 block discarded – undo
228 225
 				$this->_headerTemplate->instantiateIn($cell);
229 226
 			else
230 227
 				$this->initializeHeaderCell($cell,$columnIndex);
231
-		}
232
-		else if($itemType===TListItemType::Footer)
228
+		} else if($itemType===TListItemType::Footer)
233 229
 		{
234 230
 			if(($classPath=$this->getFooterRenderer())!=='')
235 231
 				$this->initializeFooterCell($cell,$columnIndex);
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function getItemRenderer()
55 55
 	{
56
-		return $this->getViewState('ItemRenderer','');
56
+		return $this->getViewState('ItemRenderer', '');
57 57
 	}
58 58
 
59 59
 	/**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function setItemRenderer($value)
71 71
 	{
72
-		$this->setViewState('ItemRenderer',$value,'');
72
+		$this->setViewState('ItemRenderer', $value, '');
73 73
 	}
74 74
 
75 75
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function getEditItemRenderer()
80 80
 	{
81
-		return $this->getViewState('EditItemRenderer','');
81
+		return $this->getViewState('EditItemRenderer', '');
82 82
 	}
83 83
 
84 84
 	/**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function setEditItemRenderer($value)
96 96
 	{
97
-		$this->setViewState('EditItemRenderer',$value,'');
97
+		$this->setViewState('EditItemRenderer', $value, '');
98 98
 	}
99 99
 
100 100
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		if($value instanceof ITemplate || $value===null)
115 115
 			$this->_editItemTemplate=$value;
116 116
 		else
117
-			throw new TInvalidDataTypeException('templatecolumn_template_required','EditItemTemplate');
117
+			throw new TInvalidDataTypeException('templatecolumn_template_required', 'EditItemTemplate');
118 118
 	}
119 119
 
120 120
 	/**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		if($value instanceof ITemplate || $value===null)
135 135
 			$this->_itemTemplate=$value;
136 136
 		else
137
-			throw new TInvalidDataTypeException('templatecolumn_template_required','ItemTemplate');
137
+			throw new TInvalidDataTypeException('templatecolumn_template_required', 'ItemTemplate');
138 138
 	}
139 139
 
140 140
 	/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		if($value instanceof ITemplate || $value===null)
155 155
 			$this->_headerTemplate=$value;
156 156
 		else
157
-			throw new TInvalidDataTypeException('templatecolumn_template_required','HeaderTemplate');
157
+			throw new TInvalidDataTypeException('templatecolumn_template_required', 'HeaderTemplate');
158 158
 	}
159 159
 
160 160
 	/**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		if($value instanceof ITemplate || $value===null)
175 175
 			$this->_footerTemplate=$value;
176 176
 		else
177
-			throw new TInvalidDataTypeException('templatecolumn_template_required','FooterTemplate');
177
+			throw new TInvalidDataTypeException('templatecolumn_template_required', 'FooterTemplate');
178 178
 	}
179 179
 
180 180
 	/**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	 * @param integer the index to the Columns property that the cell resides in.
187 187
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
188 188
 	 */
189
-	public function initializeCell($cell,$columnIndex,$itemType)
189
+	public function initializeCell($cell, $columnIndex, $itemType)
190 190
 	{
191 191
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
192 192
 		{
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 					$control->setItemType($itemType);
214 214
 				}
215 215
 				if($control instanceof IDataRenderer)
216
-					$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
216
+					$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
217 217
 			}
218 218
 			else if($template!==null)
219 219
 				$template->instantiateIn($cell);
@@ -223,20 +223,20 @@  discard block
 block discarded – undo
223 223
 		else if($itemType===TListItemType::Header)
224 224
 		{
225 225
 			if(($classPath=$this->getHeaderRenderer())!=='')
226
-				$this->initializeHeaderCell($cell,$columnIndex);
226
+				$this->initializeHeaderCell($cell, $columnIndex);
227 227
 			else if($this->_headerTemplate!==null)
228 228
 				$this->_headerTemplate->instantiateIn($cell);
229 229
 			else
230
-				$this->initializeHeaderCell($cell,$columnIndex);
230
+				$this->initializeHeaderCell($cell, $columnIndex);
231 231
 		}
232 232
 		else if($itemType===TListItemType::Footer)
233 233
 		{
234 234
 			if(($classPath=$this->getFooterRenderer())!=='')
235
-				$this->initializeFooterCell($cell,$columnIndex);
235
+				$this->initializeFooterCell($cell, $columnIndex);
236 236
 			else if($this->_footerTemplate!==null)
237 237
 				$this->_footerTemplate->instantiateIn($cell);
238 238
 			else
239
-				$this->initializeFooterCell($cell,$columnIndex);
239
+				$this->initializeFooterCell($cell, $columnIndex);
240 240
 		}
241 241
 	}
242 242
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * This method is invoked when datagrid performs databinding.
246 246
 	 * It populates the content of the cell with the relevant data from data source.
247 247
 	 */
248
-	public function dataBindColumn($sender,$param)
248
+	public function dataBindColumn($sender, $param)
249 249
 	{
250 250
 		$item=$sender->getNamingContainer();
251 251
 		$sender->setData($item->getData());
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTextBox.php 4 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	/**
238 238
 	 * Returns the value to be validated.
239 239
 	 * This methid is required by IValidatable interface.
240
-	 * @return mixed the value of the property to be validated.
240
+	 * @return string the value of the property to be validated.
241 241
 	 */
242 242
 	public function getValidationPropertyValue()
243 243
 	{
@@ -342,6 +342,7 @@  discard block
 block discarded – undo
342 342
 	 * An automatic postback to the server will occur whenever the user
343 343
 	 * modifies the text in the TTextBox control and then tabs out of the component.
344 344
 	 * @param boolean the value indicating if postback automatically
345
+	 * @param boolean $value
345 346
 	 */
346 347
 	public function setAutoPostBack($value)
347 348
 	{
@@ -425,6 +426,7 @@  discard block
 block discarded – undo
425 426
 
426 427
 	/**
427 428
 	 * @param boolean whether the textbox is read only
429
+	 * @param boolean $value
428 430
 	 */
429 431
 	public function setReadOnly($value)
430 432
 	{
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -251,14 +251,14 @@  discard block
 block discarded – undo
251 251
 	 */
252 252
 	public function getIsValid()
253 253
 	{
254
-	    return $this->_isValid;
254
+		return $this->_isValid;
255 255
 	}
256 256
 	/**
257 257
 	 * @param bool wether this control is valid.
258 258
 	 */
259 259
 	public function setIsValid($value)
260 260
 	{
261
-	    $this->_isValid=TPropertyValue::ensureBoolean($value);
261
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
262 262
 	}
263 263
 
264 264
 	/**
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
 
330 330
 	/**
331 331
 	 * @return boolean a value indicating whether an automatic postback to the server
332
-     * will occur whenever the user modifies the text in the TTextBox control and
333
-     * then tabs out of the component. Defaults to false.
332
+	 * will occur whenever the user modifies the text in the TTextBox control and
333
+	 * then tabs out of the component. Defaults to false.
334 334
 	 */
335 335
 	public function getAutoPostBack()
336 336
 	{
Please login to merge, or discard this patch.
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	protected function getTagName()
76 76
 	{
77
-		return ($this->getTextMode()==='MultiLine')?'textarea':'input';
77
+		return ($this->getTextMode()==='MultiLine') ? 'textarea' : 'input';
78 78
 	}
79 79
 
80 80
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function getEnableClientScript()
84 84
 	{
85
-		return $this->getViewState('EnableClientScript',true);
85
+		return $this->getViewState('EnableClientScript', true);
86 86
 	}
87 87
 
88 88
 	/**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function setEnableClientScript($value)
92 92
 	{
93
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
93
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
94 94
 	}
95 95
 
96 96
 	/**
@@ -103,106 +103,106 @@  discard block
 block discarded – undo
103 103
 		$page=$this->getPage();
104 104
 		$page->ensureRenderInForm($this);
105 105
 		if(($uid=$this->getUniqueID())!=='')
106
-			$writer->addAttribute('name',$uid);
106
+			$writer->addAttribute('name', $uid);
107 107
 		if(($textMode=$this->getTextMode())===TTextBoxMode::MultiLine)
108 108
 		{
109
-			if(($rows=$this->getRows())<=0)
109
+			if(($rows=$this->getRows()) <= 0)
110 110
 				$rows=self::DEFAULT_ROWS;
111
-			if(($cols=$this->getColumns())<=0)
111
+			if(($cols=$this->getColumns()) <= 0)
112 112
 				$cols=self::DEFAULT_COLUMNS;
113
-			$writer->addAttribute('rows',"$rows");
114
-			$writer->addAttribute('cols',"$cols");
113
+			$writer->addAttribute('rows', "$rows");
114
+			$writer->addAttribute('cols', "$cols");
115 115
 			if(!$this->getWrap())
116
-				$writer->addAttribute('wrap','off');
116
+				$writer->addAttribute('wrap', 'off');
117 117
 		}
118 118
 		else
119 119
 		{
120 120
 			switch($textMode)
121 121
 			{
122 122
 				case TTextBoxMode::Password:
123
-					$writer->addAttribute('type','password');
123
+					$writer->addAttribute('type', 'password');
124 124
 					break;
125 125
 				case TTextBoxMode::Color:
126
-					$writer->addAttribute('type','color');
126
+					$writer->addAttribute('type', 'color');
127 127
 					break;
128 128
 				case TTextBoxMode::Date:
129
-					$writer->addAttribute('type','date');
129
+					$writer->addAttribute('type', 'date');
130 130
 					break;
131 131
 				case TTextBoxMode::Datetime:
132
-					$writer->addAttribute('type','datetime');
132
+					$writer->addAttribute('type', 'datetime');
133 133
 					break;
134 134
 				case TTextBoxMode::DatetimeLocal:
135
-					$writer->addAttribute('type','datetime-local');
135
+					$writer->addAttribute('type', 'datetime-local');
136 136
 					break;
137 137
 				case TTextBoxMode::Email:
138
-					$writer->addAttribute('type','email');
138
+					$writer->addAttribute('type', 'email');
139 139
 					break;
140 140
 				case TTextBoxMode::Month:
141
-					$writer->addAttribute('type','month');
141
+					$writer->addAttribute('type', 'month');
142 142
 					break;
143 143
 				case TTextBoxMode::Number:
144
-					$writer->addAttribute('type','number');
144
+					$writer->addAttribute('type', 'number');
145 145
 					break;
146 146
 				case TTextBoxMode::Range:
147
-					$writer->addAttribute('type','range');
147
+					$writer->addAttribute('type', 'range');
148 148
 					break;
149 149
 				case TTextBoxMode::Search:
150
-					$writer->addAttribute('type','search');
150
+					$writer->addAttribute('type', 'search');
151 151
 					break;
152 152
 				case TTextBoxMode::Tel:
153
-					$writer->addAttribute('type','tel');
153
+					$writer->addAttribute('type', 'tel');
154 154
 					break;
155 155
 				case TTextBoxMode::Time:
156
-					$writer->addAttribute('type','time');
156
+					$writer->addAttribute('type', 'time');
157 157
 					break;
158 158
 				case TTextBoxMode::Url:
159
-					$writer->addAttribute('type','url');
159
+					$writer->addAttribute('type', 'url');
160 160
 					break;
161 161
 				case TTextBoxMode::Week:
162
-					$writer->addAttribute('type','week');
162
+					$writer->addAttribute('type', 'week');
163 163
 					break;
164 164
 				case TTextBoxMode::SingleLine:
165 165
 				default:
166
-					$writer->addAttribute('type','text');
166
+					$writer->addAttribute('type', 'text');
167 167
 					break;
168 168
 			}
169 169
 
170
-			if(($text=$this->getText())!=='' && ($textMode !== TTextBoxMode::Password || $this->getPersistPassword()))
171
-				$writer->addAttribute('value',$text);					
170
+			if(($text=$this->getText())!=='' && ($textMode!==TTextBoxMode::Password || $this->getPersistPassword()))
171
+				$writer->addAttribute('value', $text);					
172 172
 
173 173
 			if(($act=$this->getAutoCompleteType())!=='None')
174 174
 			{
175 175
 				if($act==='Disabled')
176
-					$writer->addAttribute('autocomplete','off');
176
+					$writer->addAttribute('autocomplete', 'off');
177 177
 				else if($act==='Search')
178
-					$writer->addAttribute('vcard_name','search');
178
+					$writer->addAttribute('vcard_name', 'search');
179 179
 				else if($act==='HomeCountryRegion')
180
-					$writer->addAttribute('vcard_name','HomeCountry');
180
+					$writer->addAttribute('vcard_name', 'HomeCountry');
181 181
 				else if($act==='BusinessCountryRegion')
182
-					$writer->addAttribute('vcard_name','BusinessCountry');
182
+					$writer->addAttribute('vcard_name', 'BusinessCountry');
183 183
 				else
184 184
 				{
185
-					if(strpos($act,'Business')===0)
186
-						$act='Business'.'.'.substr($act,8);
187
-					else if(strpos($act,'Home')===0)
188
-						$act='Home'.'.'.substr($act,4);
189
-					$writer->addAttribute('vcard_name','vCard.'.$act);
185
+					if(strpos($act, 'Business')===0)
186
+						$act='Business'.'.'.substr($act, 8);
187
+					else if(strpos($act, 'Home')===0)
188
+						$act='Home'.'.'.substr($act, 4);
189
+					$writer->addAttribute('vcard_name', 'vCard.'.$act);
190 190
 				}
191 191
 			}
192 192
 
193
-			if(($cols=$this->getColumns())>0)
194
-				$writer->addAttribute('size',"$cols");
195
-			if(($maxLength=$this->getMaxLength())>0)
196
-				$writer->addAttribute('maxlength',"$maxLength");
193
+			if(($cols=$this->getColumns()) > 0)
194
+				$writer->addAttribute('size', "$cols");
195
+			if(($maxLength=$this->getMaxLength()) > 0)
196
+				$writer->addAttribute('maxlength', "$maxLength");
197 197
 		}
198 198
 		if($this->getReadOnly())
199
-			$writer->addAttribute('readonly','readonly');
199
+			$writer->addAttribute('readonly', 'readonly');
200 200
 		$isEnabled=$this->getEnabled(true);
201 201
 		if(!$isEnabled && $this->getEnabled())  // in this case parent will not render 'disabled'
202
-			$writer->addAttribute('disabled','disabled');
202
+			$writer->addAttribute('disabled', 'disabled');
203 203
 		if($isEnabled
204 204
 			&& $this->getEnableClientScript()
205
-			&& ( $this->getAutoPostBack() || $textMode===TTextBoxMode::SingleLine)
205
+			&& ($this->getAutoPostBack() || $textMode===TTextBoxMode::SingleLine)
206 206
 			&& $page->getClientSupportsJavaScript())
207 207
 		{
208 208
 			$this->renderClientControlScript($writer);
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	protected function renderClientControlScript($writer)
217 217
 	{
218
-		$writer->addAttribute('id',$this->getClientID());
219
-		$cs = $this->getPage()->getClientScript();
220
-		$cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
218
+		$writer->addAttribute('id', $this->getClientID());
219
+		$cs=$this->getPage()->getClientScript();
220
+		$cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions());
221 221
 	}
222 222
 
223 223
 	/**
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	protected function getPostBackOptions()
238 238
 	{
239
-		$options['ID'] = $this->getClientID();
240
-		$options['EventTarget'] = $this->getUniqueID();
241
-		$options['AutoPostBack'] = $this->getAutoPostBack();
242
-		$options['CausesValidation'] = $this->getCausesValidation();
243
-		$options['ValidationGroup'] = $this->getValidationGroup();
244
-		$options['TextMode'] = $this->getTextMode();
239
+		$options['ID']=$this->getClientID();
240
+		$options['EventTarget']=$this->getUniqueID();
241
+		$options['AutoPostBack']=$this->getAutoPostBack();
242
+		$options['CausesValidation']=$this->getCausesValidation();
243
+		$options['ValidationGroup']=$this->getValidationGroup();
244
+		$options['TextMode']=$this->getTextMode();
245 245
 		return $options;
246 246
 	}
247 247
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	 * @param array the input data collection
253 253
 	 * @return boolean whether the data of the component has been changed
254 254
 	 */
255
-	public function loadPostData($key,$values)
255
+	public function loadPostData($key, $values)
256 256
 	{
257 257
 		$value=$values[$key];
258 258
 		if($this->getAutoTrim())
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 	 */
314 314
 	public function onTextChanged($param)
315 315
 	{
316
-		$this->raiseEvent('OnTextChanged',$this,$param);
316
+		$this->raiseEvent('OnTextChanged', $this, $param);
317 317
 	}
318 318
 
319 319
 	/**
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	 */
358 358
 	public function getAutoCompleteType()
359 359
 	{
360
-		return $this->getViewState('AutoCompleteType',TTextBoxAutoCompleteType::None);
360
+		return $this->getViewState('AutoCompleteType', TTextBoxAutoCompleteType::None);
361 361
 	}
362 362
 
363 363
 	/**
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 	 */
367 367
 	public function setAutoCompleteType($value)
368 368
 	{
369
-		$this->setViewState('AutoCompleteType',TPropertyValue::ensureEnum($value,'TTextBoxAutoCompleteType'),TTextBoxAutoCompleteType::None);
369
+		$this->setViewState('AutoCompleteType', TPropertyValue::ensureEnum($value, 'TTextBoxAutoCompleteType'), TTextBoxAutoCompleteType::None);
370 370
 	}
371 371
 
372 372
 	/**
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	 */
377 377
 	public function getAutoPostBack()
378 378
 	{
379
-		return $this->getViewState('AutoPostBack',false);
379
+		return $this->getViewState('AutoPostBack', false);
380 380
 	}
381 381
 
382 382
 	/**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	 */
388 388
 	public function setAutoPostBack($value)
389 389
 	{
390
-		$this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),false);
390
+		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), false);
391 391
 	}
392 392
 
393 393
 	/**
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 	 */
396 396
 	public function getAutoTrim()
397 397
 	{
398
-		return $this->getViewState('AutoTrim',false);
398
+		return $this->getViewState('AutoTrim', false);
399 399
 	}
400 400
 
401 401
 	/**
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	 */
405 405
 	public function setAutoTrim($value)
406 406
 	{
407
-		$this->setViewState('AutoTrim',TPropertyValue::ensureBoolean($value),false);
407
+		$this->setViewState('AutoTrim', TPropertyValue::ensureBoolean($value), false);
408 408
 	}
409 409
 
410 410
 	/**
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 */
413 413
 	public function getCausesValidation()
414 414
 	{
415
-		return $this->getViewState('CausesValidation',true);
415
+		return $this->getViewState('CausesValidation', true);
416 416
 	}
417 417
 
418 418
 	/**
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 	 */
421 421
 	public function setCausesValidation($value)
422 422
 	{
423
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
423
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
424 424
 	}
425 425
 
426 426
 	/**
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 	 */
429 429
 	public function getColumns()
430 430
 	{
431
-		return $this->getViewState('Columns',0);
431
+		return $this->getViewState('Columns', 0);
432 432
 	}
433 433
 
434 434
 	/**
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	 */
438 438
 	public function setColumns($value)
439 439
 	{
440
-		$this->setViewState('Columns',TPropertyValue::ensureInteger($value),0);
440
+		$this->setViewState('Columns', TPropertyValue::ensureInteger($value), 0);
441 441
 	}
442 442
 
443 443
 	/**
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 	 */
446 446
 	public function getMaxLength()
447 447
 	{
448
-		return $this->getViewState('MaxLength',0);
448
+		return $this->getViewState('MaxLength', 0);
449 449
 	}
450 450
 
451 451
 	/**
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 	 */
455 455
 	public function setMaxLength($value)
456 456
 	{
457
-		$this->setViewState('MaxLength',TPropertyValue::ensureInteger($value),0);
457
+		$this->setViewState('MaxLength', TPropertyValue::ensureInteger($value), 0);
458 458
 	}
459 459
 
460 460
 	/**
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 	 */
463 463
 	public function getReadOnly()
464 464
 	{
465
-		return $this->getViewState('ReadOnly',false);
465
+		return $this->getViewState('ReadOnly', false);
466 466
 	}
467 467
 
468 468
 	/**
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 	 */
471 471
 	public function setReadOnly($value)
472 472
 	{
473
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
473
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
474 474
 	}
475 475
 
476 476
 	/**
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 	 */
479 479
 	public function getRows()
480 480
 	{
481
-		return $this->getViewState('Rows',self::DEFAULT_ROWS);
481
+		return $this->getViewState('Rows', self::DEFAULT_ROWS);
482 482
 	}
483 483
 
484 484
 	/**
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 	 */
488 488
 	public function setRows($value)
489 489
 	{
490
-		$this->setViewState('Rows',TPropertyValue::ensureInteger($value),self::DEFAULT_ROWS);
490
+		$this->setViewState('Rows', TPropertyValue::ensureInteger($value), self::DEFAULT_ROWS);
491 491
 	}
492 492
 
493 493
 	/**
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 	 */
496 496
 	public function getPersistPassword()
497 497
 	{
498
-		return $this->getViewState('PersistPassword',false);
498
+		return $this->getViewState('PersistPassword', false);
499 499
 	}
500 500
 
501 501
 	/**
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 */
504 504
 	public function setPersistPassword($value)
505 505
 	{
506
-		$this->setViewState('PersistPassword',TPropertyValue::ensureBoolean($value),false);
506
+		$this->setViewState('PersistPassword', TPropertyValue::ensureBoolean($value), false);
507 507
 	}
508 508
 
509 509
 	/**
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 	 */
512 512
 	public function getText()
513 513
 	{
514
-		return $this->getViewState('Text','');
514
+		return $this->getViewState('Text', '');
515 515
 	}
516 516
 
517 517
 	/**
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 	 */
521 521
 	public function setText($value)
522 522
 	{
523
-		$this->setViewState('Text',TPropertyValue::ensureString($value),'');
524
-		$this->_safeText = null;
523
+		$this->setViewState('Text', TPropertyValue::ensureString($value), '');
524
+		$this->_safeText=null;
525 525
 	}
526 526
 
527 527
 	/**
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 	 */
576 576
 	public function getTextMode()
577 577
 	{
578
-		return $this->getViewState('TextMode',TTextBoxMode::SingleLine);
578
+		return $this->getViewState('TextMode', TTextBoxMode::SingleLine);
579 579
 	}
580 580
 
581 581
 	/**
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 	 */
586 586
 	public function setTextMode($value)
587 587
 	{
588
-		$this->setViewState('TextMode',TPropertyValue::ensureEnum($value,'TTextBoxMode'),TTextBoxMode::SingleLine);
588
+		$this->setViewState('TextMode', TPropertyValue::ensureEnum($value, 'TTextBoxMode'), TTextBoxMode::SingleLine);
589 589
 	}
590 590
 
591 591
 	/**
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 	 */
594 594
 	public function getValidationGroup()
595 595
 	{
596
-		return $this->getViewState('ValidationGroup','');
596
+		return $this->getViewState('ValidationGroup', '');
597 597
 	}
598 598
 
599 599
 	/**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 	 */
602 602
 	public function setValidationGroup($value)
603 603
 	{
604
-		$this->setViewState('ValidationGroup',$value,'');
604
+		$this->setViewState('ValidationGroup', $value, '');
605 605
 	}
606 606
 
607 607
 	/**
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 	 */
610 610
 	public function getWrap()
611 611
 	{
612
-		return $this->getViewState('Wrap',true);
612
+		return $this->getViewState('Wrap', true);
613 613
 	}
614 614
 
615 615
 	/**
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 	 */
619 619
 	public function setWrap($value)
620 620
 	{
621
-		$this->setViewState('Wrap',TPropertyValue::ensureBoolean($value),true);
621
+		$this->setViewState('Wrap', TPropertyValue::ensureBoolean($value), true);
622 622
 	}
623 623
 }
624 624
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@  discard block
 block discarded – undo
189 189
 				return file_put_contents($fileName,file_get_contents($this->_localName))!==false;
190 190
 			else
191 191
 				return false;
192
-		}
193
-		else
192
+		} else
194 193
 			return false;
195 194
 	}
196 195
 
@@ -211,8 +210,7 @@  discard block
 block discarded – undo
211 210
 			$this->_errorCode=$_FILES[$key]['error'];
212 211
 			$this->_localName=$_FILES[$key]['tmp_name'];
213 212
 			return $this->_dataChanged=true;
214
-		}
215
-		else
213
+		} else
216 214
 			return false;
217 215
 	}
218 216
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTextHighlighter.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -157,6 +157,7 @@
 block discarded – undo
157 157
 	 * Processes a text string.
158 158
 	 * This method is required by the parent class.
159 159
 	 * @param string text string to be processed
160
+	 * @param string $text
160 161
 	 * @return string the processed text result
161 162
 	 */
162 163
 	public function processText($text)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,8 +164,7 @@
 block discarded – undo
164 164
 		try
165 165
 		{
166 166
 			$highlighter=Text_Highlighter::factory($this->getLanguage());
167
-		}
168
-		catch(Exception $e)
167
+		} catch(Exception $e)
169 168
 		{
170 169
 			$highlighter=false;
171 170
 		}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
  * @package System.Web.UI.WebControls
10 10
  */
11 11
 
12
-Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter',false);
13
-Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter.Renderer.Html',false);
12
+Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter', false);
13
+Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter.Renderer.Html', false);
14 14
 Prado::using('System.Web.UI.WebControls.TTextProcessor');
15 15
 
16 16
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setLineNumberStyle($value)
113 113
 	{
114
-		$this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value,'TTextHighlighterLineNumberStyle'));
114
+		$this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value, 'TTextHighlighterLineNumberStyle'));
115 115
 	}
116 116
 
117 117
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	protected function registerStyleSheet()
148 148
 	{
149 149
 		$cs=$this->getPage()->getClientScript();
150
-		$cssFile=Prado::getPathOfNamespace('System.3rdParty.TextHighlighter.highlight','.css');
150
+		$cssFile=Prado::getPathOfNamespace('System.3rdParty.TextHighlighter.highlight', '.css');
151 151
 		$cssKey='prado:TTextHighlighter:'.$cssFile;
152 152
 		if(!$cs->isStyleSheetFileRegistered($cssKey))
153 153
 			$cs->registerStyleSheetFile($cssKey, $this->publishFilePath($cssFile));
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 			return ('<pre>'.htmlentities(trim($text)).'</pre>');
174 174
 
175 175
 		$options["use_language"]=true;
176
-		$options["tabsize"] = $this->getTabSize();
177
-		if ($this->getShowLineNumbers())
178
-			$options["numbers"] = self::$_lineNumberStyle[$this->getLineNumberStyle()];
176
+		$options["tabsize"]=$this->getTabSize();
177
+		if($this->getShowLineNumbers())
178
+			$options["numbers"]=self::$_lineNumberStyle[$this->getLineNumberStyle()];
179 179
 		$highlighter->setRenderer(new Text_Highlighter_Renderer_Html($options));
180 180
 		return $highlighter->highlight(trim($text));
181 181
 	}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	 */
186 186
 	protected function getHeaderTemplate()
187 187
 	{
188
-		$id = $this->getClientID();
188
+		$id=$this->getClientID();
189 189
 		return TJavaScript::renderScriptBlock("new Prado.WebUI.TTextHighlighter('{$id}');");
190 190
 	}
191 191
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWebControl.php 2 patches
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,6 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * control does work with javascript and your class wants to flag that it requires an id
56 56
 	 * to operate properly.  Once set to true, it stays that way.
57 57
 	 * @param boolean pass true to enable enforcement of the tag attribute id.
58
+	 * @param boolean $value
58 59
 	 */
59 60
 	public function setEnsureId($value)
60 61
 	{
@@ -62,7 +63,7 @@  discard block
 block discarded – undo
62 63
 	}
63 64
 
64 65
 	/**
65
-	 * @return whether this web control must have an id
66
+	 * @return boolean this web control must have an id
66 67
 	 */
67 68
 	public function getEnsureId()
68 69
 	{
@@ -215,6 +216,7 @@  discard block
 block discarded – undo
215 216
 
216 217
 	/**
217 218
 	 * @param string the foreground color of the control
219
+	 * @param string $value
218 220
 	 */
219 221
 	public function setForeColor($value)
220 222
 	{
@@ -241,7 +243,7 @@  discard block
 block discarded – undo
241 243
 	}
242 244
 
243 245
 	/**
244
-	 * @return TDisplayStyle display style of the control, default is TDisplayStyle::Fixed
246
+	 * @return string display style of the control, default is TDisplayStyle::Fixed
245 247
 	 */
246 248
 	public function getDisplay()
247 249
 	{
@@ -269,6 +271,7 @@  discard block
 block discarded – undo
269 271
 
270 272
 	/**
271 273
 	 * @param string the height of the control
274
+	 * @param string $value
272 275
 	 */
273 276
 	public function setHeight($value)
274 277
 	{
@@ -390,6 +393,7 @@  discard block
 block discarded – undo
390 393
 
391 394
 	/**
392 395
 	 * @param string the width of the control
396
+	 * @param string $value
393 397
 	 */
394 398
 	public function setWidth($value)
395 399
 	{
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	public function setEnsureId($value)
60 60
 	{
61
-		$this->_ensureid |= TPropertyValue::ensureBoolean($value);
61
+		$this->_ensureid|=TPropertyValue::ensureBoolean($value);
62 62
 	}
63 63
 
64 64
 	/**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	public function getDecorator($create=true)
76 76
 	{
77 77
 		if($create && !$this->_decorator)
78
-			$this->_decorator = Prado::createComponent('TWebControlDecorator', $this);
78
+			$this->_decorator=Prado::createComponent('TWebControlDecorator', $this);
79 79
 		return $this->_decorator;
80 80
 	}
81 81
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function getAccessKey()
103 103
 	{
104
-		return $this->getViewState('AccessKey','');
104
+		return $this->getViewState('AccessKey', '');
105 105
 	}
106 106
 
107 107
 	/**
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 	 */
114 114
 	public function setAccessKey($value)
115 115
 	{
116
-		if(strlen($value)>1)
117
-			throw new TInvalidDataValueException('webcontrol_accesskey_invalid',get_class($this),$value);
118
-		$this->setViewState('AccessKey',$value,'');
116
+		if(strlen($value) > 1)
117
+			throw new TInvalidDataValueException('webcontrol_accesskey_invalid', get_class($this), $value);
118
+		$this->setViewState('AccessKey', $value, '');
119 119
 	}
120 120
 
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function getBackColor()
125 125
 	{
126
-		if($style=$this->getViewState('Style',null))
126
+		if($style=$this->getViewState('Style', null))
127 127
 			return $style->getBackColor();
128 128
 		else
129 129
 			return '';
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	public function getBorderColor()
144 144
 	{
145
-		if($style=$this->getViewState('Style',null))
145
+		if($style=$this->getViewState('Style', null))
146 146
 			return $style->getBorderColor();
147 147
 		else
148 148
 			return '';
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function getBorderStyle()
163 163
 	{
164
-		if($style=$this->getViewState('Style',null))
164
+		if($style=$this->getViewState('Style', null))
165 165
 			return $style->getBorderStyle();
166 166
 		else
167 167
 			return '';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function getBorderWidth()
182 182
 	{
183
-		if($style=$this->getViewState('Style',null))
183
+		if($style=$this->getViewState('Style', null))
184 184
 			return $style->getBorderWidth();
185 185
 		else
186 186
 			return '';
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public function getForeColor()
209 209
 	{
210
-		if($style=$this->getViewState('Style',null))
210
+		if($style=$this->getViewState('Style', null))
211 211
 			return $style->getForeColor();
212 212
 		else
213 213
 			return '';
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 */
227 227
 	public function getHeight()
228 228
 	{
229
-		if($style=$this->getViewState('Style',null))
229
+		if($style=$this->getViewState('Style', null))
230 230
 			return $style->getHeight();
231 231
 		else
232 232
 			return '';
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 */
262 262
 	public function getCssClass()
263 263
 	{
264
-		if($style=$this->getViewState('Style',null))
264
+		if($style=$this->getViewState('Style', null))
265 265
 			return $style->getCssClass();
266 266
 		else
267 267
 			return '';
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	 */
281 281
 	public function getHasStyle()
282 282
 	{
283
-		return $this->getViewState('Style',null)!==null;
283
+		return $this->getViewState('Style', null)!==null;
284 284
 	}
285 285
 
286 286
 	/**
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
 	 */
299 299
 	public function getStyle()
300 300
 	{
301
-		if($style=$this->getViewState('Style',null))
301
+		if($style=$this->getViewState('Style', null))
302 302
 			return $style;
303 303
 		else
304 304
 		{
305 305
 			$style=$this->createStyle();
306
-			$this->setViewState('Style',$style,null);
306
+			$this->setViewState('Style', $style, null);
307 307
 			return $style;
308 308
 		}
309 309
 	}
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		if(is_string($value))
320 320
 			$this->getStyle()->setCustomStyle($value);
321 321
 		else
322
-			throw new TInvalidDataValueException('webcontrol_style_invalid',get_class($this));
322
+			throw new TInvalidDataValueException('webcontrol_style_invalid', get_class($this));
323 323
 	}
324 324
 
325 325
 	/**
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	 */
336 336
 	public function getTabIndex()
337 337
 	{
338
-		return $this->getViewState('TabIndex',0);
338
+		return $this->getViewState('TabIndex', 0);
339 339
 	}
340 340
 
341 341
 	/**
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 	 */
346 346
 	public function setTabIndex($value)
347 347
 	{
348
-		$this->setViewState('TabIndex',TPropertyValue::ensureInteger($value),0);
348
+		$this->setViewState('TabIndex', TPropertyValue::ensureInteger($value), 0);
349 349
 	}
350 350
 
351 351
 	/**
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 	 */
365 365
 	public function getToolTip()
366 366
 	{
367
-		return $this->getViewState('ToolTip','');
367
+		return $this->getViewState('ToolTip', '');
368 368
 	}
369 369
 
370 370
 	/**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	 */
375 375
 	public function setToolTip($value)
376 376
 	{
377
-		$this->setViewState('ToolTip',$value,'');
377
+		$this->setViewState('ToolTip', $value, '');
378 378
 	}
379 379
 
380 380
 	/**
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	 */
383 383
 	public function getWidth()
384 384
 	{
385
-		if($style=$this->getViewState('Style',null))
385
+		if($style=$this->getViewState('Style', null))
386 386
 			return $style->getWidth();
387 387
 		else
388 388
 			return '';
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	 * @param TEventParameter event parameter to be passed to the event handlers
405 405
 	 */
406 406
 	public function onPreRender($param) {
407
-		if($decorator = $this->getDecorator(false))
407
+		if($decorator=$this->getDecorator(false))
408 408
 			$decorator->instantiate();
409 409
 
410 410
 		parent::onPreRender($param);
@@ -420,21 +420,21 @@  discard block
 block discarded – undo
420 420
 	protected function addAttributesToRender($writer)
421 421
 	{
422 422
 		if($this->getID()!=='' || $this->getEnsureId())
423
-			$writer->addAttribute('id',$this->getClientID());
423
+			$writer->addAttribute('id', $this->getClientID());
424 424
 		if(($accessKey=$this->getAccessKey())!=='')
425
-			$writer->addAttribute('accesskey',$accessKey);
425
+			$writer->addAttribute('accesskey', $accessKey);
426 426
 		if(!$this->getEnabled())
427
-			$writer->addAttribute('disabled','disabled');
428
-		if(($tabIndex=$this->getTabIndex())>0)
429
-			$writer->addAttribute('tabindex',"$tabIndex");
427
+			$writer->addAttribute('disabled', 'disabled');
428
+		if(($tabIndex=$this->getTabIndex()) > 0)
429
+			$writer->addAttribute('tabindex', "$tabIndex");
430 430
 		if(($toolTip=$this->getToolTip())!=='')
431
-			$writer->addAttribute('title',$toolTip);
432
-		if($style=$this->getViewState('Style',null))
431
+			$writer->addAttribute('title', $toolTip);
432
+		if($style=$this->getViewState('Style', null))
433 433
 			$style->addAttributesToRender($writer);
434 434
 		if($this->getHasAttributes())
435 435
 		{
436 436
 			foreach($this->getAttributes() as $name=>$value)
437
-				$writer->addAttribute($name,$value);
437
+				$writer->addAttribute($name, $value);
438 438
 		}
439 439
 	}
440 440
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 	 */
461 461
 	public function renderBeginTag($writer)
462 462
 	{
463
-		if($decorator = $this->getDecorator(false)) {
463
+		if($decorator=$this->getDecorator(false)) {
464 464
 			$decorator->renderPreTagText($writer);
465 465
 			$this->addAttributesToRender($writer);
466 466
 			$writer->renderBeginTag($this->getTagName());
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 	 */
489 489
 	public function renderEndTag($writer)
490 490
 	{
491
-		if($decorator = $this->getDecorator(false)) {
491
+		if($decorator=$this->getDecorator(false)) {
492 492
 			$decorator->renderPostContentsText($writer);
493 493
 			$writer->renderEndTag();
494 494
 			$decorator->renderPostTagText($writer);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWizard.php 3 patches
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -664,6 +664,7 @@  discard block
 block discarded – undo
664 664
 	 * This event is raised when a cancel navigation button is clicked in the
665 665
 	 * current active step.
666 666
 	 * @param TEventParameter event parameter
667
+	 * @param TCommandEventParameter $param
667 668
 	 */
668 669
 	public function onCancelButtonClick($param)
669 670
 	{
@@ -677,6 +678,7 @@  discard block
 block discarded – undo
677 678
 	 * This event is raised when a finish navigation button is clicked in the
678 679
 	 * current active step.
679 680
 	 * @param TWizardNavigationEventParameter event parameter
681
+	 * @param TWizardNavigationEventParameter $param
680 682
 	 */
681 683
 	public function onCompleteButtonClick($param)
682 684
 	{
@@ -690,6 +692,7 @@  discard block
 block discarded – undo
690 692
 	 * This event is raised when a next navigation button is clicked in the
691 693
 	 * current active step.
692 694
 	 * @param TWizardNavigationEventParameter event parameter
695
+	 * @param TWizardNavigationEventParameter $param
693 696
 	 */
694 697
 	public function onNextButtonClick($param)
695 698
 	{
@@ -701,6 +704,7 @@  discard block
 block discarded – undo
701 704
 	 * This event is raised when a previous navigation button is clicked in the
702 705
 	 * current active step.
703 706
 	 * @param TWizardNavigationEventParameter event parameter
707
+	 * @param TWizardNavigationEventParameter $param
704 708
 	 */
705 709
 	public function onPreviousButtonClick($param)
706 710
 	{
@@ -711,6 +715,7 @@  discard block
 block discarded – undo
711 715
 	 * Raises <b>OnSideBarButtonClick</b> event.
712 716
 	 * This event is raised when a link button in the side bar is clicked.
713 717
 	 * @param TWizardNavigationEventParameter event parameter
718
+	 * @param TWizardNavigationEventParameter $param
714 719
 	 */
715 720
 	public function onSideBarButtonClick($param)
716 721
 	{
@@ -739,6 +744,7 @@  discard block
 block discarded – undo
739 744
 	 * This method should only be used by control developers.
740 745
 	 * It is invoked when a step is added into the step collection of the wizard.
741 746
 	 * @param TWizardStep wizard step to be added into multiview.
747
+	 * @param TWizardStep $step
742 748
 	 */
743 749
 	public function addedWizardStep($step)
744 750
 	{
@@ -1282,6 +1288,7 @@  discard block
 block discarded – undo
1282 1288
 	 * Determines the index of the previous step based on history.
1283 1289
 	 * @param boolean whether the first item in the history stack should be popped
1284 1290
 	 * up after calling this method.
1291
+	 * @param boolean $popStack
1285 1292
 	 */
1286 1293
 	protected function getPreviousStepIndex($popStack)
1287 1294
 	{
@@ -1325,6 +1332,7 @@  discard block
 block discarded – undo
1325 1332
 
1326 1333
 	/**
1327 1334
 	 * @param integer index of the step
1335
+	 * @param integer $index
1328 1336
 	 * @return boolean whether navigation to the specified step is allowed
1329 1337
 	 */
1330 1338
 	protected function allowNavigationToStep($index)
@@ -1837,6 +1845,7 @@  discard block
 block discarded – undo
1837 1845
 	/**
1838 1846
 	 * Constructor.
1839 1847
 	 * @param integer current step index
1848
+	 * @param integer $currentStep
1840 1849
 	 */
1841 1850
 	public function __construct($currentStep)
1842 1851
 	{
@@ -1878,6 +1887,7 @@  discard block
 block discarded – undo
1878 1887
 
1879 1888
 	/**
1880 1889
 	 * @param boolean whether navigation to the next step should be canceled.
1890
+	 * @param boolean $value
1881 1891
 	 */
1882 1892
 	public function setCancelNavigation($value)
1883 1893
 	{
@@ -1945,6 +1955,7 @@  discard block
 block discarded – undo
1945 1955
 	/**
1946 1956
 	 * Constructor.
1947 1957
 	 * @param TWizard the wizard owning this template
1958
+	 * @param TWizard $wizard
1948 1959
 	 */
1949 1960
 	public function __construct($wizard)
1950 1961
 	{
@@ -1975,6 +1986,8 @@  discard block
 block discarded – undo
1975 1986
 	 * @param TWizardNavigationButtonStyle button style
1976 1987
 	 * @param boolean whether the button should cause validation
1977 1988
 	 * @param string command name for the button's OnCommand event
1989
+	 * @param TWizardNavigationButtonStyle $buttonStyle
1990
+	 * @param boolean $causesValidation
1978 1991
 	 * @throws TInvalidDataValueException if the button type is not recognized
1979 1992
 	 */
1980 1993
 	protected function createNavigationButton($buttonStyle,$causesValidation,$commandName)
Please login to merge, or discard this patch.
Spacing   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 */
211 211
 	public function setActiveStep($step)
212 212
 	{
213
-		if(($index=$this->getWizardSteps()->indexOf($step))<0)
213
+		if(($index=$this->getWizardSteps()->indexOf($step)) < 0)
214 214
 			throw new TInvalidOperationException('wizard_step_invalid');
215 215
 		$this->setActiveStepIndex($index);
216 216
 	}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 */
258 258
 	public function getShowCancelButton()
259 259
 	{
260
-		return $this->getViewState('ShowCancelButton',false);
260
+		return $this->getViewState('ShowCancelButton', false);
261 261
 	}
262 262
 
263 263
 	/**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function setShowCancelButton($value)
267 267
 	{
268
-		$this->setViewState('ShowCancelButton',TPropertyValue::ensureBoolean($value),false);
268
+		$this->setViewState('ShowCancelButton', TPropertyValue::ensureBoolean($value), false);
269 269
 	}
270 270
 
271 271
 	/**
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	 */
274 274
 	public function getShowSideBar()
275 275
 	{
276
-		return $this->getViewState('ShowSideBar',true);
276
+		return $this->getViewState('ShowSideBar', true);
277 277
 	}
278 278
 
279 279
 	/**
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	public function setShowSideBar($value)
283 283
 	{
284
-		$this->setViewState('ShowSideBar',TPropertyValue::ensureBoolean($value),true);
284
+		$this->setViewState('ShowSideBar', TPropertyValue::ensureBoolean($value), true);
285 285
 	}
286 286
 
287 287
 	/**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	 */
375 375
 	public function getHeaderText()
376 376
 	{
377
-		return $this->getViewState('HeaderText','');
377
+		return $this->getViewState('HeaderText', '');
378 378
 	}
379 379
 
380 380
 	/**
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	 */
383 383
 	public function setHeaderText($value)
384 384
 	{
385
-		$this->setViewState('HeaderText',TPropertyValue::ensureString($value),'');
385
+		$this->setViewState('HeaderText', TPropertyValue::ensureString($value), '');
386 386
 	}
387 387
 
388 388
 	/**
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 	 */
392 392
 	public function getCancelDestinationUrl()
393 393
 	{
394
-		return $this->getViewState('CancelDestinationUrl','');
394
+		return $this->getViewState('CancelDestinationUrl', '');
395 395
 	}
396 396
 
397 397
 	/**
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	 */
401 401
 	public function setCancelDestinationUrl($value)
402 402
 	{
403
-		$this->setViewState('CancelDestinationUrl',TPropertyValue::ensureString($value),'');
403
+		$this->setViewState('CancelDestinationUrl', TPropertyValue::ensureString($value), '');
404 404
 	}
405 405
 
406 406
 	/**
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 	 */
410 410
 	public function getFinishDestinationUrl()
411 411
 	{
412
-		return $this->getViewState('FinishDestinationUrl','');
412
+		return $this->getViewState('FinishDestinationUrl', '');
413 413
 	}
414 414
 
415 415
 	/**
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 	 */
418 418
 	public function setFinishDestinationUrl($value)
419 419
 	{
420
-		$this->setViewState('FinishDestinationUrl',TPropertyValue::ensureString($value),'');
420
+		$this->setViewState('FinishDestinationUrl', TPropertyValue::ensureString($value), '');
421 421
 	}
422 422
 
423 423
 	/**
@@ -425,10 +425,10 @@  discard block
 block discarded – undo
425 425
 	 */
426 426
 	public function getSideBarButtonStyle()
427 427
 	{
428
-		if(($style=$this->getViewState('SideBarButtonStyle',null))===null)
428
+		if(($style=$this->getViewState('SideBarButtonStyle', null))===null)
429 429
 		{
430 430
 			$style=new TStyle;
431
-			$this->setViewState('SideBarButtonStyle',$style,null);
431
+			$this->setViewState('SideBarButtonStyle', $style, null);
432 432
 		}
433 433
 		return $style;
434 434
 	}
@@ -438,10 +438,10 @@  discard block
 block discarded – undo
438 438
 	 */
439 439
 	public function getNavigationButtonStyle()
440 440
 	{
441
-		if(($style=$this->getViewState('NavigationButtonStyle',null))===null)
441
+		if(($style=$this->getViewState('NavigationButtonStyle', null))===null)
442 442
 		{
443 443
 			$style=new TStyle;
444
-			$this->setViewState('NavigationButtonStyle',$style,null);
444
+			$this->setViewState('NavigationButtonStyle', $style, null);
445 445
 		}
446 446
 		return $style;
447 447
 	}
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
451 451
 	 */
452 452
 	public function getStartNextButtonStyle()
453 453
 	{
454
-		if(($style=$this->getViewState('StartNextButtonStyle',null))===null)
454
+		if(($style=$this->getViewState('StartNextButtonStyle', null))===null)
455 455
 		{
456 456
 			$style=new TWizardNavigationButtonStyle;
457 457
 			$style->setButtonText('Next');
458
-			$this->setViewState('StartNextButtonStyle',$style,null);
458
+			$this->setViewState('StartNextButtonStyle', $style, null);
459 459
 		}
460 460
 		return $style;
461 461
 	}
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
 	 */
466 466
 	public function getStepNextButtonStyle()
467 467
 	{
468
-		if(($style=$this->getViewState('StepNextButtonStyle',null))===null)
468
+		if(($style=$this->getViewState('StepNextButtonStyle', null))===null)
469 469
 		{
470 470
 			$style=new TWizardNavigationButtonStyle;
471 471
 			$style->setButtonText('Next');
472
-			$this->setViewState('StepNextButtonStyle',$style,null);
472
+			$this->setViewState('StepNextButtonStyle', $style, null);
473 473
 		}
474 474
 		return $style;
475 475
 	}
@@ -479,11 +479,11 @@  discard block
 block discarded – undo
479 479
 	 */
480 480
 	public function getStepPreviousButtonStyle()
481 481
 	{
482
-		if(($style=$this->getViewState('StepPreviousButtonStyle',null))===null)
482
+		if(($style=$this->getViewState('StepPreviousButtonStyle', null))===null)
483 483
 		{
484 484
 			$style=new TWizardNavigationButtonStyle;
485 485
 			$style->setButtonText('Previous');
486
-			$this->setViewState('StepPreviousButtonStyle',$style,null);
486
+			$this->setViewState('StepPreviousButtonStyle', $style, null);
487 487
 		}
488 488
 		return $style;
489 489
 	}
@@ -493,11 +493,11 @@  discard block
 block discarded – undo
493 493
 	 */
494 494
 	public function getFinishCompleteButtonStyle()
495 495
 	{
496
-		if(($style=$this->getViewState('FinishCompleteButtonStyle',null))===null)
496
+		if(($style=$this->getViewState('FinishCompleteButtonStyle', null))===null)
497 497
 		{
498 498
 			$style=new TWizardNavigationButtonStyle;
499 499
 			$style->setButtonText('Complete');
500
-			$this->setViewState('FinishCompleteButtonStyle',$style,null);
500
+			$this->setViewState('FinishCompleteButtonStyle', $style, null);
501 501
 		}
502 502
 		return $style;
503 503
 	}
@@ -507,11 +507,11 @@  discard block
 block discarded – undo
507 507
 	 */
508 508
 	public function getFinishPreviousButtonStyle()
509 509
 	{
510
-		if(($style=$this->getViewState('FinishPreviousButtonStyle',null))===null)
510
+		if(($style=$this->getViewState('FinishPreviousButtonStyle', null))===null)
511 511
 		{
512 512
 			$style=new TWizardNavigationButtonStyle;
513 513
 			$style->setButtonText('Previous');
514
-			$this->setViewState('FinishPreviousButtonStyle',$style,null);
514
+			$this->setViewState('FinishPreviousButtonStyle', $style, null);
515 515
 		}
516 516
 		return $style;
517 517
 	}
@@ -521,11 +521,11 @@  discard block
 block discarded – undo
521 521
 	 */
522 522
 	public function getCancelButtonStyle()
523 523
 	{
524
-		if(($style=$this->getViewState('CancelButtonStyle',null))===null)
524
+		if(($style=$this->getViewState('CancelButtonStyle', null))===null)
525 525
 		{
526 526
 			$style=new TWizardNavigationButtonStyle;
527 527
 			$style->setButtonText('Cancel');
528
-			$this->setViewState('CancelButtonStyle',$style,null);
528
+			$this->setViewState('CancelButtonStyle', $style, null);
529 529
 		}
530 530
 		return $style;
531 531
 	}
@@ -535,10 +535,10 @@  discard block
 block discarded – undo
535 535
 	 */
536 536
 	public function getSideBarStyle()
537 537
 	{
538
-		if(($style=$this->getViewState('SideBarStyle',null))===null)
538
+		if(($style=$this->getViewState('SideBarStyle', null))===null)
539 539
 		{
540 540
 			$style=new TPanelStyle;
541
-			$this->setViewState('SideBarStyle',$style,null);
541
+			$this->setViewState('SideBarStyle', $style, null);
542 542
 		}
543 543
 		return $style;
544 544
 	}
@@ -548,10 +548,10 @@  discard block
 block discarded – undo
548 548
 	 */
549 549
 	public function getHeaderStyle()
550 550
 	{
551
-		if(($style=$this->getViewState('HeaderStyle',null))===null)
551
+		if(($style=$this->getViewState('HeaderStyle', null))===null)
552 552
 		{
553 553
 			$style=new TPanelStyle;
554
-			$this->setViewState('HeaderStyle',$style,null);
554
+			$this->setViewState('HeaderStyle', $style, null);
555 555
 		}
556 556
 		return $style;
557 557
 	}
@@ -561,10 +561,10 @@  discard block
 block discarded – undo
561 561
 	 */
562 562
 	public function getStepStyle()
563 563
 	{
564
-		if(($style=$this->getViewState('StepStyle',null))===null)
564
+		if(($style=$this->getViewState('StepStyle', null))===null)
565 565
 		{
566 566
 			$style=new TPanelStyle;
567
-			$this->setViewState('StepStyle',$style,null);
567
+			$this->setViewState('StepStyle', $style, null);
568 568
 		}
569 569
 		return $style;
570 570
 	}
@@ -574,10 +574,10 @@  discard block
 block discarded – undo
574 574
 	 */
575 575
 	public function getNavigationStyle()
576 576
 	{
577
-		if(($style=$this->getViewState('NavigationStyle',null))===null)
577
+		if(($style=$this->getViewState('NavigationStyle', null))===null)
578 578
 		{
579 579
 			$style=new TPanelStyle;
580
-			$this->setViewState('NavigationStyle',$style,null);
580
+			$this->setViewState('NavigationStyle', $style, null);
581 581
 		}
582 582
 		return $style;
583 583
 	}
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 	 */
588 588
 	public function getUseDefaultLayout()
589 589
 	{
590
-		return $this->getViewState('UseDefaultLayout',true);
590
+		return $this->getViewState('UseDefaultLayout', true);
591 591
 	}
592 592
 
593 593
 	/**
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	 */
598 598
 	public function setUseDefaultLayout($value)
599 599
 	{
600
-		$this->setViewState('UseDefaultLayout',TPropertyValue::ensureBoolean($value),true);
600
+		$this->setViewState('UseDefaultLayout', TPropertyValue::ensureBoolean($value), true);
601 601
 	}
602 602
 
603 603
 	/**
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 	 */
657 657
 	public function onActiveStepChanged($param)
658 658
 	{
659
-		$this->raiseEvent('OnActiveStepChanged',$this,$param);
659
+		$this->raiseEvent('OnActiveStepChanged', $this, $param);
660 660
 	}
661 661
 
662 662
 	/**
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 	 */
668 668
 	public function onCancelButtonClick($param)
669 669
 	{
670
-		$this->raiseEvent('OnCancelButtonClick',$this,$param);
670
+		$this->raiseEvent('OnCancelButtonClick', $this, $param);
671 671
 		if(($url=$this->getCancelDestinationUrl())!=='')
672 672
 			$this->getResponse()->redirect($url);
673 673
 	}
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 	 */
681 681
 	public function onCompleteButtonClick($param)
682 682
 	{
683
-		$this->raiseEvent('OnCompleteButtonClick',$this,$param);
683
+		$this->raiseEvent('OnCompleteButtonClick', $this, $param);
684 684
 		if(($url=$this->getFinishDestinationUrl())!=='')
685 685
 			$this->getResponse()->redirect($url);
686 686
 	}
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 	 */
694 694
 	public function onNextButtonClick($param)
695 695
 	{
696
-		$this->raiseEvent('OnNextButtonClick',$this,$param);
696
+		$this->raiseEvent('OnNextButtonClick', $this, $param);
697 697
 	}
698 698
 
699 699
 	/**
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 	 */
705 705
 	public function onPreviousButtonClick($param)
706 706
 	{
707
-		$this->raiseEvent('OnPreviousButtonClick',$this,$param);
707
+		$this->raiseEvent('OnPreviousButtonClick', $this, $param);
708 708
 	}
709 709
 
710 710
 	/**
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 	 */
715 715
 	public function onSideBarButtonClick($param)
716 716
 	{
717
-		$this->raiseEvent('OnSideBarButtonClick',$this,$param);
717
+		$this->raiseEvent('OnSideBarButtonClick', $this, $param);
718 718
 	}
719 719
 
720 720
 	/**
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 		{
729 729
 			$this->_multiView=new TMultiView;
730 730
 			$this->_multiView->setID('WizardMultiView');
731
-			$this->_multiView->attachEventHandler('OnActiveViewChanged',array($this,'onActiveStepChanged'));
731
+			$this->_multiView->attachEventHandler('OnActiveViewChanged', array($this, 'onActiveStepChanged'));
732 732
 			$this->_multiView->ignoreBubbleEvents();
733 733
 		}
734 734
 		return $this->_multiView;
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 		parent::onInit($param);
771 771
 		$this->ensureChildControls();
772 772
 		$this->setEnsureId(true);
773
-		if($this->getActiveStepIndex()<0 && $this->getWizardSteps()->getCount()>0)
773
+		if($this->getActiveStepIndex() < 0 && $this->getWizardSteps()->getCount() > 0)
774 774
 			$this->setActiveStepIndex(0);
775 775
 	}
776 776
 
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	 */
847 847
 	protected function applyHeaderProperties()
848 848
 	{
849
-		if(($style=$this->getViewState('HeaderStyle',null))!==null)
849
+		if(($style=$this->getViewState('HeaderStyle', null))!==null)
850 850
 			$this->_header->getStyle()->mergeWith($style);
851 851
 		if($this->getHeaderTemplate()===null)
852 852
 		{
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
 			$this->_sideBarDataList->setDataSource($this->getWizardSteps());
867 867
 			$this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex());
868 868
 			$this->_sideBarDataList->dataBind();
869
-			if(($style=$this->getViewState('SideBarButtonStyle',null))!==null)
869
+			if(($style=$this->getViewState('SideBarButtonStyle', null))!==null)
870 870
 			{
871 871
 				foreach($this->_sideBarDataList->getItems() as $item)
872 872
 				{
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 				}
876 876
 			}
877 877
 		}
878
-		if(($style=$this->getViewState('SideBarStyle',null))!==null)
878
+		if(($style=$this->getViewState('SideBarStyle', null))!==null)
879 879
 			$this->_sideBar->getStyle()->mergeWith($style);
880 880
 	}
881 881
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 	 */
885 885
 	protected function applyStepContentProperties()
886 886
 	{
887
-		if(($style=$this->getViewState('StepStyle',null))!==null)
887
+		if(($style=$this->getViewState('StepStyle', null))!==null)
888 888
 			$this->_stepContent->getStyle()->mergeWith($style);
889 889
 	}
890 890
 
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
 
900 900
 		if(!$this->_navigation)
901 901
 			return;
902
-		else if($activeStepIndex<0 || $activeStepIndex>=$wizardSteps->getCount())
902
+		else if($activeStepIndex < 0 || $activeStepIndex >= $wizardSteps->getCount())
903 903
 		{
904 904
 			$this->_navigation->setVisible(false);
905 905
 			return;
@@ -930,12 +930,12 @@  discard block
 block discarded – undo
930 930
 		$this->_stepNavigation->setVisible($showStandard && $activeStepType===self::ST_STEP);
931 931
 		$this->_finishNavigation->setVisible($showStandard && $activeStepType===self::ST_FINISH);
932 932
 
933
-		if(($navigationStyle=$this->getViewState('NavigationStyle',null))!==null)
933
+		if(($navigationStyle=$this->getViewState('NavigationStyle', null))!==null)
934 934
 			$this->_navigation->getStyle()->mergeWith($navigationStyle);
935 935
 
936 936
 		$displayCancelButton=$this->getShowCancelButton();
937 937
 		$cancelButtonStyle=$this->getCancelButtonStyle();
938
-		$buttonStyle=$this->getViewState('NavigationButtonStyle',null);
938
+		$buttonStyle=$this->getViewState('NavigationButtonStyle', null);
939 939
 		if($buttonStyle!==null)
940 940
 			$cancelButtonStyle->mergeWith($buttonStyle);
941 941
 
@@ -1012,10 +1012,10 @@  discard block
 block discarded – undo
1012 1012
 	 */
1013 1013
 	protected function getHistory()
1014 1014
 	{
1015
-		if(($history=$this->getControlState('History',null))===null)
1015
+		if(($history=$this->getControlState('History', null))===null)
1016 1016
 		{
1017 1017
 			$history=new TStack;
1018
-			$this->setControlState('History',$history);
1018
+			$this->setControlState('History', $history);
1019 1019
 		}
1020 1020
 		return $history;
1021 1021
 	}
@@ -1030,14 +1030,14 @@  discard block
 block discarded – undo
1030 1030
 		if(($type=$wizardStep->getStepType())===TWizardStepType::Auto)
1031 1031
 		{
1032 1032
 			$steps=$this->getWizardSteps();
1033
-			if(($index=$steps->indexOf($wizardStep))>=0)
1033
+			if(($index=$steps->indexOf($wizardStep)) >= 0)
1034 1034
 			{
1035 1035
 				$stepCount=$steps->getCount();
1036
-				if($stepCount===1 || ($index<$stepCount-1 && $steps->itemAt($index+1)->getStepType()===TWizardStepType::Complete))
1036
+				if($stepCount===1 || ($index < $stepCount - 1 && $steps->itemAt($index + 1)->getStepType()===TWizardStepType::Complete))
1037 1037
 					return TWizardStepType::Finish;
1038 1038
 				else if($index===0)
1039 1039
 					return TWizardStepType::Start;
1040
-				else if($index===$stepCount-1)
1040
+				else if($index===$stepCount - 1)
1041 1041
 					return TWizardStepType::Finish;
1042 1042
 				else
1043 1043
 					return TWizardStepType::Step;
@@ -1106,8 +1106,8 @@  discard block
 block discarded – undo
1106 1106
 
1107 1107
 			if(($this->_sideBarDataList=$this->_sideBar->findControl(self::ID_SIDEBAR_LIST))!==null)
1108 1108
 			{
1109
-				$this->_sideBarDataList->attachEventHandler('OnItemCommand',array($this,'dataListItemCommand'));
1110
-				$this->_sideBarDataList->attachEventHandler('OnItemDataBound',array($this,'dataListItemDataBound'));
1109
+				$this->_sideBarDataList->attachEventHandler('OnItemCommand', array($this, 'dataListItemCommand'));
1110
+				$this->_sideBarDataList->attachEventHandler('OnItemDataBound', array($this, 'dataListItemDataBound'));
1111 1111
 				$this->_sideBarDataList->setDataSource($this->getWizardSteps());
1112 1112
 				$this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex());
1113 1113
 				$this->_sideBarDataList->dataBind();
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
 	 * @param mixed sender of the event
1128 1128
 	 * @param TDataListCommandEventParameter
1129 1129
 	 */
1130
-	public function dataListItemCommand($sender,$param)
1130
+	public function dataListItemCommand($sender, $param)
1131 1131
 	{
1132 1132
 		$item=$param->getItem();
1133 1133
 		if($param->getCommandName()===self::CMD_MOVETO)
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 	 * @param mixed sender of the event
1164 1164
 	 * @param TDataListItemEventParameter
1165 1165
 	 */
1166
-	public function dataListItemDataBound($sender,$param)
1166
+	public function dataListItemDataBound($sender, $param)
1167 1167
 	{
1168 1168
 		$item=$param->getItem();
1169 1169
 		$itemType=$item->getItemType();
@@ -1286,20 +1286,20 @@  discard block
 block discarded – undo
1286 1286
 	protected function getPreviousStepIndex($popStack)
1287 1287
 	{
1288 1288
 		$history=$this->getHistory();
1289
-		if($history->getCount()>=0)
1289
+		if($history->getCount() >= 0)
1290 1290
 		{
1291 1291
 			$activeStepIndex=$this->getActiveStepIndex();
1292 1292
 			$previousStepIndex=-1;
1293 1293
 			if($popStack)
1294 1294
 			{
1295 1295
 				$previousStepIndex=$history->pop();
1296
-				if($activeStepIndex===$previousStepIndex && $history->getCount()>0)
1296
+				if($activeStepIndex===$previousStepIndex && $history->getCount() > 0)
1297 1297
 					$previousStepIndex=$history->pop();
1298 1298
 			}
1299 1299
 			else
1300 1300
 			{
1301 1301
 				$previousStepIndex=$history->peek();
1302
-				if($activeStepIndex===$previousStepIndex && $history->getCount()>1)
1302
+				if($activeStepIndex===$previousStepIndex && $history->getCount() > 1)
1303 1303
 				{
1304 1304
 					$saveIndex=$history->pop();
1305 1305
 					$previousStepIndex=$history->peek();
@@ -1343,12 +1343,12 @@  discard block
 block discarded – undo
1343 1343
 	 * @param TEventParameter event parameter
1344 1344
 	 * @throws TInvalidDataValueException if a navigation command is associated with an invalid parameter
1345 1345
 	 */
1346
-	public function bubbleEvent($sender,$param)
1346
+	public function bubbleEvent($sender, $param)
1347 1347
 	{
1348 1348
 		if($param instanceof TCommandEventParameter)
1349 1349
 		{
1350 1350
 			$command=$param->getCommandName();
1351
-			if(strcasecmp($command,self::CMD_CANCEL)===0)
1351
+			if(strcasecmp($command, self::CMD_CANCEL)===0)
1352 1352
 			{
1353 1353
 				$this->onCancelButtonClick($param);
1354 1354
 				return true;
@@ -1364,49 +1364,49 @@  discard block
 block discarded – undo
1364 1364
 			$movePrev=false;
1365 1365
 			$this->_activeStepIndexSet=false;
1366 1366
 
1367
-			if(strcasecmp($command,self::CMD_NEXT)===0)
1367
+			if(strcasecmp($command, self::CMD_NEXT)===0)
1368 1368
 			{
1369 1369
 				if($type!==self::ST_START && $type!==self::ST_STEP)
1370
-					throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_NEXT);
1371
-				if($index<$this->getWizardSteps()->getCount()-1)
1372
-					$navParam->setNextStepIndex($index+1);
1370
+					throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_NEXT);
1371
+				if($index < $this->getWizardSteps()->getCount() - 1)
1372
+					$navParam->setNextStepIndex($index + 1);
1373 1373
 				$this->onNextButtonClick($navParam);
1374 1374
 				$handled=true;
1375 1375
 			}
1376
-			else if(strcasecmp($command,self::CMD_PREVIOUS)===0)
1376
+			else if(strcasecmp($command, self::CMD_PREVIOUS)===0)
1377 1377
 			{
1378 1378
 				if($type!==self::ST_FINISH && $type!==self::ST_STEP)
1379
-					throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_PREVIOUS);
1379
+					throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_PREVIOUS);
1380 1380
 				$movePrev=true;
1381
-				if(($prevIndex=$this->getPreviousStepIndex(false))>=0)
1381
+				if(($prevIndex=$this->getPreviousStepIndex(false)) >= 0)
1382 1382
 					$navParam->setNextStepIndex($prevIndex);
1383 1383
 				$this->onPreviousButtonClick($navParam);
1384 1384
 				$handled=true;
1385 1385
 			}
1386
-			else if(strcasecmp($command,self::CMD_COMPLETE)===0)
1386
+			else if(strcasecmp($command, self::CMD_COMPLETE)===0)
1387 1387
 			{
1388 1388
 				if($type!==self::ST_FINISH)
1389
-					throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_COMPLETE);
1390
-				if($index<$this->getWizardSteps()->getCount()-1)
1391
-					$navParam->setNextStepIndex($index+1);
1389
+					throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_COMPLETE);
1390
+				if($index < $this->getWizardSteps()->getCount() - 1)
1391
+					$navParam->setNextStepIndex($index + 1);
1392 1392
 				$this->onCompleteButtonClick($navParam);
1393 1393
 				$handled=true;
1394 1394
 			}
1395
-			else if(strcasecmp($command,self::CMD_MOVETO)===0)
1395
+			else if(strcasecmp($command, self::CMD_MOVETO)===0)
1396 1396
 			{
1397 1397
 				if($this->_cancelNavigation)  // may be set in onSideBarButtonClick
1398 1398
 					$navParam->setCancelNavigation(true);
1399 1399
 				$requestedStep=$param->getCommandParameter();
1400
-				if (!is_numeric($requestedStep))
1400
+				if(!is_numeric($requestedStep))
1401 1401
 				{
1402 1402
 					$requestedIndex=-1;
1403
-					foreach ($this->getWizardSteps() as $index=>$step)
1404
-						if ($step->getId()===$requestedStep)
1403
+					foreach($this->getWizardSteps() as $index=>$step)
1404
+						if($step->getId()===$requestedStep)
1405 1405
 						{
1406 1406
 							$requestedIndex=$index;
1407 1407
 							break;
1408 1408
 						}
1409
-					if ($requestedIndex<0)
1409
+					if($requestedIndex < 0)
1410 1410
 						throw new TConfigurationException('wizard_step_invalid');
1411 1411
 				}
1412 1412
 				else
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
 					if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($nextStepIndex))
1424 1424
 					{
1425 1425
 						if($movePrev)
1426
-							$this->getPreviousStepIndex(true);  // pop out the previous move from history
1426
+							$this->getPreviousStepIndex(true); // pop out the previous move from history
1427 1427
 						$this->setActiveStepIndex($nextStepIndex);
1428 1428
 					}
1429 1429
 				}
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
 	 */
1478 1478
 	public function getTitle()
1479 1479
 	{
1480
-		return $this->getViewState('Title','');
1480
+		return $this->getViewState('Title', '');
1481 1481
 	}
1482 1482
 
1483 1483
 	/**
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 	 */
1486 1486
 	public function setTitle($value)
1487 1487
 	{
1488
-		$this->setViewState('Title',$value,'');
1488
+		$this->setViewState('Title', $value, '');
1489 1489
 		if($this->_wizard)
1490 1490
 			$this->_wizard->wizardStepsChanged();
1491 1491
 	}
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
 	 */
1496 1496
 	public function getAllowReturn()
1497 1497
 	{
1498
-		return $this->getViewState('AllowReturn',true);
1498
+		return $this->getViewState('AllowReturn', true);
1499 1499
 	}
1500 1500
 
1501 1501
 	/**
@@ -1503,7 +1503,7 @@  discard block
 block discarded – undo
1503 1503
 	 */
1504 1504
 	public function setAllowReturn($value)
1505 1505
 	{
1506
-		$this->setViewState('AllowReturn',TPropertyValue::ensureBoolean($value),true);
1506
+		$this->setViewState('AllowReturn', TPropertyValue::ensureBoolean($value), true);
1507 1507
 	}
1508 1508
 
1509 1509
 	/**
@@ -1511,7 +1511,7 @@  discard block
 block discarded – undo
1511 1511
 	 */
1512 1512
 	public function getStepType()
1513 1513
 	{
1514
-		return $this->getViewState('StepType',TWizardStepType::Auto);
1514
+		return $this->getViewState('StepType', TWizardStepType::Auto);
1515 1515
 	}
1516 1516
 
1517 1517
 	/**
@@ -1519,10 +1519,10 @@  discard block
 block discarded – undo
1519 1519
 	 */
1520 1520
 	public function setStepType($type)
1521 1521
 	{
1522
-		$type=TPropertyValue::ensureEnum($type,'TWizardStepType');
1522
+		$type=TPropertyValue::ensureEnum($type, 'TWizardStepType');
1523 1523
 		if($type!==$this->getStepType())
1524 1524
 		{
1525
-			$this->setViewState('StepType',$type,TWizardStepType::Auto);
1525
+			$this->setViewState('StepType', $type, TWizardStepType::Auto);
1526 1526
 			if($this->_wizard)
1527 1527
 				$this->_wizard->wizardStepsChanged();
1528 1528
 		}
@@ -1698,12 +1698,12 @@  discard block
 block discarded – undo
1698 1698
 	 * @param mixed new item
1699 1699
 	 * @throws TInvalidDataTypeException if the item being added is not TWizardStep.
1700 1700
 	 */
1701
-	public function insertAt($index,$item)
1701
+	public function insertAt($index, $item)
1702 1702
 	{
1703 1703
 		if($item instanceof TWizardStep)
1704 1704
 		{
1705
-			parent::insertAt($index,$item);
1706
-			$this->_wizard->getMultiView()->getViews()->insertAt($index,$item);
1705
+			parent::insertAt($index, $item);
1706
+			$this->_wizard->getMultiView()->getViews()->insertAt($index, $item);
1707 1707
 			$this->_wizard->addedWizardStep($item);
1708 1708
 		}
1709 1709
 		else
@@ -1977,7 +1977,7 @@  discard block
 block discarded – undo
1977 1977
 	 * @param string command name for the button's OnCommand event
1978 1978
 	 * @throws TInvalidDataValueException if the button type is not recognized
1979 1979
 	 */
1980
-	protected function createNavigationButton($buttonStyle,$causesValidation,$commandName)
1980
+	protected function createNavigationButton($buttonStyle, $causesValidation, $commandName)
1981 1981
 	{
1982 1982
 		switch($buttonStyle->getButtonType())
1983 1983
 		{
@@ -1992,7 +1992,7 @@  discard block
 block discarded – undo
1992 1992
 				$button->setImageUrl($buttonStyle->getImageUrl());
1993 1993
 				break;
1994 1994
 			default:
1995
-				throw new TInvalidDataValueException('wizard_buttontype_unknown',$buttonStyle->getButtonType());
1995
+				throw new TInvalidDataValueException('wizard_buttontype_unknown', $buttonStyle->getButtonType());
1996 1996
 		}
1997 1997
 		$button->setText($buttonStyle->getButtonText());
1998 1998
 		$button->setCausesValidation($causesValidation);
@@ -2017,8 +2017,8 @@  discard block
 block discarded – undo
2017 2017
 	 */
2018 2018
 	public function instantiateIn($parent)
2019 2019
 	{
2020
-		$nextButton=$this->createNavigationButton($this->getWizard()->getStartNextButtonStyle(),true,TWizard::CMD_NEXT);
2021
-		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL);
2020
+		$nextButton=$this->createNavigationButton($this->getWizard()->getStartNextButtonStyle(), true, TWizard::CMD_NEXT);
2021
+		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL);
2022 2022
 
2023 2023
 		$controls=$parent->getControls();
2024 2024
 		$controls->add($nextButton);
@@ -2046,9 +2046,9 @@  discard block
 block discarded – undo
2046 2046
 	 */
2047 2047
 	public function instantiateIn($parent)
2048 2048
 	{
2049
-		$previousButton=$this->createNavigationButton($this->getWizard()->getFinishPreviousButtonStyle(),false,TWizard::CMD_PREVIOUS);
2050
-		$completeButton=$this->createNavigationButton($this->getWizard()->getFinishCompleteButtonStyle(),true,TWizard::CMD_COMPLETE);
2051
-		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL);
2049
+		$previousButton=$this->createNavigationButton($this->getWizard()->getFinishPreviousButtonStyle(), false, TWizard::CMD_PREVIOUS);
2050
+		$completeButton=$this->createNavigationButton($this->getWizard()->getFinishCompleteButtonStyle(), true, TWizard::CMD_COMPLETE);
2051
+		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL);
2052 2052
 
2053 2053
 		$controls=$parent->getControls();
2054 2054
 		$controls->add($previousButton);
@@ -2079,9 +2079,9 @@  discard block
 block discarded – undo
2079 2079
 	 */
2080 2080
 	public function instantiateIn($parent)
2081 2081
 	{
2082
-		$previousButton=$this->createNavigationButton($this->getWizard()->getStepPreviousButtonStyle(),false,TWizard::CMD_PREVIOUS);
2083
-		$nextButton=$this->createNavigationButton($this->getWizard()->getStepNextButtonStyle(),true,TWizard::CMD_NEXT);
2084
-		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL);
2082
+		$previousButton=$this->createNavigationButton($this->getWizard()->getStepPreviousButtonStyle(), false, TWizard::CMD_PREVIOUS);
2083
+		$nextButton=$this->createNavigationButton($this->getWizard()->getStepNextButtonStyle(), true, TWizard::CMD_NEXT);
2084
+		$cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL);
2085 2085
 
2086 2086
 		$controls=$parent->getControls();
2087 2087
 		$controls->add($previousButton);
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -816,8 +816,7 @@  discard block
 block discarded – undo
816 816
 				$this->_navigation->renderControl($writer);
817 817
 				$writer->write("\n</td></tr></table>\n");
818 818
 				$this->renderEndTag($writer);
819
-			}
820
-			else
819
+			} else
821 820
 			{
822 821
 				$this->applyControlProperties();
823 822
 				$this->renderBeginTag($writer);
@@ -915,8 +914,7 @@  discard block
 block discarded – undo
915 914
 				{
916 915
 					$container->setVisible(true);
917 916
 					$showStandard=false;
918
-				}
919
-				else
917
+				} else
920 918
 					$container->setVisible(false);
921 919
 			}
922 920
 		}
@@ -1041,11 +1039,9 @@  discard block
 block discarded – undo
1041 1039
 					return TWizardStepType::Finish;
1042 1040
 				else
1043 1041
 					return TWizardStepType::Step;
1044
-			}
1045
-			else
1042
+			} else
1046 1043
 				return $type;
1047
-		}
1048
-		else
1044
+		} else
1049 1045
 			return $type;
1050 1046
 	}
1051 1047
 
@@ -1112,8 +1108,7 @@  discard block
 block discarded – undo
1112 1108
 				$this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex());
1113 1109
 				$this->_sideBarDataList->dataBind();
1114 1110
 			}
1115
-		}
1116
-		else
1111
+		} else
1117 1112
 		{
1118 1113
 			$this->_sideBar=new TPanel;
1119 1114
 			$this->getControls()->add($this->_sideBar);
@@ -1150,8 +1145,7 @@  discard block
 block discarded – undo
1150 1145
 			{
1151 1146
 				if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($newStepIndex))
1152 1147
 					$this->setActiveStepIndex($newStepIndex);
1153
-			}
1154
-			else
1148
+			} else
1155 1149
 				$this->setActiveStepIndex($stepIndex);
1156 1150
 		}
1157 1151
 	}
@@ -1295,8 +1289,7 @@  discard block
 block discarded – undo
1295 1289
 				$previousStepIndex=$history->pop();
1296 1290
 				if($activeStepIndex===$previousStepIndex && $history->getCount()>0)
1297 1291
 					$previousStepIndex=$history->pop();
1298
-			}
1299
-			else
1292
+			} else
1300 1293
 			{
1301 1294
 				$previousStepIndex=$history->peek();
1302 1295
 				if($activeStepIndex===$previousStepIndex && $history->getCount()>1)
@@ -1307,8 +1300,7 @@  discard block
 block discarded – undo
1307 1300
 				}
1308 1301
 			}
1309 1302
 			return $activeStepIndex===$previousStepIndex ? -1 : $previousStepIndex;
1310
-		}
1311
-		else
1303
+		} else
1312 1304
 			return -1;
1313 1305
 	}
1314 1306
 
@@ -1372,8 +1364,7 @@  discard block
 block discarded – undo
1372 1364
 					$navParam->setNextStepIndex($index+1);
1373 1365
 				$this->onNextButtonClick($navParam);
1374 1366
 				$handled=true;
1375
-			}
1376
-			else if(strcasecmp($command,self::CMD_PREVIOUS)===0)
1367
+			} else if(strcasecmp($command,self::CMD_PREVIOUS)===0)
1377 1368
 			{
1378 1369
 				if($type!==self::ST_FINISH && $type!==self::ST_STEP)
1379 1370
 					throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_PREVIOUS);
@@ -1382,8 +1373,7 @@  discard block
 block discarded – undo
1382 1373
 					$navParam->setNextStepIndex($prevIndex);
1383 1374
 				$this->onPreviousButtonClick($navParam);
1384 1375
 				$handled=true;
1385
-			}
1386
-			else if(strcasecmp($command,self::CMD_COMPLETE)===0)
1376
+			} else if(strcasecmp($command,self::CMD_COMPLETE)===0)
1387 1377
 			{
1388 1378
 				if($type!==self::ST_FINISH)
1389 1379
 					throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_COMPLETE);
@@ -1391,8 +1381,7 @@  discard block
 block discarded – undo
1391 1381
 					$navParam->setNextStepIndex($index+1);
1392 1382
 				$this->onCompleteButtonClick($navParam);
1393 1383
 				$handled=true;
1394
-			}
1395
-			else if(strcasecmp($command,self::CMD_MOVETO)===0)
1384
+			} else if(strcasecmp($command,self::CMD_MOVETO)===0)
1396 1385
 			{
1397 1386
 				if($this->_cancelNavigation)  // may be set in onSideBarButtonClick
1398 1387
 					$navParam->setCancelNavigation(true);
@@ -1408,8 +1397,7 @@  discard block
 block discarded – undo
1408 1397
 						}
1409 1398
 					if ($requestedIndex<0)
1410 1399
 						throw new TConfigurationException('wizard_step_invalid');
1411
-				}
1412
-				else
1400
+				} else
1413 1401
 					$requestedIndex=TPropertyValue::ensureInteger($requestedStep);
1414 1402
 				$navParam->setNextStepIndex($requestedIndex);
1415 1403
 				$handled=true;
@@ -1426,8 +1414,7 @@  discard block
 block discarded – undo
1426 1414
 							$this->getPreviousStepIndex(true);  // pop out the previous move from history
1427 1415
 						$this->setActiveStepIndex($nextStepIndex);
1428 1416
 					}
1429
-				}
1430
-				else
1417
+				} else
1431 1418
 					$this->setActiveStepIndex($index);
1432 1419
 				return true;
1433 1420
 			}
@@ -1705,8 +1692,7 @@  discard block
 block discarded – undo
1705 1692
 			parent::insertAt($index,$item);
1706 1693
 			$this->_wizard->getMultiView()->getViews()->insertAt($index,$item);
1707 1694
 			$this->_wizard->addedWizardStep($item);
1708
-		}
1709
-		else
1695
+		} else
1710 1696
 			throw new TInvalidDataTypeException('wizardstepcollection_wizardstep_required');
1711 1697
 	}
1712 1698
 
Please login to merge, or discard this patch.