Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created
framework/Web/UI/JuiControls/TJuiSortable.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function getWidgetID()
71 71
 	{
72
-	  return $this->getClientID() . '_0';
72
+	  return $this->getClientID().'_0';
73 73
 	}
74 74
 
75 75
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function getOptions()
80 80
 	{
81
-		if (($options=$this->getViewState('JuiOptions'))===null)
81
+		if(($options=$this->getViewState('JuiOptions'))===null)
82 82
 		{
83 83
 		  $options=new TJuiControlOptions($this);
84 84
 		  $this->setViewState('JuiOptions', $options);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	protected function getPostBackOptions()
111 111
 	{
112
-		$options = $this->getOptions()->toArray();
112
+		$options=$this->getOptions()->toArray();
113 113
 		// overload some events to add information about the items order
114 114
 		foreach($options as $event => $implementation)
115 115
 		{
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	protected function addAttributesToRender($writer)
127 127
 	{
128 128
 		parent::addAttributesToRender($writer);
129
-		$writer->addAttribute('id',$this->getClientID());
129
+		$writer->addAttribute('id', $this->getClientID());
130 130
 		$options=TJavaScript::encode($this->getPostBackOptions());
131 131
 		$cs=$this->getPage()->getClientScript();
132 132
 		$code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");";
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * Raises the OnActivate event
148 148
 	 * @param object $params event parameters
149 149
 	 */
150
-	public function onActivate ($params)
150
+	public function onActivate($params)
151 151
 	{
152 152
 		$this->raiseEvent('OnActivate', $this, $params);
153 153
 	}
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * Raises the OnBeforeStop event
157 157
 	 * @param object $params event parameters
158 158
 	 */
159
-	public function onBeforeStop ($params)
159
+	public function onBeforeStop($params)
160 160
 	{
161 161
 		$this->raiseEvent('OnBeforeStop', $this, $params);
162 162
 	}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * Raises the OnChange event
166 166
 	 * @param object $params event parameters
167 167
 	 */
168
-	public function onChange ($params)
168
+	public function onChange($params)
169 169
 	{
170 170
 		$this->raiseEvent('OnChange', $this, $params);
171 171
 	}
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 * Raises the OnCreate event
175 175
 	 * @param object $params event parameters
176 176
 	 */
177
-	public function onCreate ($params)
177
+	public function onCreate($params)
178 178
 	{
179 179
 		$this->raiseEvent('OnCreate', $this, $params);
180 180
 	}
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 * Raises the OnDeactivate event
184 184
 	 * @param object $params event parameters
185 185
 	 */
186
-	public function onDeactivate ($params)
186
+	public function onDeactivate($params)
187 187
 	{
188 188
 		$this->raiseEvent('OnDeactivate', $this, $params);
189 189
 	}
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * Raises the OnOut event
193 193
 	 * @param object $params event parameters
194 194
 	 */
195
-	public function onOut ($params)
195
+	public function onOut($params)
196 196
 	{
197 197
 		$this->raiseEvent('OnOut', $this, $params);
198 198
 	}
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 * Raises the OnOver event
202 202
 	 * @param object $params event parameters
203 203
 	 */
204
-	public function onOver ($params)
204
+	public function onOver($params)
205 205
 	{
206 206
 		$this->raiseEvent('OnOver', $this, $params);
207 207
 	}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	 * Raises the OnReceive event
211 211
 	 * @param object $params event parameters
212 212
 	 */
213
-	public function onReceive ($params)
213
+	public function onReceive($params)
214 214
 	{
215 215
 		$this->raiseEvent('OnReceive', $this, $params);
216 216
 	}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	 * Raises the OnRemove event
220 220
 	 * @param object $params event parameters
221 221
 	 */
222
-	public function onRemove ($params)
222
+	public function onRemove($params)
223 223
 	{
224 224
 		$this->raiseEvent('OnRemove', $this, $params);
225 225
 	}
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 * Raises the OnSort event
229 229
 	 * @param object $params event parameters
230 230
 	 */
231
-	public function onSort ($params)
231
+	public function onSort($params)
232 232
 	{
233 233
 		$this->raiseEvent('OnSort', $this, $params);
234 234
 	}
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 * Raises the OnStart event
238 238
 	 * @param object $params event parameters
239 239
 	 */
240
-	public function onStart ($params)
240
+	public function onStart($params)
241 241
 	{
242 242
 		$this->raiseEvent('OnStart', $this, $params);
243 243
 	}
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	 * Raises the OnStop event
247 247
 	 * @param object $params event parameters
248 248
 	 */
249
-	public function OnStop ($params)
249
+	public function OnStop($params)
250 250
 	{
251 251
 		$this->raiseEvent('OnStop', $this, $params);
252 252
 	}
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * Raises the OnUpdate event
256 256
 	 * @param object $params event parameters
257 257
 	 */
258
-	public function onUpdate ($params)
258
+	public function onUpdate($params)
259 259
 	{
260 260
 		$this->raiseEvent('OnUpdate', $this, $params);
261 261
 	}
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	public function getSortables()
291 291
 	{
292 292
 		if($this->_repeater===null)
293
-			$this->_repeater = $this->createRepeater();
293
+			$this->_repeater=$this->createRepeater();
294 294
 		return $this->_repeater;
295 295
 	}
296 296
 
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
 	 */
300 300
 	protected function createRepeater()
301 301
 	{
302
-		$repeater = new TRepeater;
302
+		$repeater=new TRepeater;
303 303
 		$repeater->setHeaderTemplate(new TJuiSortableTemplate('<ul id="'.$this->getWidgetID().'">'));
304 304
 		$repeater->setFooterTemplate(new TJuiSortableTemplate('</ul>'));
305
-		$repeater->setItemTemplate(new TTemplate('<li id="<%# $this->ItemIndex %>"><%# $this->Data %></li>',null));
305
+		$repeater->setItemTemplate(new TTemplate('<li id="<%# $this->ItemIndex %>"><%# $this->Data %></li>', null));
306 306
 		$repeater->setEmptyTemplate(new TJuiSortableTemplate('<ul></ul>'));
307 307
 		$this->getControls()->add($repeater);
308 308
 		return $repeater;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataGridColumn.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function setID($value)
90 90
 	{
91
-		if(!preg_match(TControl::ID_FORMAT,$value))
92
-			throw new TInvalidDataValueException('datagridcolumn_id_invalid',get_class($this),$value);
91
+		if(!preg_match(TControl::ID_FORMAT, $value))
92
+			throw new TInvalidDataValueException('datagridcolumn_id_invalid', get_class($this), $value);
93 93
 		$this->_id=$value;
94 94
 	}
95 95
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function getHeaderText()
100 100
 	{
101
-		return $this->getViewState('HeaderText','');
101
+		return $this->getViewState('HeaderText', '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function setHeaderText($value)
108 108
 	{
109
-		$this->setViewState('HeaderText',$value,'');
109
+		$this->setViewState('HeaderText', $value, '');
110 110
 	}
111 111
 
112 112
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function getHeaderImageUrl()
116 116
 	{
117
-		return $this->getViewState('HeaderImageUrl','');
117
+		return $this->getViewState('HeaderImageUrl', '');
118 118
 	}
119 119
 
120 120
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function setHeaderImageUrl($value)
124 124
 	{
125
-		$this->setViewState('HeaderImageUrl',$value,'');
125
+		$this->setViewState('HeaderImageUrl', $value, '');
126 126
 	}
127 127
 
128 128
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function getHeaderRenderer()
133 133
 	{
134
-		return $this->getViewState('HeaderRenderer','');
134
+		return $this->getViewState('HeaderRenderer', '');
135 135
 	}
136 136
 
137 137
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function setHeaderRenderer($value)
148 148
 	{
149
-		$this->setViewState('HeaderRenderer',$value,'');
149
+		$this->setViewState('HeaderRenderer', $value, '');
150 150
 	}
151 151
 
152 152
 	/**
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public function getHeaderStyle($createStyle=true)
157 157
 	{
158
-		if(($style=$this->getViewState('HeaderStyle',null))===null && $createStyle)
158
+		if(($style=$this->getViewState('HeaderStyle', null))===null && $createStyle)
159 159
 		{
160 160
 			$style=new TTableItemStyle;
161
-			$this->setViewState('HeaderStyle',$style,null);
161
+			$this->setViewState('HeaderStyle', $style, null);
162 162
 		}
163 163
 		return $style;
164 164
 	}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getFooterText()
170 170
 	{
171
-		return $this->getViewState('FooterText','');
171
+		return $this->getViewState('FooterText', '');
172 172
 	}
173 173
 
174 174
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setFooterText($value)
178 178
 	{
179
-		$this->setViewState('FooterText',$value,'');
179
+		$this->setViewState('FooterText', $value, '');
180 180
 	}
181 181
 
182 182
 	/**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	 */
186 186
 	public function getFooterRenderer()
187 187
 	{
188
-		return $this->getViewState('FooterRenderer','');
188
+		return $this->getViewState('FooterRenderer', '');
189 189
 	}
190 190
 
191 191
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function setFooterRenderer($value)
202 202
 	{
203
-		$this->setViewState('FooterRenderer',$value,'');
203
+		$this->setViewState('FooterRenderer', $value, '');
204 204
 	}
205 205
 
206 206
 	/**
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function getFooterStyle($createStyle=true)
211 211
 	{
212
-		if(($style=$this->getViewState('FooterStyle',null))===null && $createStyle)
212
+		if(($style=$this->getViewState('FooterStyle', null))===null && $createStyle)
213 213
 		{
214 214
 			$style=new TTableItemStyle;
215
-			$this->setViewState('FooterStyle',$style,null);
215
+			$this->setViewState('FooterStyle', $style, null);
216 216
 		}
217 217
 		return $style;
218 218
 	}
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
 	 */
224 224
 	public function getItemStyle($createStyle=true)
225 225
 	{
226
-		if(($style=$this->getViewState('ItemStyle',null))===null && $createStyle)
226
+		if(($style=$this->getViewState('ItemStyle', null))===null && $createStyle)
227 227
 		{
228 228
 			$style=new TTableItemStyle;
229
-			$this->setViewState('ItemStyle',$style,null);
229
+			$this->setViewState('ItemStyle', $style, null);
230 230
 		}
231 231
 		return $style;
232 232
 	}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public function getSortExpression()
238 238
 	{
239
-		return $this->getViewState('SortExpression','');
239
+		return $this->getViewState('SortExpression', '');
240 240
 	}
241 241
 
242 242
 	/**
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	public function setSortExpression($value)
246 246
 	{
247
-		$this->setViewState('SortExpression',$value,'');
247
+		$this->setViewState('SortExpression', $value, '');
248 248
 	}
249 249
 
250 250
 	/**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 */
254 254
 	public function getEnableCellGrouping()
255 255
 	{
256
-		return $this->getViewState('EnableCellGrouping',false);
256
+		return $this->getViewState('EnableCellGrouping', false);
257 257
 	}
258 258
 
259 259
 	/**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 */
263 263
 	public function setEnableCellGrouping($value)
264 264
 	{
265
-		$this->setViewState('EnableCellGrouping',TPropertyValue::ensureBoolean($value),false);
265
+		$this->setViewState('EnableCellGrouping', TPropertyValue::ensureBoolean($value), false);
266 266
 	}
267 267
 
268 268
 	/**
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	 */
271 271
 	public function getVisible($checkParents=true)
272 272
 	{
273
-		return $this->getViewState('Visible',true);
273
+		return $this->getViewState('Visible', true);
274 274
 	}
275 275
 
276 276
 	/**
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 */
279 279
 	public function setVisible($value)
280 280
 	{
281
-		$this->setViewState('Visible',TPropertyValue::ensureBoolean($value),true);
281
+		$this->setViewState('Visible', TPropertyValue::ensureBoolean($value), true);
282 282
 	}
283 283
 
284 284
 	/**
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
 	 * @param mixed the default value. If $key is not found in viewstate, $defaultValue will be returned
289 289
 	 * @return mixed the viewstate value corresponding to $key
290 290
 	 */
291
-	protected function getViewState($key,$defaultValue=null)
291
+	protected function getViewState($key, $defaultValue=null)
292 292
 	{
293
-		return isset($this->_viewState[$key])?$this->_viewState[$key]:$defaultValue;
293
+		return isset($this->_viewState[$key]) ? $this->_viewState[$key] : $defaultValue;
294 294
 	}
295 295
 
296 296
 	/**
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 * @param mixed the viewstate value to be set
302 302
 	 * @param mixed default value. If $value===$defaultValue, the item will be cleared from the viewstate.
303 303
 	 */
304
-	protected function setViewState($key,$value,$defaultValue=null)
304
+	protected function setViewState($key, $value, $defaultValue=null)
305 305
 	{
306 306
 		if($value===$defaultValue)
307 307
 			unset($this->_viewState[$key]);
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
 	 * @return mixed data value at the specified field
365 365
 	 * @throws TInvalidDataValueException if the data or the field is invalid.
366 366
 	 */
367
-	protected function getDataFieldValue($data,$field)
367
+	protected function getDataFieldValue($data, $field)
368 368
 	{
369
-		return TDataFieldAccessor::getDataFieldValue($data,$field);
369
+		return TDataFieldAccessor::getDataFieldValue($data, $field);
370 370
 	}
371 371
 
372 372
 
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
 	 * @param integer the index to the Columns property that the cell resides in.
382 382
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
383 383
 	 */
384
-	public function initializeCell($cell,$columnIndex,$itemType)
384
+	public function initializeCell($cell, $columnIndex, $itemType)
385 385
 	{
386 386
 		if($itemType===TListItemType::Header)
387
-			$this->initializeHeaderCell($cell,$columnIndex);
387
+			$this->initializeHeaderCell($cell, $columnIndex);
388 388
 		else if($itemType===TListItemType::Footer)
389
-			$this->initializeFooterCell($cell,$columnIndex);
389
+			$this->initializeFooterCell($cell, $columnIndex);
390 390
 	}
391 391
 
392 392
 	/**
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	 * @param TTableCell the cell to be initialized
415 415
 	 * @param integer the index to the Columns property that the cell resides in.
416 416
 	 */
417
-	protected function initializeHeaderCell($cell,$columnIndex)
417
+	protected function initializeHeaderCell($cell, $columnIndex)
418 418
 	{
419 419
 		$text=$this->getHeaderText();
420 420
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 			$sortExpression=$this->getSortExpression();
439 439
 			if(($url=$this->getHeaderImageUrl())!=='')
440 440
 			{
441
-				$button= new TImageButton;
441
+				$button=new TImageButton;
442 442
 				$button->setImageUrl($url);
443 443
 				$button->setCommandName(TDataGrid::CMD_SORT);
444 444
 				$button->setCommandParameter($sortExpression);
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 			}
450 450
 			else if($text!=='')
451 451
 			{
452
-				$button= new TLinkButton;
452
+				$button=new TLinkButton;
453 453
 				$button->setText($text);
454 454
 				$button->setCommandName(TDataGrid::CMD_SORT);
455 455
 				$button->setCommandParameter($sortExpression);
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 		{
464 464
 			if(($url=$this->getHeaderImageUrl())!=='')
465 465
 			{
466
-				$image= new TImage;
466
+				$image=new TImage;
467 467
 				$image->setImageUrl($url);
468 468
 				if($text!=='')
469 469
 					$image->setAlternateText($text);
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 	 * @param TTableCell the cell to be initialized
487 487
 	 * @param integer the index to the Columns property that the cell resides in.
488 488
 	 */
489
-	protected function initializeFooterCell($cell,$columnIndex)
489
+	protected function initializeFooterCell($cell, $columnIndex)
490 490
 	{
491 491
 		$text=$this->getFooterText();
492 492
 		if(($classPath=$this->getFooterRenderer())!=='')
@@ -522,13 +522,13 @@  discard block
 block discarded – undo
522 522
 	 * @param mixed the data to be formatted
523 523
 	 * @return string the formatted result
524 524
 	 */
525
-	protected function formatDataValue($formatString,$value)
525
+	protected function formatDataValue($formatString, $value)
526 526
 	{
527 527
 		if($formatString==='')
528 528
 			return TPropertyValue::ensureString($value);
529 529
 		else if($formatString[0]==='#')
530 530
 		{
531
-			$expression=strtr(substr($formatString,1),array('{0}'=>'$value'));
531
+			$expression=strtr(substr($formatString, 1), array('{0}'=>'$value'));
532 532
 			try
533 533
 			{
534 534
 				if(eval("\$result=$expression;")===false)
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
 			}
538 538
 			catch(Exception $e)
539 539
 			{
540
-				throw new TInvalidDataValueException('datagridcolumn_expression_invalid',get_class($this),$expression,$e->getMessage());
540
+				throw new TInvalidDataValueException('datagridcolumn_expression_invalid', get_class($this), $expression, $e->getMessage());
541 541
 			}
542 542
 		}
543 543
 		else
544
-			return sprintf($formatString,$value);
544
+			return sprintf($formatString, $value);
545 545
 	}
546 546
 }
547 547
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TBoundColumn.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function getItemRenderer()
53 53
 	{
54
-		return $this->getViewState('ItemRenderer','');
54
+		return $this->getViewState('ItemRenderer', '');
55 55
 	}
56 56
 
57 57
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function setItemRenderer($value)
72 72
 	{
73
-		$this->setViewState('ItemRenderer',$value,'');
73
+		$this->setViewState('ItemRenderer', $value, '');
74 74
 	}
75 75
 
76 76
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function getEditItemRenderer()
81 81
 	{
82
-		return $this->getViewState('EditItemRenderer','');
82
+		return $this->getViewState('EditItemRenderer', '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function setEditItemRenderer($value)
100 100
 	{
101
-		$this->setViewState('EditItemRenderer',$value,'');
101
+		$this->setViewState('EditItemRenderer', $value, '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getDataField()
108 108
 	{
109
-		return $this->getViewState('DataField','');
109
+		return $this->getViewState('DataField', '');
110 110
 	}
111 111
 
112 112
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function setDataField($value)
116 116
 	{
117
-		$this->setViewState('DataField',$value,'');
117
+		$this->setViewState('DataField', $value, '');
118 118
 	}
119 119
 
120 120
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getDataFormatString()
124 124
 	{
125
-		return $this->getViewState('DataFormatString','');
125
+		return $this->getViewState('DataFormatString', '');
126 126
 	}
127 127
 
128 128
 	/**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function setDataFormatString($value)
132 132
 	{
133
-		$this->setViewState('DataFormatString',$value,'');
133
+		$this->setViewState('DataFormatString', $value, '');
134 134
 	}
135 135
 
136 136
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function getReadOnly()
140 140
 	{
141
-		return $this->getViewState('ReadOnly',false);
141
+		return $this->getViewState('ReadOnly', false);
142 142
 	}
143 143
 
144 144
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function setReadOnly($value)
148 148
 	{
149
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
149
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
150 150
 	}
151 151
 
152 152
 	/**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 * @param integer the index to the Columns property that the cell resides in.
161 161
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
162 162
 	 */
163
-	public function initializeCell($cell,$columnIndex,$itemType)
163
+	public function initializeCell($cell, $columnIndex, $itemType)
164 164
 	{
165 165
 		$item=$cell->getParent();
166 166
 		switch($itemType)
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 				}
181 181
 				else
182 182
 					$control=$cell;
183
-				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
183
+				$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
184 184
 				break;
185 185
 			case TListItemType::EditItem:
186 186
 				if(!$this->getReadOnly())
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
 							$control->setItemType($item->getItemType());
195 195
 						}
196 196
 						$cell->getControls()->add($control);
197
-						$cell->registerObject('EditControl',$control);
197
+						$cell->registerObject('EditControl', $control);
198 198
 					}
199 199
 					else
200 200
 					{
201
-						$control= new TTextBox;
201
+						$control=new TTextBox;
202 202
 						$cell->getControls()->add($control);
203
-						$cell->registerObject('TextBox',$control);
203
+						$cell->registerObject('TextBox', $control);
204 204
 					}
205 205
 				}
206 206
 				else
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
 					else
219 219
 						$control=$cell;
220 220
 				}
221
-				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
221
+				$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
222 222
 				break;
223 223
 			default:
224
-				parent::initializeCell($cell,$columnIndex,$itemType);
224
+				parent::initializeCell($cell, $columnIndex, $itemType);
225 225
 				break;
226 226
 		}
227 227
 	}
@@ -231,15 +231,15 @@  discard block
 block discarded – undo
231 231
 	 * This method is invoked when datagrid performs databinding.
232 232
 	 * It populates the content of the cell with the relevant data from data source.
233 233
 	 */
234
-	public function dataBindColumn($sender,$param)
234
+	public function dataBindColumn($sender, $param)
235 235
 	{
236 236
 		$item=$sender->getNamingContainer();
237 237
 		$data=$item->getData();
238 238
 		$formatString=$this->getDataFormatString();
239 239
 		if(($field=$this->getDataField())!=='')
240
-			$value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field));
240
+			$value=$this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
241 241
 		else
242
-			$value=$this->formatDataValue($formatString,$data);
242
+			$value=$this->formatDataValue($formatString, $data);
243 243
 		$sender->setData($value);
244 244
 	}
245 245
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TSafeHtml.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function setRepackUTF7($value)
53 53
 	{
54
-		$this->setViewState('RepackUTF7',TPropertyValue::ensureBoolean($value),false);
54
+		$this->setViewState('RepackUTF7', TPropertyValue::ensureBoolean($value), false);
55 55
 	}
56 56
 
57 57
 	/**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function getRepackUTF7()
61 61
 	{
62
-		return $this->getViewState('RepackUTF7',false);
62
+		return $this->getViewState('RepackUTF7', false);
63 63
 	}
64 64
 
65 65
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function render($writer)
72 72
 	{
73
-		$htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
73
+		$htmlWriter=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
74 74
 		parent::render($htmlWriter);
75 75
 		$writer->write($this->parseSafeHtml($htmlWriter->flush()));
76 76
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	protected function parseSafeHtml($text)
84 84
 	{
85
-		$renderer = new TSafeHtmlParser;
85
+		$renderer=new TSafeHtmlParser;
86 86
 		return $renderer->parse($text, $this->getRepackUTF7());
87 87
 	}
88 88
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCompareValidator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	public function getDataType()
62 62
 	{
63
-		return $this->getViewState('DataType',TValidationDataType::String);
63
+		return $this->getViewState('DataType', TValidationDataType::String);
64 64
 	}
65 65
 
66 66
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function setDataType($value)
72 72
 	{
73
-		$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationDataType'),TValidationDataType::String);
73
+		$this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidationDataType'), TValidationDataType::String);
74 74
 	}
75 75
 
76 76
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function getControlToCompare()
80 80
 	{
81
-		return $this->getViewState('ControlToCompare','');
81
+		return $this->getViewState('ControlToCompare', '');
82 82
 	}
83 83
 
84 84
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function setControlToCompare($value)
89 89
 	{
90
-		$this->setViewState('ControlToCompare',$value,'');
90
+		$this->setViewState('ControlToCompare', $value, '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function getValueToCompare()
97 97
 	{
98
-		return $this->getViewState('ValueToCompare','');
98
+		return $this->getViewState('ValueToCompare', '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 */
105 105
 	public function setValueToCompare($value)
106 106
 	{
107
-		$this->setViewState('ValueToCompare',$value,'');
107
+		$this->setViewState('ValueToCompare', $value, '');
108 108
 	}
109 109
 
110 110
 	/**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function getOperator()
114 114
 	{
115
-		return $this->getViewState('Operator',TValidationCompareOperator::Equal);
115
+		return $this->getViewState('Operator', TValidationCompareOperator::Equal);
116 116
 	}
117 117
 
118 118
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function setOperator($value)
123 123
 	{
124
-		$this->setViewState('Operator',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationCompareOperator'),TValidationCompareOperator::Equal);
124
+		$this->setViewState('Operator', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidationCompareOperator'), TValidationCompareOperator::Equal);
125 125
 	}
126 126
 
127 127
 	/**
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 		else
164 164
 			$value2=$this->getValueToCompare();
165 165
 
166
-		$values = $this->getComparisonValues($value, $value2);
166
+		$values=$this->getComparisonValues($value, $value2);
167 167
 		switch($this->getOperator())
168 168
 		{
169 169
 			case TValidationCompareOperator::Equal:
170
-				return $values[0] == $values[1];
170
+				return $values[0]==$values[1];
171 171
 			case TValidationCompareOperator::NotEqual:
172
-				return $values[0] != $values[1];
172
+				return $values[0]!=$values[1];
173 173
 			case TValidationCompareOperator::GreaterThan:
174 174
 				return $values[0] > $values[1];
175 175
 			case TValidationCompareOperator::GreaterThanEqual:
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
 			case TValidationDataType::Float:
199 199
 				return array(floatval($value1), floatval($value2));
200 200
 			case TValidationDataType::Date:
201
-				$dateFormat = $this->getDateFormat();
201
+				$dateFormat=$this->getDateFormat();
202 202
 				if($dateFormat!=='')
203 203
 				{
204
-					$formatter = new TSimpleDateFormatter($dateFormat);
204
+					$formatter=new TSimpleDateFormatter($dateFormat);
205 205
 					return array($formatter->parse($value1), $formatter->parse($value2));
206 206
 				}
207 207
 				else
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	protected function getClientScriptOptions()
218 218
 	{
219
-		$options = parent::getClientScriptOptions();
219
+		$options=parent::getClientScriptOptions();
220 220
 		if(($name=$this->getControlToCompare())!=='')
221 221
 		{
222 222
 			if(($control=$this->findControl($name))!==null)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataTypeValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function getDataType()
51 51
 	{
52
-		return $this->getViewState('DataType','String');
52
+		return $this->getViewState('DataType', 'String');
53 53
 	}
54 54
 
55 55
 	/**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	public function setDataType($value)
60 60
 	{
61
-		$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationDataType'),TValidationDataType::String);
61
+		$this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidationDataType'), TValidationDataType::String);
62 62
 	}
63 63
 
64 64
 	/**
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
 		switch($this->getDataType())
93 93
 		{
94 94
 			case TValidationDataType::Integer:
95
-				return preg_match('/^[-+]?[0-9]+$/',trim($value));
95
+				return preg_match('/^[-+]?[0-9]+$/', trim($value));
96 96
 			case TValidationDataType::Float:
97
-				return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value));
97
+				return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value));
98 98
 			case TValidationDataType::Date:
99
-				$dateFormat = $this->getDateFormat();
99
+				$dateFormat=$this->getDateFormat();
100 100
 				if(strlen($dateFormat))
101 101
 				{
102
-					$formatter = new TSimpleDateFormatter($dateFormat);
102
+					$formatter=new TSimpleDateFormatter($dateFormat);
103 103
 					return $formatter->isValidDate($value);
104 104
 				}
105 105
 				else
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	protected function getClientScriptOptions()
116 116
 	{
117
-		$options = parent::getClientScriptOptions();
117
+		$options=parent::getClientScriptOptions();
118 118
 		$options['DataType']=$this->getDataType();
119 119
 		if(($dateFormat=$this->getDateFormat())!=='')
120 120
 			$options['DateFormat']=$dateFormat;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THyperLink.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	{
51 51
 		$isEnabled=$this->getEnabled(true);
52 52
 		if($this->getEnabled() && !$isEnabled)
53
-			$writer->addAttribute('disabled','disabled');
53
+			$writer->addAttribute('disabled', 'disabled');
54 54
 		parent::addAttributesToRender($writer);
55 55
 		if(($url=$this->getNavigateUrl())!=='' && $isEnabled)
56
-			$writer->addAttribute('href',$url);
56
+			$writer->addAttribute('href', $url);
57 57
 		if(($target=$this->getTarget())!=='')
58
-			$writer->addAttribute('target',$target);
58
+			$writer->addAttribute('target', $target);
59 59
 	}
60 60
 
61 61
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	protected function createImage($imageUrl)
89 89
 	{
90
-		$image= new TImage;
90
+		$image=new TImage;
91 91
 		$image->setImageUrl($imageUrl);
92 92
 		if(($width=$this->getImageWidth())!=='')
93 93
 			$image->setWidth($width);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	public function getText()
110 110
 	{
111
-		return $this->getViewState('Text','');
111
+		return $this->getViewState('Text', '');
112 112
 	}
113 113
 
114 114
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function setText($value)
119 119
 	{
120
-		$this->setViewState('Text',$value,'');
120
+		$this->setViewState('Text', $value, '');
121 121
 	}
122 122
 
123 123
 	/**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	public function getImageAlign()
127 127
 	{
128
-		return $this->getViewState('ImageAlign','');
128
+		return $this->getViewState('ImageAlign', '');
129 129
 	}
130 130
 
131 131
 	/**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	public function setImageAlign($value)
139 139
 	{
140
-		$this->setViewState('ImageAlign',$value,'');
140
+		$this->setViewState('ImageAlign', $value, '');
141 141
 	}
142 142
 
143 143
 	/**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public function getImageHeight()
147 147
 	{
148
-		return $this->getViewState('ImageHeight','');
148
+		return $this->getViewState('ImageHeight', '');
149 149
 	}
150 150
 
151 151
 	/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function setImageHeight($value)
156 156
 	{
157
-		$this->setViewSTate('ImageHeight',$value,'');
157
+		$this->setViewSTate('ImageHeight', $value, '');
158 158
 	}
159 159
 
160 160
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function getImageUrl()
164 164
 	{
165
-		return $this->getViewState('ImageUrl','');
165
+		return $this->getViewState('ImageUrl', '');
166 166
 	}
167 167
 
168 168
 	/**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 */
172 172
 	public function setImageUrl($value)
173 173
 	{
174
-		$this->setViewState('ImageUrl',$value,'');
174
+		$this->setViewState('ImageUrl', $value, '');
175 175
 	}
176 176
 
177 177
 	/**
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function getImageWidth()
181 181
 	{
182
-		return $this->getViewState('ImageWidth','');
182
+		return $this->getViewState('ImageWidth', '');
183 183
 	}
184 184
 
185 185
 	/**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 */
189 189
 	public function setImageWidth($value)
190 190
 	{
191
-		$this->setViewState('ImageWidth',$value,'');
191
+		$this->setViewState('ImageWidth', $value, '');
192 192
 	}
193 193
 
194 194
 	/**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 */
197 197
 	public function getNavigateUrl()
198 198
 	{
199
-		return $this->getViewState('NavigateUrl','');
199
+		return $this->getViewState('NavigateUrl', '');
200 200
 	}
201 201
 
202 202
 	/**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	 */
206 206
 	public function setNavigateUrl($value)
207 207
 	{
208
-		$this->setViewState('NavigateUrl',$value,'');
208
+		$this->setViewState('NavigateUrl', $value, '');
209 209
 	}
210 210
 
211 211
 	/**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 	 */
240 240
 	public function getTarget()
241 241
 	{
242
-		return $this->getViewState('Target','');
242
+		return $this->getViewState('Target', '');
243 243
 	}
244 244
 
245 245
 	/**
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function setTarget($value)
250 250
 	{
251
-		$this->setViewState('Target',$value,'');
251
+		$this->setViewState('Target', $value, '');
252 252
 	}
253 253
 }
254 254
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTextBox.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	protected function getTagName()
83 83
 	{
84
-		return ($this->getTextMode()==='MultiLine')?'textarea':'input';
84
+		return ($this->getTextMode()==='MultiLine') ? 'textarea' : 'input';
85 85
 	}
86 86
 
87 87
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function getEnableClientScript()
91 91
 	{
92
-		return $this->getViewState('EnableClientScript',true);
92
+		return $this->getViewState('EnableClientScript', true);
93 93
 	}
94 94
 
95 95
 	/**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function setEnableClientScript($value)
99 99
 	{
100
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
100
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
101 101
 	}
102 102
 
103 103
 	/**
@@ -110,106 +110,106 @@  discard block
 block discarded – undo
110 110
 		$page=$this->getPage();
111 111
 		$page->ensureRenderInForm($this);
112 112
 		if(($uid=$this->getUniqueID())!=='')
113
-			$writer->addAttribute('name',$uid);
113
+			$writer->addAttribute('name', $uid);
114 114
 		if(($textMode=$this->getTextMode())===TTextBoxMode::MultiLine)
115 115
 		{
116
-			if(($rows=$this->getRows())<=0)
116
+			if(($rows=$this->getRows()) <= 0)
117 117
 				$rows=self::DEFAULT_ROWS;
118
-			if(($cols=$this->getColumns())<=0)
118
+			if(($cols=$this->getColumns()) <= 0)
119 119
 				$cols=self::DEFAULT_COLUMNS;
120
-			$writer->addAttribute('rows',"$rows");
121
-			$writer->addAttribute('cols',"$cols");
120
+			$writer->addAttribute('rows', "$rows");
121
+			$writer->addAttribute('cols', "$cols");
122 122
 			if(!$this->getWrap())
123
-				$writer->addAttribute('wrap','off');
123
+				$writer->addAttribute('wrap', 'off');
124 124
 		}
125 125
 		else
126 126
 		{
127 127
 			switch($textMode)
128 128
 			{
129 129
 				case TTextBoxMode::Password:
130
-					$writer->addAttribute('type','password');
130
+					$writer->addAttribute('type', 'password');
131 131
 					break;
132 132
 				case TTextBoxMode::Color:
133
-					$writer->addAttribute('type','color');
133
+					$writer->addAttribute('type', 'color');
134 134
 					break;
135 135
 				case TTextBoxMode::Date:
136
-					$writer->addAttribute('type','date');
136
+					$writer->addAttribute('type', 'date');
137 137
 					break;
138 138
 				case TTextBoxMode::Datetime:
139
-					$writer->addAttribute('type','datetime');
139
+					$writer->addAttribute('type', 'datetime');
140 140
 					break;
141 141
 				case TTextBoxMode::DatetimeLocal:
142
-					$writer->addAttribute('type','datetime-local');
142
+					$writer->addAttribute('type', 'datetime-local');
143 143
 					break;
144 144
 				case TTextBoxMode::Email:
145
-					$writer->addAttribute('type','email');
145
+					$writer->addAttribute('type', 'email');
146 146
 					break;
147 147
 				case TTextBoxMode::Month:
148
-					$writer->addAttribute('type','month');
148
+					$writer->addAttribute('type', 'month');
149 149
 					break;
150 150
 				case TTextBoxMode::Number:
151
-					$writer->addAttribute('type','number');
151
+					$writer->addAttribute('type', 'number');
152 152
 					break;
153 153
 				case TTextBoxMode::Range:
154
-					$writer->addAttribute('type','range');
154
+					$writer->addAttribute('type', 'range');
155 155
 					break;
156 156
 				case TTextBoxMode::Search:
157
-					$writer->addAttribute('type','search');
157
+					$writer->addAttribute('type', 'search');
158 158
 					break;
159 159
 				case TTextBoxMode::Tel:
160
-					$writer->addAttribute('type','tel');
160
+					$writer->addAttribute('type', 'tel');
161 161
 					break;
162 162
 				case TTextBoxMode::Time:
163
-					$writer->addAttribute('type','time');
163
+					$writer->addAttribute('type', 'time');
164 164
 					break;
165 165
 				case TTextBoxMode::Url:
166
-					$writer->addAttribute('type','url');
166
+					$writer->addAttribute('type', 'url');
167 167
 					break;
168 168
 				case TTextBoxMode::Week:
169
-					$writer->addAttribute('type','week');
169
+					$writer->addAttribute('type', 'week');
170 170
 					break;
171 171
 				case TTextBoxMode::SingleLine:
172 172
 				default:
173
-					$writer->addAttribute('type','text');
173
+					$writer->addAttribute('type', 'text');
174 174
 					break;
175 175
 			}
176 176
 
177
-			if(($text=$this->getText())!=='' && ($textMode !== TTextBoxMode::Password || $this->getPersistPassword()))
178
-				$writer->addAttribute('value',$text);					
177
+			if(($text=$this->getText())!=='' && ($textMode!==TTextBoxMode::Password || $this->getPersistPassword()))
178
+				$writer->addAttribute('value', $text);					
179 179
 
180 180
 			if(($act=$this->getAutoCompleteType())!=='None')
181 181
 			{
182 182
 				if($act==='Disabled')
183
-					$writer->addAttribute('autocomplete','off');
183
+					$writer->addAttribute('autocomplete', 'off');
184 184
 				else if($act==='Search')
185
-					$writer->addAttribute('vcard_name','search');
185
+					$writer->addAttribute('vcard_name', 'search');
186 186
 				else if($act==='HomeCountryRegion')
187
-					$writer->addAttribute('vcard_name','HomeCountry');
187
+					$writer->addAttribute('vcard_name', 'HomeCountry');
188 188
 				else if($act==='BusinessCountryRegion')
189
-					$writer->addAttribute('vcard_name','BusinessCountry');
189
+					$writer->addAttribute('vcard_name', 'BusinessCountry');
190 190
 				else
191 191
 				{
192
-					if(strpos($act,'Business')===0)
193
-						$act='Business'.'.'.substr($act,8);
194
-					else if(strpos($act,'Home')===0)
195
-						$act='Home'.'.'.substr($act,4);
196
-					$writer->addAttribute('vcard_name','vCard.'.$act);
192
+					if(strpos($act, 'Business')===0)
193
+						$act='Business'.'.'.substr($act, 8);
194
+					else if(strpos($act, 'Home')===0)
195
+						$act='Home'.'.'.substr($act, 4);
196
+					$writer->addAttribute('vcard_name', 'vCard.'.$act);
197 197
 				}
198 198
 			}
199 199
 
200
-			if(($cols=$this->getColumns())>0)
201
-				$writer->addAttribute('size',"$cols");
202
-			if(($maxLength=$this->getMaxLength())>0)
203
-				$writer->addAttribute('maxlength',"$maxLength");
200
+			if(($cols=$this->getColumns()) > 0)
201
+				$writer->addAttribute('size', "$cols");
202
+			if(($maxLength=$this->getMaxLength()) > 0)
203
+				$writer->addAttribute('maxlength', "$maxLength");
204 204
 		}
205 205
 		if($this->getReadOnly())
206
-			$writer->addAttribute('readonly','readonly');
206
+			$writer->addAttribute('readonly', 'readonly');
207 207
 		$isEnabled=$this->getEnabled(true);
208 208
 		if(!$isEnabled && $this->getEnabled())  // in this case parent will not render 'disabled'
209
-			$writer->addAttribute('disabled','disabled');
209
+			$writer->addAttribute('disabled', 'disabled');
210 210
 		if($isEnabled
211 211
 			&& $this->getEnableClientScript()
212
-			&& ( $this->getAutoPostBack() || $textMode===TTextBoxMode::SingleLine)
212
+			&& ($this->getAutoPostBack() || $textMode===TTextBoxMode::SingleLine)
213 213
 			&& $page->getClientSupportsJavaScript())
214 214
 		{
215 215
 			$this->renderClientControlScript($writer);
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 	 */
223 223
 	protected function renderClientControlScript($writer)
224 224
 	{
225
-		$writer->addAttribute('id',$this->getClientID());
226
-		$cs = $this->getPage()->getClientScript();
227
-		$cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
225
+		$writer->addAttribute('id', $this->getClientID());
226
+		$cs=$this->getPage()->getClientScript();
227
+		$cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions());
228 228
 	}
229 229
 
230 230
 	/**
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
 	 */
244 244
 	protected function getPostBackOptions()
245 245
 	{
246
-		$options['ID'] = $this->getClientID();
247
-		$options['EventTarget'] = $this->getUniqueID();
248
-		$options['AutoPostBack'] = $this->getAutoPostBack();
249
-		$options['CausesValidation'] = $this->getCausesValidation();
250
-		$options['ValidationGroup'] = $this->getValidationGroup();
251
-		$options['TextMode'] = $this->getTextMode();
246
+		$options['ID']=$this->getClientID();
247
+		$options['EventTarget']=$this->getUniqueID();
248
+		$options['AutoPostBack']=$this->getAutoPostBack();
249
+		$options['CausesValidation']=$this->getCausesValidation();
250
+		$options['ValidationGroup']=$this->getValidationGroup();
251
+		$options['TextMode']=$this->getTextMode();
252 252
 		return $options;
253 253
 	}
254 254
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 * @param array the input data collection
260 260
 	 * @return boolean whether the data of the component has been changed
261 261
 	 */
262
-	public function loadPostData($key,$values)
262
+	public function loadPostData($key, $values)
263 263
 	{
264 264
 		$value=$values[$key];
265 265
 		if($this->getAutoTrim())
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	public function onTextChanged($param)
322 322
 	{
323
-		$this->raiseEvent('OnTextChanged',$this,$param);
323
+		$this->raiseEvent('OnTextChanged', $this, $param);
324 324
 	}
325 325
 
326 326
 	/**
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 	 */
365 365
 	public function getAutoCompleteType()
366 366
 	{
367
-		return $this->getViewState('AutoCompleteType',TTextBoxAutoCompleteType::None);
367
+		return $this->getViewState('AutoCompleteType', TTextBoxAutoCompleteType::None);
368 368
 	}
369 369
 
370 370
 	/**
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 	 */
374 374
 	public function setAutoCompleteType($value)
375 375
 	{
376
-		$this->setViewState('AutoCompleteType',TPropertyValue::ensureEnum($value,'TTextBoxAutoCompleteType'),TTextBoxAutoCompleteType::None);
376
+		$this->setViewState('AutoCompleteType', TPropertyValue::ensureEnum($value, 'TTextBoxAutoCompleteType'), TTextBoxAutoCompleteType::None);
377 377
 	}
378 378
 
379 379
 	/**
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 */
384 384
 	public function getAutoPostBack()
385 385
 	{
386
-		return $this->getViewState('AutoPostBack',false);
386
+		return $this->getViewState('AutoPostBack', false);
387 387
 	}
388 388
 
389 389
 	/**
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	 */
395 395
 	public function setAutoPostBack($value)
396 396
 	{
397
-		$this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),false);
397
+		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), false);
398 398
 	}
399 399
 
400 400
 	/**
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 	 */
403 403
 	public function getAutoTrim()
404 404
 	{
405
-		return $this->getViewState('AutoTrim',false);
405
+		return $this->getViewState('AutoTrim', false);
406 406
 	}
407 407
 
408 408
 	/**
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 	 */
412 412
 	public function setAutoTrim($value)
413 413
 	{
414
-		$this->setViewState('AutoTrim',TPropertyValue::ensureBoolean($value),false);
414
+		$this->setViewState('AutoTrim', TPropertyValue::ensureBoolean($value), false);
415 415
 	}
416 416
 
417 417
 	/**
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	 */
420 420
 	public function getCausesValidation()
421 421
 	{
422
-		return $this->getViewState('CausesValidation',true);
422
+		return $this->getViewState('CausesValidation', true);
423 423
 	}
424 424
 
425 425
 	/**
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 	 */
428 428
 	public function setCausesValidation($value)
429 429
 	{
430
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
430
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
431 431
 	}
432 432
 
433 433
 	/**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	 */
436 436
 	public function getColumns()
437 437
 	{
438
-		return $this->getViewState('Columns',0);
438
+		return $this->getViewState('Columns', 0);
439 439
 	}
440 440
 
441 441
 	/**
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 	 */
445 445
 	public function setColumns($value)
446 446
 	{
447
-		$this->setViewState('Columns',TPropertyValue::ensureInteger($value),0);
447
+		$this->setViewState('Columns', TPropertyValue::ensureInteger($value), 0);
448 448
 	}
449 449
 
450 450
 	/**
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 	 */
453 453
 	public function getMaxLength()
454 454
 	{
455
-		return $this->getViewState('MaxLength',0);
455
+		return $this->getViewState('MaxLength', 0);
456 456
 	}
457 457
 
458 458
 	/**
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 	 */
462 462
 	public function setMaxLength($value)
463 463
 	{
464
-		$this->setViewState('MaxLength',TPropertyValue::ensureInteger($value),0);
464
+		$this->setViewState('MaxLength', TPropertyValue::ensureInteger($value), 0);
465 465
 	}
466 466
 
467 467
 	/**
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	 */
470 470
 	public function getReadOnly()
471 471
 	{
472
-		return $this->getViewState('ReadOnly',false);
472
+		return $this->getViewState('ReadOnly', false);
473 473
 	}
474 474
 
475 475
 	/**
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 	 */
478 478
 	public function setReadOnly($value)
479 479
 	{
480
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
480
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
481 481
 	}
482 482
 
483 483
 	/**
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 	 */
486 486
 	public function getRows()
487 487
 	{
488
-		return $this->getViewState('Rows',self::DEFAULT_ROWS);
488
+		return $this->getViewState('Rows', self::DEFAULT_ROWS);
489 489
 	}
490 490
 
491 491
 	/**
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 	 */
495 495
 	public function setRows($value)
496 496
 	{
497
-		$this->setViewState('Rows',TPropertyValue::ensureInteger($value),self::DEFAULT_ROWS);
497
+		$this->setViewState('Rows', TPropertyValue::ensureInteger($value), self::DEFAULT_ROWS);
498 498
 	}
499 499
 
500 500
 	/**
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 	 */
503 503
 	public function getPersistPassword()
504 504
 	{
505
-		return $this->getViewState('PersistPassword',false);
505
+		return $this->getViewState('PersistPassword', false);
506 506
 	}
507 507
 
508 508
 	/**
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	 */
511 511
 	public function setPersistPassword($value)
512 512
 	{
513
-		$this->setViewState('PersistPassword',TPropertyValue::ensureBoolean($value),false);
513
+		$this->setViewState('PersistPassword', TPropertyValue::ensureBoolean($value), false);
514 514
 	}
515 515
 
516 516
 	/**
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 	 */
519 519
 	public function getText()
520 520
 	{
521
-		return $this->getViewState('Text','');
521
+		return $this->getViewState('Text', '');
522 522
 	}
523 523
 
524 524
 	/**
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
 	 */
528 528
 	public function setText($value)
529 529
 	{
530
-		$this->setViewState('Text',TPropertyValue::ensureString($value),'');
531
-		$this->_safeText = null;
530
+		$this->setViewState('Text', TPropertyValue::ensureString($value), '');
531
+		$this->_safeText=null;
532 532
 	}
533 533
 
534 534
 	/**
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 	protected function getSafeTextParser()
574 574
 	{
575 575
 		if(!self::$_safeTextParser)
576
-			self::$_safeTextParser= new TSafeHtmlParser;
576
+			self::$_safeTextParser=new TSafeHtmlParser;
577 577
 		return self::$_safeTextParser;
578 578
 	}
579 579
 
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 	 */
583 583
 	public function getTextMode()
584 584
 	{
585
-		return $this->getViewState('TextMode',TTextBoxMode::SingleLine);
585
+		return $this->getViewState('TextMode', TTextBoxMode::SingleLine);
586 586
 	}
587 587
 
588 588
 	/**
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 	 */
593 593
 	public function setTextMode($value)
594 594
 	{
595
-		$this->setViewState('TextMode',TPropertyValue::ensureEnum($value,'TTextBoxMode'),TTextBoxMode::SingleLine);
595
+		$this->setViewState('TextMode', TPropertyValue::ensureEnum($value, 'TTextBoxMode'), TTextBoxMode::SingleLine);
596 596
 	}
597 597
 
598 598
 	/**
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 	 */
601 601
 	public function getValidationGroup()
602 602
 	{
603
-		return $this->getViewState('ValidationGroup','');
603
+		return $this->getViewState('ValidationGroup', '');
604 604
 	}
605 605
 
606 606
 	/**
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	 */
609 609
 	public function setValidationGroup($value)
610 610
 	{
611
-		$this->setViewState('ValidationGroup',$value,'');
611
+		$this->setViewState('ValidationGroup', $value, '');
612 612
 	}
613 613
 
614 614
 	/**
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 	 */
617 617
 	public function getWrap()
618 618
 	{
619
-		return $this->getViewState('Wrap',true);
619
+		return $this->getViewState('Wrap', true);
620 620
 	}
621 621
 
622 622
 	/**
@@ -625,6 +625,6 @@  discard block
 block discarded – undo
625 625
 	 */
626 626
 	public function setWrap($value)
627 627
 	{
628
-		$this->setViewState('Wrap',TPropertyValue::ensureBoolean($value),true);
628
+		$this->setViewState('Wrap', TPropertyValue::ensureBoolean($value), true);
629 629
 	}
630 630
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRangeValidator.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function getMinValue()
67 67
 	{
68
-		return $this->getViewState('MinValue','');
68
+		return $this->getViewState('MinValue', '');
69 69
 	}
70 70
 
71 71
 	/**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function setMinValue($value)
76 76
 	{
77
-		$this->setViewState('MinValue',TPropertyValue::ensureString($value),'');
77
+		$this->setViewState('MinValue', TPropertyValue::ensureString($value), '');
78 78
 	}
79 79
 
80 80
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function getMaxValue()
84 84
 	{
85
-		return $this->getViewState('MaxValue','');
85
+		return $this->getViewState('MaxValue', '');
86 86
 	}
87 87
 
88 88
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function setMaxValue($value)
93 93
 	{
94
-		$this->setViewState('MaxValue',TPropertyValue::ensureString($value),'');
94
+		$this->setViewState('MaxValue', TPropertyValue::ensureString($value), '');
95 95
 	}
96 96
 
97 97
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function setStrictComparison($value)
101 101
 	{
102
-		$this->setViewState('StrictComparison', TPropertyValue::ensureBoolean($value),false);
102
+		$this->setViewState('StrictComparison', TPropertyValue::ensureBoolean($value), false);
103 103
 	}
104 104
 
105 105
 	/**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function getDataType()
118 118
 	{
119
-		return $this->getViewState('DataType',TRangeValidationDataType::String);
119
+		return $this->getViewState('DataType', TRangeValidationDataType::String);
120 120
 	}
121 121
 
122 122
 	/**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	public function setDataType($value)
127 127
 	{
128
-		$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TRangeValidationDataType'),TRangeValidationDataType::String);
128
+		$this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TRangeValidationDataType'), TRangeValidationDataType::String);
129 129
 	}
130 130
 
131 131
 	/**
@@ -198,16 +198,16 @@  discard block
 block discarded – undo
198 198
 		$minValue=$this->getMinValue();
199 199
 		$maxValue=$this->getMaxValue();
200 200
 
201
-		$valid=preg_match('/^[-+]?[0-9]+$/',trim($value));
201
+		$valid=preg_match('/^[-+]?[0-9]+$/', trim($value));
202 202
 		$value=intval($value);
203 203
 		if($minValue!=='')
204 204
 			$valid=$valid && $this->isGreaterThan($value, intval($minValue));
205 205
 		if($maxValue!=='')
206
-			$valid=$valid && $this->isLessThan($value,intval($maxValue));
206
+			$valid=$valid && $this->isLessThan($value, intval($maxValue));
207 207
 		return $valid;
208 208
 	}
209 209
 
210
-	protected function isLessThan($left,$right)
210
+	protected function isLessThan($left, $right)
211 211
 	{
212 212
 		return $this->getStrictComparison() ? $left < $right : $left <= $right;
213 213
 	}
@@ -227,12 +227,12 @@  discard block
 block discarded – undo
227 227
 		$minValue=$this->getMinValue();
228 228
 		$maxValue=$this->getMaxValue();
229 229
 
230
-		$valid=preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value));
230
+		$valid=preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value));
231 231
 		$value=floatval($value);
232 232
 		if($minValue!=='')
233
-			$valid=$valid && $this->isGreaterThan($value,floatval($minValue));
233
+			$valid=$valid && $this->isGreaterThan($value, floatval($minValue));
234 234
 		if($maxValue!=='')
235
-			$valid=$valid && $this->isLessThan($value,floatval($maxValue));
235
+			$valid=$valid && $this->isLessThan($value, floatval($maxValue));
236 236
 		return $valid;
237 237
 	}
238 238
 
@@ -249,24 +249,24 @@  discard block
 block discarded – undo
249 249
 
250 250
 		$valid=true;
251 251
 
252
-		$dateFormat = $this->getDateFormat();
252
+		$dateFormat=$this->getDateFormat();
253 253
 		if($dateFormat!=='')
254 254
 		{
255
-			$formatter= new TSimpleDateFormatter($dateFormat);
256
-			$value = $formatter->parse($value);
255
+			$formatter=new TSimpleDateFormatter($dateFormat);
256
+			$value=$formatter->parse($value);
257 257
 			if($minValue!=='')
258
-				$valid=$valid && $this->isGreaterThan($value,$formatter->parse($minValue));
258
+				$valid=$valid && $this->isGreaterThan($value, $formatter->parse($minValue));
259 259
 			if($maxValue!=='')
260
-				$valid=$valid && $this->isLessThan($value,$formatter->parse($maxValue));
260
+				$valid=$valid && $this->isLessThan($value, $formatter->parse($maxValue));
261 261
 			return $valid;
262 262
 		}
263 263
 		else
264 264
 		{
265 265
 			$value=strtotime($value);
266 266
 			if($minValue!=='')
267
-				$valid=$valid && $this->isGreaterThan($value,strtotime($minValue));
267
+				$valid=$valid && $this->isGreaterThan($value, strtotime($minValue));
268 268
 			if($maxValue!=='')
269
-				$valid=$valid && $this->isLessThan($value,strtotime($maxValue));
269
+				$valid=$valid && $this->isLessThan($value, strtotime($maxValue));
270 270
 			return $valid;
271 271
 		}
272 272
 	}
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 
285 285
 		$valid=true;
286 286
 		if($minValue!=='')
287
-			$valid=$valid && $this->isGreaterThan(strcmp($value,$minValue),0);
287
+			$valid=$valid && $this->isGreaterThan(strcmp($value, $minValue), 0);
288 288
 		if($maxValue!=='')
289
-			$valid=$valid && $this->isLessThan(strcmp($value,$maxValue),0);
289
+			$valid=$valid && $this->isLessThan(strcmp($value, $maxValue), 0);
290 290
 		return $valid;
291 291
 	}
292 292
 
@@ -300,20 +300,20 @@  discard block
 block discarded – undo
300 300
 		$maxValue=$this->getMaxValue();
301 301
 
302 302
 		$valid=true;
303
-		$charset = $this->getCharset();
303
+		$charset=$this->getCharset();
304 304
 		if($charset==='')
305 305
 		{
306
-			$app= $this->getApplication()->getGlobalization();
307
-			$charset = $app ? $app->getCharset() : null;
306
+			$app=$this->getApplication()->getGlobalization();
307
+			$charset=$app ? $app->getCharset() : null;
308 308
 			if(!$charset)
309
-				$charset = 'UTF-8';
309
+				$charset='UTF-8';
310 310
 		}
311 311
 
312
-		$length = iconv_strlen($value, $charset);
312
+		$length=iconv_strlen($value, $charset);
313 313
 		if($minValue!=='')
314
-			$valid = $valid && $this->isGreaterThan($length,intval($minValue));
314
+			$valid=$valid && $this->isGreaterThan($length, intval($minValue));
315 315
 		if($maxValue!=='')
316
-			$valid = $valid && $this->isLessThan($length,intval($maxValue));
316
+			$valid=$valid && $this->isLessThan($length, intval($maxValue));
317 317
 		return $valid;
318 318
 	}
319 319
 
Please login to merge, or discard this patch.