Completed
Push — prado4-sauce ( 31ba42...77d75b )
by Fabio
16:20 queued 08:27
created
framework/Web/UI/WebControls/TBoundColumn.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -178,8 +178,7 @@  discard block
 block discarded – undo
178 178
 						$control->setItemType($item->getItemType());
179 179
 					}
180 180
 					$cell->getControls()->add($control);
181
-				}
182
-				else
181
+				} else
183 182
 					$control=$cell;
184 183
 				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
185 184
 				break;
@@ -196,15 +195,13 @@  discard block
 block discarded – undo
196 195
 						}
197 196
 						$cell->getControls()->add($control);
198 197
 						$cell->registerObject('EditControl',$control);
199
-					}
200
-					else
198
+					} else
201 199
 					{
202 200
 						$control=Prado::createComponent('System.Web.UI.WebControls.TTextBox');
203 201
 						$cell->getControls()->add($control);
204 202
 						$cell->registerObject('TextBox',$control);
205 203
 					}
206
-				}
207
-				else
204
+				} else
208 205
 				{
209 206
 					if(($classPath=$this->getItemRenderer())!=='')
210 207
 					{
@@ -215,8 +212,7 @@  discard block
 block discarded – undo
215 212
 							$control->setItemType($item->getItemType());
216 213
 						}
217 214
 						$cell->getControls()->add($control);
218
-					}
219
-					else
215
+					} else
220 216
 						$control=$cell;
221 217
 				}
222 218
 				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
Please login to merge, or discard this 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/TCheckBoxColumn.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public function getDataField()
49 49
 	{
50
-		return $this->getViewState('DataField','');
50
+		return $this->getViewState('DataField', '');
51 51
 	}
52 52
 
53 53
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setDataField($value)
57 57
 	{
58
-		$this->setViewState('DataField',$value,'');
58
+		$this->setViewState('DataField', $value, '');
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function getReadOnly()
65 65
 	{
66
-		return $this->getViewState('ReadOnly',false);
66
+		return $this->getViewState('ReadOnly', false);
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setReadOnly($value)
73 73
 	{
74
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
74
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
75 75
 	}
76 76
 
77 77
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @param integer the index to the Columns property that the cell resides in.
85 85
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
86 86
 	 */
87
-	public function initializeCell($cell,$columnIndex,$itemType)
87
+	public function initializeCell($cell, $columnIndex, $itemType)
88 88
 	{
89 89
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
90 90
 		{
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
 				$checkBox->setEnabled(false);
94 94
 			$cell->setHorizontalAlign('Center');
95 95
 			$cell->getControls()->add($checkBox);
96
-			$cell->registerObject('CheckBox',$checkBox);
96
+			$cell->registerObject('CheckBox', $checkBox);
97 97
 			if($this->getDataField()!=='')
98
-				$checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
98
+				$checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
99 99
 		}
100 100
 		else
101
-			parent::initializeCell($cell,$columnIndex,$itemType);
101
+			parent::initializeCell($cell, $columnIndex, $itemType);
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
 	 * This method is invoked when datagrid performs databinding.
107 107
 	 * It populates the content of the cell with the relevant data from data source.
108 108
 	 */
109
-	public function dataBindColumn($sender,$param)
109
+	public function dataBindColumn($sender, $param)
110 110
 	{
111 111
 		$item=$sender->getNamingContainer();
112 112
 		$data=$item->getData();
113 113
 		if(($field=$this->getDataField())!=='')
114
-			$value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data,$field));
114
+			$value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data, $field));
115 115
 		else
116 116
 			$value=TPropertyValue::ensureBoolean($data);
117 117
 		if($sender instanceof TCheckBox)
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDropDownListColumn.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -270,8 +270,7 @@  discard block
 block discarded – undo
270 270
 					$cell->getControls()->add($listControl);
271 271
 					$cell->registerObject('DropDownList',$listControl);
272 272
 					$control=$listControl;
273
-				}
274
-				else
273
+				} else
275 274
 					$control=$cell;
276 275
 				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
277 276
 				break;
@@ -307,8 +306,7 @@  discard block
 block discarded – undo
307 306
 				$value=$text;
308 307
 			$formatString=$this->getDataTextFormatString();
309 308
 			$text=$this->formatDataValue($formatString,$text);
310
-		}
311
-		else
309
+		} else
312 310
 			$text=$value;
313 311
 		if($sender instanceof TTableCell)
314 312
 			$sender->setText($text);
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		parent::loadState($state);
78 78
 		$this->_stateLoaded=true;
79 79
 		if(!$this->_dataBound)
80
-			$this->_listControl->getItems()->loadState($this->getViewState('Items',null));
80
+			$this->_listControl->getItems()->loadState($this->getViewState('Items', null));
81 81
 	}
82 82
 
83 83
 	/**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function saveState()
88 88
 	{
89
-		$this->setViewState('Items',$this->_listControl->getItems()->saveState(),null);
89
+		$this->setViewState('Items', $this->_listControl->getItems()->saveState(), null);
90 90
 		return parent::saveState();
91 91
 	}
92 92
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function getDataTextField()
113 113
 	{
114
-		return $this->getViewState('DataTextField','');
114
+		return $this->getViewState('DataTextField', '');
115 115
 	}
116 116
 
117 117
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function setDataTextField($value)
124 124
 	{
125
-		$this->setViewState('DataTextField',$value,'');
125
+		$this->setViewState('DataTextField', $value, '');
126 126
 	}
127 127
 
128 128
 	/**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function getDataTextFormatString()
132 132
 	{
133
-		return $this->getViewState('DataTextFormatString','');
133
+		return $this->getViewState('DataTextFormatString', '');
134 134
 	}
135 135
 
136 136
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function setDataTextFormatString($value)
140 140
 	{
141
-		$this->setViewState('DataTextFormatString',$value,'');
141
+		$this->setViewState('DataTextFormatString', $value, '');
142 142
 	}
143 143
 
144 144
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function getDataValueField()
148 148
 	{
149
-		return $this->getViewState('DataValueField','');
149
+		return $this->getViewState('DataValueField', '');
150 150
 	}
151 151
 
152 152
 	/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	public function setDataValueField($value)
159 159
 	{
160
-		$this->setViewState('DataValueField',$value,'');
160
+		$this->setViewState('DataValueField', $value, '');
161 161
 	}
162 162
 
163 163
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public function getReadOnly()
167 167
 	{
168
-		return $this->getViewState('ReadOnly',false);
168
+		return $this->getViewState('ReadOnly', false);
169 169
 	}
170 170
 
171 171
 	/**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 */
174 174
 	public function setReadOnly($value)
175 175
 	{
176
-		$this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false);
176
+		$this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false);
177 177
 	}
178 178
 
179 179
 	/**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function getListValueField()
199 199
 	{
200
-		return $this->getViewState('ListValueField','');
200
+		return $this->getViewState('ListValueField', '');
201 201
 	}
202 202
 
203 203
 	/**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	 */
206 206
 	public function setListValueField($value)
207 207
 	{
208
-		$this->setViewState('ListValueField',$value,'');
208
+		$this->setViewState('ListValueField', $value, '');
209 209
 	}
210 210
 
211 211
 	/**
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 	 */
214 214
 	public function getListTextField()
215 215
 	{
216
-		return $this->getViewState('ListTextField','');
216
+		return $this->getViewState('ListTextField', '');
217 217
 	}
218 218
 
219 219
 	/**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 */
222 222
 	public function setListTextField($value)
223 223
 	{
224
-		$this->setViewState('ListTextField',$value,'');
224
+		$this->setViewState('ListTextField', $value, '');
225 225
 	}
226 226
 
227 227
 	/**
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	 */
230 230
 	public function getListTextFormatString()
231 231
 	{
232
-		return $this->getViewState('ListTextFormatString','');
232
+		return $this->getViewState('ListTextFormatString', '');
233 233
 	}
234 234
 
235 235
 	/**
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 */
238 238
 	public function setListTextFormatString($value)
239 239
 	{
240
-		$this->setViewState('ListTextFormatString',$value,'');
240
+		$this->setViewState('ListTextFormatString', $value, '');
241 241
 	}
242 242
 
243 243
 	/**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	 * @param integer the index to the Columns property that the cell resides in.
252 252
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
253 253
 	 */
254
-	public function initializeCell($cell,$columnIndex,$itemType)
254
+	public function initializeCell($cell, $columnIndex, $itemType)
255 255
 	{
256 256
 		if(!$this->_dataBound && $this->_listControl->getDataSource()!==null)
257 257
 		{
@@ -268,21 +268,21 @@  discard block
 block discarded – undo
268 268
 				{
269 269
 					$listControl=clone $this->_listControl;
270 270
 					$cell->getControls()->add($listControl);
271
-					$cell->registerObject('DropDownList',$listControl);
271
+					$cell->registerObject('DropDownList', $listControl);
272 272
 					$control=$listControl;
273 273
 				}
274 274
 				else
275 275
 					$control=$cell;
276
-				$control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
276
+				$control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
277 277
 				break;
278 278
 			case TListItemType::Item:
279 279
 			case TListItemType::AlternatingItem:
280 280
 			case TListItemType::SelectedItem:
281 281
 				if($this->getDataTextField()!=='' || $this->getDataValueField()!=='')
282
-					$cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
282
+					$cell->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
283 283
 				break;
284 284
 			default:
285
-				parent::initializeCell($cell,$columnIndex,$itemType);
285
+				parent::initializeCell($cell, $columnIndex, $itemType);
286 286
 				break;
287 287
 		}
288 288
 	}
@@ -292,21 +292,21 @@  discard block
 block discarded – undo
292 292
 	 * This method is invoked when datagrid performs databinding.
293 293
 	 * It populates the content of the cell with the relevant data from data source.
294 294
 	 */
295
-	public function dataBindColumn($sender,$param)
295
+	public function dataBindColumn($sender, $param)
296 296
 	{
297 297
 		$item=$sender->getNamingContainer();
298 298
 		$data=$item->getData();
299 299
 		if(($valueField=$this->getDataValueField())!=='')
300
-			$value=$this->getDataFieldValue($data,$valueField);
300
+			$value=$this->getDataFieldValue($data, $valueField);
301 301
 		else
302 302
 			$value='';
303 303
 		if(($textField=$this->getDataTextField())!=='')
304 304
 		{
305
-			$text=$this->getDataFieldValue($data,$textField);
305
+			$text=$this->getDataFieldValue($data, $textField);
306 306
 			if($valueField==='')
307 307
 				$value=$text;
308 308
 			$formatString=$this->getDataTextFormatString();
309
-			$text=$this->formatDataValue($formatString,$text);
309
+			$text=$this->formatDataValue($formatString, $text);
310 310
 		}
311 311
 		else
312 312
 			$text=$value;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRegularExpressionValidator.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function getRegularExpression()
64 64
 	{
65
-		return $this->getViewState('RegularExpression','');
65
+		return $this->getViewState('RegularExpression', '');
66 66
 	}
67 67
 
68 68
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function setRegularExpression($value)
72 72
 	{
73
-		$this->setViewState('RegularExpression',$value,'');
73
+		$this->setViewState('RegularExpression', $value, '');
74 74
 	}
75 75
 
76 76
 	/**
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		if(($value=$this->getValidationValue($this->getValidationTarget()))==='')
86 86
 			return true;
87
-		if(($expression=addcslashes($this->getRegularExpression(),"/"))!=='')
87
+		if(($expression=addcslashes($this->getRegularExpression(), "/"))!=='')
88 88
 		{
89
-			$mods = $this->getPatternModifiers();
90
-			return preg_match("/^$expression\$/{$mods}",$value);
89
+			$mods=$this->getPatternModifiers();
90
+			return preg_match("/^$expression\$/{$mods}", $value);
91 91
 		}
92 92
 		else
93 93
 			return true;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	protected function getClientScriptOptions()
135 135
 	{
136
-		$options = parent::getClientScriptOptions();
136
+		$options=parent::getClientScriptOptions();
137 137
 		$options['ValidationExpression']=$this->getRegularExpression();
138 138
 		$options['PatternModifiers']=$this->getClientSidePatternModifiers();
139 139
 		return $options;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLinkButton.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,7 @@
 block discarded – undo
98 98
 		{
99 99
 			$this->renderLinkButtonHref($writer);
100 100
 			$this->renderClientControlScript($writer);
101
-		}
102
-		else if($this->getEnabled()) // in this case, parent will not render 'disabled'
101
+		} else if($this->getEnabled()) // in this case, parent will not render 'disabled'
103 102
 			$writer->addAttribute('disabled','disabled');
104 103
 	}
105 104
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function getEnableClientScript()
72 72
 	{
73
-		return $this->getViewState('EnableClientScript',true);
73
+		return $this->getViewState('EnableClientScript', true);
74 74
 	}
75 75
 
76 76
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function setEnableClientScript($value)
80 80
 	{
81
-		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
81
+		$this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true);
82 82
 	}
83 83
 
84 84
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$page=$this->getPage();
92 92
 		$page->ensureRenderInForm($this);
93 93
 
94
-		$writer->addAttribute('id',$this->getClientID());
94
+		$writer->addAttribute('id', $this->getClientID());
95 95
 
96 96
 		// We call parent implementation here because some attributes
97 97
 		// may be overwritten in the following
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			$this->renderClientControlScript($writer);
104 104
 		}
105 105
 		else if($this->getEnabled()) // in this case, parent will not render 'disabled'
106
-			$writer->addAttribute('disabled','disabled');
106
+			$writer->addAttribute('disabled', 'disabled');
107 107
 	}
108 108
 
109 109
 	/**
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	protected function renderClientControlScript($writer)
114 114
 	{
115
-		$cs = $this->getPage()->getClientScript();
116
-		$cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions());
115
+		$cs=$this->getPage()->getClientScript();
116
+		$cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions());
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function setIsDefaultButton($value)
123 123
 	{
124
-		$this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value),false);
124
+		$this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value), false);
125 125
 	}
126 126
 
127 127
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	protected function renderLinkButtonHref($writer)
140 140
 	{
141 141
 		//create unique no-op url references
142
-		$nop = "javascript:;//".$this->getClientID();
142
+		$nop="javascript:;//".$this->getClientID();
143 143
 		$writer->addAttribute('href', $nop);
144 144
 	}
145 145
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	protected function getPostBackOptions()
162 162
 	{
163
-		$options['ID'] = $this->getClientID();
164
-		$options['EventTarget'] = $this->getUniqueID();
165
-		$options['CausesValidation'] = $this->getCausesValidation();
166
-		$options['ValidationGroup'] = $this->getValidationGroup();
167
-		$options['StopEvent'] = true;
163
+		$options['ID']=$this->getClientID();
164
+		$options['EventTarget']=$this->getUniqueID();
165
+		$options['CausesValidation']=$this->getCausesValidation();
166
+		$options['ValidationGroup']=$this->getValidationGroup();
167
+		$options['StopEvent']=true;
168 168
 
169 169
 		return $options;
170 170
 	}
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 */
189 189
 	public function getText()
190 190
 	{
191
-		return $this->getViewState('Text','');
191
+		return $this->getViewState('Text', '');
192 192
 	}
193 193
 
194 194
 	/**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 */
197 197
 	public function setText($value)
198 198
 	{
199
-		$this->setViewState('Text',$value,'');
199
+		$this->setViewState('Text', $value, '');
200 200
 	}
201 201
 
202 202
 	/**
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	 */
231 231
 	public function getCommandName()
232 232
 	{
233
-		return $this->getViewState('CommandName','');
233
+		return $this->getViewState('CommandName', '');
234 234
 	}
235 235
 
236 236
 	/**
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 */
239 239
 	public function setCommandName($value)
240 240
 	{
241
-		$this->setViewState('CommandName',$value,'');
241
+		$this->setViewState('CommandName', $value, '');
242 242
 	}
243 243
 
244 244
 	/**
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	 */
247 247
 	public function getCommandParameter()
248 248
 	{
249
-		return $this->getViewState('CommandParameter','');
249
+		return $this->getViewState('CommandParameter', '');
250 250
 	}
251 251
 
252 252
 	/**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 	 */
255 255
 	public function setCommandParameter($value)
256 256
 	{
257
-		$this->setViewState('CommandParameter',$value,'');
257
+		$this->setViewState('CommandParameter', $value, '');
258 258
 	}
259 259
 
260 260
 	/**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 */
263 263
 	public function getCausesValidation()
264 264
 	{
265
-		return $this->getViewState('CausesValidation',true);
265
+		return $this->getViewState('CausesValidation', true);
266 266
 	}
267 267
 
268 268
 	/**
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	 */
272 272
 	public function setCausesValidation($value)
273 273
 	{
274
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
274
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
275 275
 	}
276 276
 
277 277
 	/**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 */
280 280
 	public function getValidationGroup()
281 281
 	{
282
-		return $this->getViewState('ValidationGroup','');
282
+		return $this->getViewState('ValidationGroup', '');
283 283
 	}
284 284
 
285 285
 	/**
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 */
288 288
 	public function setValidationGroup($value)
289 289
 	{
290
-		$this->setViewState('ValidationGroup',$value,'');
290
+		$this->setViewState('ValidationGroup', $value, '');
291 291
 	}
292 292
 
293 293
 	/**
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 		if($this->getCausesValidation())
305 305
 			$this->getPage()->validate($this->getValidationGroup());
306 306
 		$this->onClick(null);
307
-		$this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(),$this->getCommandParameter()));
307
+		$this->onCommand(new \Prado\Web\UI\TCommandEventParameter($this->getCommandName(), $this->getCommandParameter()));
308 308
 	}
309 309
 
310 310
 	/**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 	 */
317 317
 	public function onClick($param)
318 318
 	{
319
-		$this->raiseEvent('OnClick',$this,$param);
319
+		$this->raiseEvent('OnClick', $this, $param);
320 320
 	}
321 321
 
322 322
 	/**
@@ -328,8 +328,8 @@  discard block
 block discarded – undo
328 328
 	 */
329 329
 	public function onCommand($param)
330 330
 	{
331
-		$this->raiseEvent('OnCommand',$this,$param);
332
-		$this->raiseBubbleEvent($this,$param);
331
+		$this->raiseEvent('OnCommand', $this, $param);
332
+		$this->raiseBubbleEvent($this, $param);
333 333
 	}
334 334
 }
335 335
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -325,6 +325,7 @@
 block discarded – undo
325 325
 	 * If you override this method, be sure to call the parent implementation
326 326
 	 * so that the event handlers can be invoked.
327 327
 	 * @param \Prado\Web\UI\TCommandEventParameter event parameter to be passed to the event handlers
328
+	 * @param \Prado\Web\UI\TCommandEventParameter $param
328 329
 	 */
329 330
 	public function onCommand($param)
330 331
 	{
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLiteralColumn.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function getDataField()
40 40
 	{
41
-		return $this->getViewState('DataField','');
41
+		return $this->getViewState('DataField', '');
42 42
 	}
43 43
 
44 44
 	/**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function setDataField($value)
48 48
 	{
49
-		$this->setViewState('DataField',$value,'');
49
+		$this->setViewState('DataField', $value, '');
50 50
 	}
51 51
 
52 52
 	/**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function getDataFormatString()
56 56
 	{
57
-		return $this->getViewState('DataFormatString','');
57
+		return $this->getViewState('DataFormatString', '');
58 58
 	}
59 59
 
60 60
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function setDataFormatString($value)
64 64
 	{
65
-		$this->setViewState('DataFormatString',$value,'');
65
+		$this->setViewState('DataFormatString', $value, '');
66 66
 	}
67 67
 
68 68
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function getText()
72 72
 	{
73
-		return $this->getViewState('Text','');
73
+		return $this->getViewState('Text', '');
74 74
 	}
75 75
 
76 76
 	/**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function setText($value)
80 80
 	{
81
-		$this->setViewState('Text',$value,'');
81
+		$this->setViewState('Text', $value, '');
82 82
 	}
83 83
 
84 84
 	/**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function getEncode()
88 88
 	{
89
-		return $this->getViewState('Encode',false);
89
+		return $this->getViewState('Encode', false);
90 90
 	}
91 91
 
92 92
 	/**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function setEncode($value)
96 96
 	{
97
-		$this->setViewState('Encode',TPropertyValue::ensureBoolean($value),false);
97
+		$this->setViewState('Encode', TPropertyValue::ensureBoolean($value), false);
98 98
 	}
99 99
 
100 100
 	/**
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 	 * @param integer the index to the Columns property that the cell resides in.
105 105
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
106 106
 	 */
107
-	public function initializeCell($cell,$columnIndex,$itemType)
107
+	public function initializeCell($cell, $columnIndex, $itemType)
108 108
 	{
109 109
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::EditItem || $itemType===TListItemType::SelectedItem)
110 110
 		{
111 111
 			if($this->getDataField()!=='')
112 112
 			{
113
-				$cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
113
+				$cell->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
114 114
 			} else {
115 115
 				$text=$this->getText();
116 116
 				if($this->getEncode())
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			}
120 120
 		}
121 121
 		else
122
-			parent::initializeCell($cell,$columnIndex,$itemType);
122
+			parent::initializeCell($cell, $columnIndex, $itemType);
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,15 +127,15 @@  discard block
 block discarded – undo
127 127
 	 * This method is invoked when datagrid performs databinding.
128 128
 	 * It populates the content of the cell with the relevant data from data source.
129 129
 	 */
130
-	public function dataBindColumn($sender,$param)
130
+	public function dataBindColumn($sender, $param)
131 131
 	{
132 132
 		$item=$sender->getNamingContainer();
133 133
 		$data=$item->getData();
134 134
 		$formatString=$this->getDataFormatString();
135 135
 		if(($field=$this->getDataField())!=='')
136
-			$value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field));
136
+			$value=$this->formatDataValue($formatString, $this->getDataFieldValue($data, $field));
137 137
 		else
138
-			$value=$this->formatDataValue($formatString,$data);
138
+			$value=$this->formatDataValue($formatString, $data);
139 139
 		if($sender instanceof TTableCell)
140 140
 		{
141 141
 			if($this->getEncode())
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TMultiView.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@  discard block
 block discarded – undo
97 97
 			$this->_cachedActiveViewIndex=-1;
98 98
 			if($index>=0)
99 99
 				$this->activateView($views->itemAt($index),true);
100
-		}
101
-		else
100
+		} else
102 101
 			throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index);
103 102
 	}
104 103
 
@@ -153,8 +152,7 @@  discard block
 block discarded – undo
153 152
 					$view->onActivate(null);
154 153
 					$this->onActiveViewChanged(null);
155 154
 				}
156
-			}
157
-			else if($v->getActive())
155
+			} else if($v->getActive())
158 156
 			{
159 157
 				$v->setActive(false);
160 158
 				if($triggerEvent)
@@ -232,8 +230,7 @@  discard block
 block discarded – undo
232 230
 					{
233 231
 						$this->setActiveView($view);
234 232
 						return true;
235
-					}
236
-					else
233
+					} else
237 234
 						throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID);
238 235
 				case self::CMD_SWITCHVIEWINDEX:
239 236
 					$index=TPropertyValue::ensureInteger($param->getCommandParameter());
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function getActiveViewIndex()
82 82
 	{
83
-		if($this->_cachedActiveViewIndex>-1)
83
+		if($this->_cachedActiveViewIndex > -1)
84 84
 			return $this->_cachedActiveViewIndex;
85 85
 		else
86
-			return $this->getControlState('ActiveViewIndex',-1);
86
+			return $this->getControlState('ActiveViewIndex', -1);
87 87
 	}
88 88
 
89 89
 	/**
@@ -92,21 +92,21 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function setActiveViewIndex($value)
94 94
 	{
95
-		if(($index=TPropertyValue::ensureInteger($value))<0)
95
+		if(($index=TPropertyValue::ensureInteger($value)) < 0)
96 96
 			$index=-1;
97 97
 		$views=$this->getViews();
98 98
 		$count=$views->getCount();
99
-		if($count===0 && $this->getControlStage()<TControl::CS_CHILD_INITIALIZED)
99
+		if($count===0 && $this->getControlStage() < TControl::CS_CHILD_INITIALIZED)
100 100
 			$this->_cachedActiveViewIndex=$index;
101
-		else if($index<$count)
101
+		else if($index < $count)
102 102
 		{
103
-			$this->setControlState('ActiveViewIndex',$index,-1);
103
+			$this->setControlState('ActiveViewIndex', $index, -1);
104 104
 			$this->_cachedActiveViewIndex=-1;
105
-			if($index>=0)
106
-				$this->activateView($views->itemAt($index),true);
105
+			if($index >= 0)
106
+				$this->activateView($views->itemAt($index), true);
107 107
 		}
108 108
 		else
109
-			throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index);
109
+			throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index);
110 110
 	}
111 111
 
112 112
 	/**
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
 	{
118 118
 		$index=$this->getActiveViewIndex();
119 119
 		$views=$this->getViews();
120
-		if($index>=$views->getCount())
121
-			throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index);
122
-		if($index<0)
120
+		if($index >= $views->getCount())
121
+			throw new TInvalidDataValueException('multiview_activeviewindex_invalid', $index);
122
+		if($index < 0)
123 123
 			return null;
124 124
 		$view=$views->itemAt($index);
125 125
 		if(!$view->getActive())
126
-			$this->activateView($view,false);
126
+			$this->activateView($view, false);
127 127
 		return $view;
128 128
 	}
129 129
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function setActiveView($view)
135 135
 	{
136
-		if(($index=$this->getViews()->indexOf($view))>=0)
136
+		if(($index=$this->getViews()->indexOf($view)) >= 0)
137 137
 			$this->setActiveViewIndex($index);
138 138
 		else
139 139
 			throw new TInvalidOperationException('multiview_view_inexistent');
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
 	 * @param TView the view to be activated
146 146
 	 * @param boolean whether to trigger OnActiveViewChanged event.
147 147
 	 */
148
-	protected function activateView($view,$triggerViewChangedEvent=true)
148
+	protected function activateView($view, $triggerViewChangedEvent=true)
149 149
 	{
150 150
 		if($view->getActive())
151 151
 			return;
152
-		$triggerEvent=$triggerViewChangedEvent && ($this->getControlStage()>=\Prado\Web\UI\TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack()));
152
+		$triggerEvent=$triggerViewChangedEvent && ($this->getControlStage() >= \Prado\Web\UI\TControl::CS_STATE_LOADED || ($this->getPage() && !$this->getPage()->getIsPostBack()));
153 153
 		foreach($this->getViews() as $v)
154 154
 		{
155 155
 			if($v===$view)
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	public function onInit($param)
197 197
 	{
198 198
 		parent::onInit($param);
199
-		if($this->_cachedActiveViewIndex>=0)
199
+		if($this->_cachedActiveViewIndex >= 0)
200 200
 			$this->setActiveViewIndex($this->_cachedActiveViewIndex);
201 201
 	}
202 202
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public function onActiveViewChanged($param)
209 209
 	{
210
-		$this->raiseEvent('OnActiveViewChanged',$this,$param);
210
+		$this->raiseEvent('OnActiveViewChanged', $this, $param);
211 211
 	}
212 212
 
213 213
 	/**
@@ -217,21 +217,21 @@  discard block
 block discarded – undo
217 217
 	 * @param mixed event parameter
218 218
 	 * @return boolean whether this event is handled
219 219
 	 */
220
-	public function bubbleEvent($sender,$param)
220
+	public function bubbleEvent($sender, $param)
221 221
 	{
222 222
 		if(!$this->_ignoreBubbleEvents && ($param instanceof \Prado\Web\UI\TCommandEventParameter))
223 223
 		{
224 224
 			switch($param->getCommandName())
225 225
 			{
226 226
 				case self::CMD_NEXTVIEW:
227
-					if(($index=$this->getActiveViewIndex())<$this->getViews()->getCount()-1)
228
-						$this->setActiveViewIndex($index+1);
227
+					if(($index=$this->getActiveViewIndex()) < $this->getViews()->getCount() - 1)
228
+						$this->setActiveViewIndex($index + 1);
229 229
 					else
230 230
 						$this->setActiveViewIndex(-1);
231 231
 					return true;
232 232
 				case self::CMD_PREVIOUSVIEW:
233
-					if(($index=$this->getActiveViewIndex())>=0)
234
-						$this->setActiveViewIndex($index-1);
233
+					if(($index=$this->getActiveViewIndex()) >= 0)
234
+						$this->setActiveViewIndex($index - 1);
235 235
 					return true;
236 236
 				case self::CMD_SWITCHVIEWID:
237 237
 					$view=$this->findControl($viewID=$param->getCommandParameter());
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEditCommandColumn.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,8 +211,7 @@  discard block
 block discarded – undo
211 211
 			$button=$this->createButton('Edit',$this->getEditText(),false,'');
212 212
 			$cell->getControls()->add($button);
213 213
 			$cell->registerObject('EditButton',$button);
214
-		}
215
-		else if($itemType===TListItemType::EditItem)
214
+		} else if($itemType===TListItemType::EditItem)
216 215
 		{
217 216
 			$controls=$cell->getControls();
218 217
 			$button=$this->createButton('Update',$this->getUpdateText(),$this->getCausesValidation(),$this->getValidationGroup());
@@ -222,8 +221,7 @@  discard block
 block discarded – undo
222 221
 			$button=$this->createButton('Cancel',$this->getCancelText(),false,'');
223 222
 			$controls->add($button);
224 223
 			$cell->registerObject('CancelButton',$button);
225
-		}
226
-		else
224
+		} else
227 225
 			parent::initializeCell($cell,$columnIndex,$itemType);
228 226
 	}
229 227
 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -233,6 +233,10 @@
 block discarded – undo
233 233
 	 * @param string button caption
234 234
 	 * @param boolean whether the button should cause validation
235 235
 	 * @param string the validation group that the button belongs to
236
+	 * @param string $commandName
237
+	 * @param string $text
238
+	 * @param boolean $causesValidation
239
+	 * @param string $validationGroup
236 240
 	 * @return mixed the newly created button.
237 241
 	 */
238 242
 	protected function createButton($commandName,$text,$causesValidation,$validationGroup)
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function getButtonType()
57 57
 	{
58
-		return $this->getViewState('ButtonType',TButtonColumnType::LinkButton);
58
+		return $this->getViewState('ButtonType', TButtonColumnType::LinkButton);
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setButtonType($value)
65 65
 	{
66
-		$this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TButtonColumnType'),TButtonColumnType::LinkButton);
66
+		$this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TButtonColumnType'), TButtonColumnType::LinkButton);
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function getEditText()
73 73
 	{
74
-		return $this->getViewState('EditText','Edit');
74
+		return $this->getViewState('EditText', 'Edit');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setEditText($value)
81 81
 	{
82
-		$this->setViewState('EditText',$value,'Edit');
82
+		$this->setViewState('EditText', $value, 'Edit');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getEditImageUrl()
89 89
 	{
90
-		return $this->getViewState('EditImageUrl','');
90
+		return $this->getViewState('EditImageUrl', '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setEditImageUrl($value)
97 97
 	{
98
-		$this->setViewState('EditImageUrl',$value,'');
98
+		$this->setViewState('EditImageUrl', $value, '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getUpdateText()
105 105
 	{
106
-		return $this->getViewState('UpdateText','Update');
106
+		return $this->getViewState('UpdateText', 'Update');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setUpdateText($value)
113 113
 	{
114
-		$this->setViewState('UpdateText',$value,'Update');
114
+		$this->setViewState('UpdateText', $value, 'Update');
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getUpdateImageUrl()
121 121
 	{
122
-		return $this->getViewState('UpdateImageUrl','');
122
+		return $this->getViewState('UpdateImageUrl', '');
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setUpdateImageUrl($value)
129 129
 	{
130
-		$this->setViewState('UpdateImageUrl',$value,'');
130
+		$this->setViewState('UpdateImageUrl', $value, '');
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getCancelText()
137 137
 	{
138
-		return $this->getViewState('CancelText','Cancel');
138
+		return $this->getViewState('CancelText', 'Cancel');
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setCancelText($value)
145 145
 	{
146
-		$this->setViewState('CancelText',$value,'Cancel');
146
+		$this->setViewState('CancelText', $value, 'Cancel');
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getCancelImageUrl()
153 153
 	{
154
-		return $this->getViewState('CancelImageUrl','');
154
+		return $this->getViewState('CancelImageUrl', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function setCancelImageUrl($value)
161 161
 	{
162
-		$this->setViewState('CancelImageUrl',$value,'');
162
+		$this->setViewState('CancelImageUrl', $value, '');
163 163
 	}
164 164
 
165 165
 	/**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public function getCausesValidation()
169 169
 	{
170
-		return $this->getViewState('CausesValidation',true);
170
+		return $this->getViewState('CausesValidation', true);
171 171
 	}
172 172
 
173 173
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public function setCausesValidation($value)
177 177
 	{
178
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
178
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
179 179
 	}
180 180
 
181 181
 	/**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public function getValidationGroup()
185 185
 	{
186
-		return $this->getViewState('ValidationGroup','');
186
+		return $this->getViewState('ValidationGroup', '');
187 187
 	}
188 188
 
189 189
 	/**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	public function setValidationGroup($value)
193 193
 	{
194
-		$this->setViewState('ValidationGroup',$value,'');
194
+		$this->setViewState('ValidationGroup', $value, '');
195 195
 	}
196 196
 
197 197
 	/**
@@ -203,27 +203,27 @@  discard block
 block discarded – undo
203 203
 	 * @param integer the index to the Columns property that the cell resides in.
204 204
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
205 205
 	 */
206
-	public function initializeCell($cell,$columnIndex,$itemType)
206
+	public function initializeCell($cell, $columnIndex, $itemType)
207 207
 	{
208 208
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem)
209 209
 		{
210
-			$button=$this->createButton('Edit',$this->getEditText(),false,'');
210
+			$button=$this->createButton('Edit', $this->getEditText(), false, '');
211 211
 			$cell->getControls()->add($button);
212
-			$cell->registerObject('EditButton',$button);
212
+			$cell->registerObject('EditButton', $button);
213 213
 		}
214 214
 		else if($itemType===TListItemType::EditItem)
215 215
 		{
216 216
 			$controls=$cell->getControls();
217
-			$button=$this->createButton('Update',$this->getUpdateText(),$this->getCausesValidation(),$this->getValidationGroup());
217
+			$button=$this->createButton('Update', $this->getUpdateText(), $this->getCausesValidation(), $this->getValidationGroup());
218 218
 			$controls->add($button);
219
-			$cell->registerObject('UpdateButton',$button);
219
+			$cell->registerObject('UpdateButton', $button);
220 220
 			$controls->add('&nbsp;');
221
-			$button=$this->createButton('Cancel',$this->getCancelText(),false,'');
221
+			$button=$this->createButton('Cancel', $this->getCancelText(), false, '');
222 222
 			$controls->add($button);
223
-			$cell->registerObject('CancelButton',$button);
223
+			$cell->registerObject('CancelButton', $button);
224 224
 		}
225 225
 		else
226
-			parent::initializeCell($cell,$columnIndex,$itemType);
226
+			parent::initializeCell($cell, $columnIndex, $itemType);
227 227
 	}
228 228
 
229 229
 	/**
@@ -235,18 +235,18 @@  discard block
 block discarded – undo
235 235
 	 * @param string the validation group that the button belongs to
236 236
 	 * @return mixed the newly created button.
237 237
 	 */
238
-	protected function createButton($commandName,$text,$causesValidation,$validationGroup)
238
+	protected function createButton($commandName, $text, $causesValidation, $validationGroup)
239 239
 	{
240 240
 		if($this->getButtonType()===TButtonColumnType::LinkButton)
241
-			$button= new TLinkButton;
241
+			$button=new TLinkButton;
242 242
 		else if($this->getButtonType()===TButtonColumnType::PushButton)
243
-			$button= new TButton;
243
+			$button=new TButton;
244 244
 		else	// image buttons
245 245
 		{
246
-			$button= new TImageButton;
247
-			if(strcasecmp($commandName,'Update')===0)
246
+			$button=new TImageButton;
247
+			if(strcasecmp($commandName, 'Update')===0)
248 248
 				$url=$this->getUpdateImageUrl();
249
-			else if(strcasecmp($commandName,'Cancel')===0)
249
+			else if(strcasecmp($commandName, 'Cancel')===0)
250 250
 				$url=$this->getCancelImageUrl();
251 251
 			else
252 252
 				$url=$this->getEditImageUrl();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THyperLink.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if ($this->sourcepath === NULL)
59 59
 		{
60 60
 			$this->sourcepath = $sourcepath;
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->sourcepath->append($sourcepath);
65 64
 		}
Please login to merge, or discard this 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.