Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/WebControls/TListItem.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @param boolean whether the item is enabled
54 54
 	 * @param boolean whether the item is selected
55 55
 	 */
56
-	public function __construct($text='',$value='',$enabled=true,$selected=false)
56
+	public function __construct($text='', $value='', $enabled=true, $selected=false)
57 57
 	{
58 58
 		$this->setText($text);
59 59
 		$this->setValue($value);
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
 	protected function __getZappableSleepProps(&$exprops)
71 71
 	{
72 72
 		parent::__getZappableSleepProps($exprops);
73
-		if ($this->_attributes===null)
74
-			$exprops[] = "\0TListItem\0_attributes";
73
+		if($this->_attributes===null)
74
+			$exprops[]="\0TListItem\0_attributes";
75 75
 		if($this->_text==='')
76
-			$exprops[] = "\0TListItem\0_text";
76
+			$exprops[]="\0TListItem\0_text";
77 77
 		if($this->_value==='')
78
-			$exprops[] = "\0TListItem\0_value";
79
-		if ($this->_enabled===true)
80
-			$exprops[] = "\0TListItem\0_enabled";
81
-		if ($this->_selected===false)
82
-			$exprops[] = "\0TListItem\0_selected";
78
+			$exprops[]="\0TListItem\0_value";
79
+		if($this->_enabled===true)
80
+			$exprops[]="\0TListItem\0_enabled";
81
+		if($this->_selected===false)
82
+			$exprops[]="\0TListItem\0_selected";
83 83
 	}
84 84
 
85 85
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getText()
121 121
 	{
122
-		return $this->_text===''?$this->_value:$this->_text;
122
+		return $this->_text==='' ? $this->_value : $this->_text;
123 123
 	}
124 124
 
125 125
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getValue()
137 137
 	{
138
-		return $this->_value===''?$this->_text:$this->_value;
138
+		return $this->_value==='' ? $this->_text : $this->_value;
139 139
 	}
140 140
 
141 141
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function getHasAttributes()
163 163
 	{
164
-		return $this->_attributes && $this->_attributes->getCount()>0;
164
+		return $this->_attributes && $this->_attributes->getCount() > 0;
165 165
 	}
166 166
 
167 167
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	public function hasAttribute($name)
172 172
 	{
173
-		return $this->_attributes?$this->_attributes->contains($name):false;
173
+		return $this->_attributes ? $this->_attributes->contains($name) : false;
174 174
 	}
175 175
 
176 176
 	/**
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function getAttribute($name)
180 180
 	{
181
-		return $this->_attributes?$this->_attributes->itemAt($name):null;
181
+		return $this->_attributes ? $this->_attributes->itemAt($name) : null;
182 182
 	}
183 183
 
184 184
 	/**
185 185
 	 * @param string attribute name
186 186
 	 * @param string value of the attribute
187 187
 	 */
188
-	public function setAttribute($name,$value)
188
+	public function setAttribute($name, $value)
189 189
 	{
190
-		$this->getAttributes()->add($name,$value);
190
+		$this->getAttributes()->add($name, $value);
191 191
 	}
192 192
 
193 193
 	/**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function removeAttribute($name)
199 199
 	{
200
-		return $this->_attributes?$this->_attributes->remove($name):null;
200
+		return $this->_attributes ? $this->_attributes->remove($name) : null;
201 201
 	}
202 202
 }
203 203
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TButtonColumn.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function getText()
59 59
 	{
60
-		return $this->getViewState('Text','');
60
+		return $this->getViewState('Text', '');
61 61
 	}
62 62
 
63 63
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function setText($value)
68 68
 	{
69
-		$this->setViewState('Text',$value,'');
69
+		$this->setViewState('Text', $value, '');
70 70
 	}
71 71
 
72 72
 	/**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function getDataTextField()
76 76
 	{
77
-		return $this->getViewState('DataTextField','');
77
+		return $this->getViewState('DataTextField', '');
78 78
 	}
79 79
 
80 80
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function setDataTextField($value)
84 84
 	{
85
-		$this->setViewState('DataTextField',$value,'');
85
+		$this->setViewState('DataTextField', $value, '');
86 86
 	}
87 87
 
88 88
 	/**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function getDataTextFormatString()
92 92
 	{
93
-		return $this->getViewState('DataTextFormatString','');
93
+		return $this->getViewState('DataTextFormatString', '');
94 94
 	}
95 95
 
96 96
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function setDataTextFormatString($value)
100 100
 	{
101
-		$this->setViewState('DataTextFormatString',$value,'');
101
+		$this->setViewState('DataTextFormatString', $value, '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getImageUrl()
108 108
 	{
109
-		return $this->getViewState('ImageUrl','');
109
+		return $this->getViewState('ImageUrl', '');
110 110
 	}
111 111
 
112 112
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function setImageUrl($value)
116 116
 	{
117
-		$this->setViewState('ImageUrl',$value,'');
117
+		$this->setViewState('ImageUrl', $value, '');
118 118
 	}
119 119
 
120 120
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getDataImageUrlField()
124 124
 	{
125
-		return $this->getViewState('DataImageUrlField','');
125
+		return $this->getViewState('DataImageUrlField', '');
126 126
 	}
127 127
 
128 128
 	/**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function setDataImageUrlField($value)
132 132
 	{
133
-		$this->setViewState('DataImageUrlField',$value,'');
133
+		$this->setViewState('DataImageUrlField', $value, '');
134 134
 	}
135 135
 
136 136
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function getDataImageUrlFormatString()
140 140
 	{
141
-		return $this->getViewState('DataImageUrlFormatString','');
141
+		return $this->getViewState('DataImageUrlFormatString', '');
142 142
 	}
143 143
 
144 144
 	/**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function setDataImageUrlFormatString($value)
148 148
 	{
149
-		$this->setViewState('DataImageUrlFormatString',$value,'');
149
+		$this->setViewState('DataImageUrlFormatString', $value, '');
150 150
 	}
151 151
 
152 152
 	/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getButtonType()
156 156
 	{
157
-		return $this->getViewState('ButtonType',TButtonColumnType::LinkButton);
157
+		return $this->getViewState('ButtonType', TButtonColumnType::LinkButton);
158 158
 	}
159 159
 
160 160
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function setButtonType($value)
164 164
 	{
165
-		$this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::LinkButton);
165
+		$this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'TButtonColumnType'), TButtonColumnType::LinkButton);
166 166
 	}
167 167
 
168 168
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 */
171 171
 	public function getCommandName()
172 172
 	{
173
-		return $this->getViewState('CommandName','');
173
+		return $this->getViewState('CommandName', '');
174 174
 	}
175 175
 
176 176
 	/**
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 */
180 180
 	public function setCommandName($value)
181 181
 	{
182
-		$this->setViewState('CommandName',$value,'');
182
+		$this->setViewState('CommandName', $value, '');
183 183
 	}
184 184
 
185 185
 	/**
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	public function getCausesValidation()
189 189
 	{
190
-		return $this->getViewState('CausesValidation',true);
190
+		return $this->getViewState('CausesValidation', true);
191 191
 	}
192 192
 
193 193
 	/**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 */
196 196
 	public function setCausesValidation($value)
197 197
 	{
198
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
198
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
199 199
 	}
200 200
 
201 201
 	/**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	public function getValidationGroup()
205 205
 	{
206
-		return $this->getViewState('ValidationGroup','');
206
+		return $this->getViewState('ValidationGroup', '');
207 207
 	}
208 208
 
209 209
 	/**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 */
212 212
 	public function setValidationGroup($value)
213 213
 	{
214
-		$this->setViewState('ValidationGroup',$value,'');
214
+		$this->setViewState('ValidationGroup', $value, '');
215 215
 	}
216 216
 
217 217
 	/**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * @param integer the index to the Columns property that the cell resides in.
223 223
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
224 224
 	 */
225
-	public function initializeCell($cell,$columnIndex,$itemType)
225
+	public function initializeCell($cell, $columnIndex, $itemType)
226 226
 	{
227 227
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
228 228
 		{
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
 			$button->setCausesValidation($this->getCausesValidation());
243 243
 			$button->setValidationGroup($this->getValidationGroup());
244 244
 			if($this->getDataTextField()!=='' || ($buttonType===TButtonColumnType::ImageButton && $this->getDataImageUrlField()!==''))
245
-				$button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
245
+				$button->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
246 246
 			$cell->getControls()->add($button);
247
-			$cell->registerObject('Button',$button);
247
+			$cell->registerObject('Button', $button);
248 248
 		}
249 249
 		else
250
-			parent::initializeCell($cell,$columnIndex,$itemType);
250
+			parent::initializeCell($cell, $columnIndex, $itemType);
251 251
 	}
252 252
 
253 253
 	/**
@@ -255,20 +255,20 @@  discard block
 block discarded – undo
255 255
 	 * This method is invoked when datagrid performs databinding.
256 256
 	 * It populates the content of the cell with the relevant data from data source.
257 257
 	 */
258
-	public function dataBindColumn($sender,$param)
258
+	public function dataBindColumn($sender, $param)
259 259
 	{
260 260
 		if($sender instanceof IButtonControl)
261 261
 		{
262 262
 			if(($field=$this->getDataTextField())!=='')
263 263
 			{
264
-				$value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field);
265
-				$text=$this->formatDataValue($this->getDataTextFormatString(),$value);
264
+				$value=$this->getDataFieldValue($sender->getNamingContainer()->getData(), $field);
265
+				$text=$this->formatDataValue($this->getDataTextFormatString(), $value);
266 266
 				$sender->setText($text);
267 267
 			}
268 268
 			if(($sender instanceof TImageButton) && ($field=$this->getDataImageUrlField())!=='')
269 269
 			{
270
-				$value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field);
271
-				$url=$this->formatDataValue($this->getDataImageUrlFormatString(),$value);
270
+				$value=$this->getDataFieldValue($sender->getNamingContainer()->getData(), $field);
271
+				$url=$this->formatDataValue($this->getDataImageUrlFormatString(), $value);
272 272
 				$sender->setImageUrl($url);
273 273
 			}
274 274
 		}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFlushOutput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	public function __construct()
46 46
 	{
47 47
 		parent::__construct();
48
-		$this->EnableViewState = false;
48
+		$this->EnableViewState=false;
49 49
 	}
50 50
 
51 51
 	/**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function setContinueBuffering($value)
63 63
 	{
64
-		$this->_continueBuffering = TPropertyValue::ensureBoolean($value);
64
+		$this->_continueBuffering=TPropertyValue::ensureBoolean($value);
65 65
 	}
66 66
 
67 67
 	/**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 //$writer->write('<!-- flush -->');
74 74
 		// ajax responses can't be parsed by the client side before loaded and returned completely,
75 75
 		// so don't bother with flushing output somewhere mid-page if refreshing in a callback
76
-		if (!$this->Page->IsCallback)
76
+		if(!$this->Page->IsCallback)
77 77
 		{
78 78
 			$this->Page->flushWriter();
79 79
 //			$this->Application->flushOutput($this->ContinueBuffering);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDropDownListColumn.php 1 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/TDropDownList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	protected function addAttributesToRender($writer)
54 54
 	{
55
-		$writer->addAttribute('name',$this->getUniqueID());
55
+		$writer->addAttribute('name', $this->getUniqueID());
56 56
 		parent::addAttributesToRender($writer);
57 57
 	}
58 58
 
@@ -73,15 +73,15 @@  discard block
 block discarded – undo
73 73
 	 * @param array the input data collection
74 74
 	 * @return boolean whether the data of the component has been changed
75 75
 	 */
76
-	public function loadPostData($key,$values)
76
+	public function loadPostData($key, $values)
77 77
 	{
78 78
 		if(!$this->getEnabled(true))
79 79
 			return false;
80 80
 		$this->ensureDataBound();
81
-		$selection=isset($values[$key])?$values[$key]:null;
81
+		$selection=isset($values[$key]) ? $values[$key] : null;
82 82
 		if($selection!==null)
83 83
 		{
84
-			$index=$this->getItems()->findIndexByValue($selection,false);
84
+			$index=$this->getItems()->findIndexByValue($selection, false);
85 85
 			if($this->getSelectedIndex()!==$index)
86 86
 			{
87 87
 				$this->setSelectedIndex($index);
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRepeater.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public function getItemRenderer()
147 147
 	{
148
-		return $this->getViewState('ItemRenderer','');
148
+		return $this->getViewState('ItemRenderer', '');
149 149
 	}
150 150
 
151 151
 	/**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setItemRenderer($value)
162 162
 	{
163
-		$this->setViewState('ItemRenderer',$value,'');
163
+		$this->setViewState('ItemRenderer', $value, '');
164 164
 	}
165 165
 
166 166
 	/**
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	public function getAlternatingItemRenderer()
171 171
 	{
172
-		return $this->getViewState('AlternatingItemRenderer','');
172
+		return $this->getViewState('AlternatingItemRenderer', '');
173 173
 	}
174 174
 
175 175
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function setAlternatingItemRenderer($value)
186 186
 	{
187
-		$this->setViewState('AlternatingItemRenderer',$value,'');
187
+		$this->setViewState('AlternatingItemRenderer', $value, '');
188 188
 	}
189 189
 
190 190
 	/**
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	public function getSeparatorRenderer()
195 195
 	{
196
-		return $this->getViewState('SeparatorRenderer','');
196
+		return $this->getViewState('SeparatorRenderer', '');
197 197
 	}
198 198
 
199 199
 	/**
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	public function setSeparatorRenderer($value)
210 210
 	{
211
-		$this->setViewState('SeparatorRenderer',$value,'');
211
+		$this->setViewState('SeparatorRenderer', $value, '');
212 212
 	}
213 213
 
214 214
 	/**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	 */
218 218
 	public function getHeaderRenderer()
219 219
 	{
220
-		return $this->getViewState('HeaderRenderer','');
220
+		return $this->getViewState('HeaderRenderer', '');
221 221
 	}
222 222
 
223 223
 	/**
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 */
233 233
 	public function setHeaderRenderer($value)
234 234
 	{
235
-		$this->setViewState('HeaderRenderer',$value,'');
235
+		$this->setViewState('HeaderRenderer', $value, '');
236 236
 	}
237 237
 
238 238
 	/**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function getFooterRenderer()
243 243
 	{
244
-		return $this->getViewState('FooterRenderer','');
244
+		return $this->getViewState('FooterRenderer', '');
245 245
 	}
246 246
 
247 247
 	/**
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 	 */
257 257
 	public function setFooterRenderer($value)
258 258
 	{
259
-		$this->setViewState('FooterRenderer',$value,'');
259
+		$this->setViewState('FooterRenderer', $value, '');
260 260
 	}
261 261
 
262 262
 	/**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function getEmptyRenderer()
267 267
 	{
268
-		return $this->getViewState('EmptyRenderer','');
268
+		return $this->getViewState('EmptyRenderer', '');
269 269
 	}
270 270
 
271 271
 	/**
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	public function setEmptyRenderer($value)
283 283
 	{
284
-		$this->setViewState('EmptyRenderer',$value,'');
284
+		$this->setViewState('EmptyRenderer', $value, '');
285 285
 	}
286 286
 
287 287
 	/**
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 		if($value instanceof ITemplate || $value===null)
302 302
 			$this->_itemTemplate=$value;
303 303
 		else
304
-			throw new TInvalidDataTypeException('repeater_template_required','ItemTemplate');
304
+			throw new TInvalidDataTypeException('repeater_template_required', 'ItemTemplate');
305 305
 	}
306 306
 
307 307
 	/**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 		if($value instanceof ITemplate || $value===null)
322 322
 			$this->_alternatingItemTemplate=$value;
323 323
 		else
324
-			throw new TInvalidDataTypeException('repeater_template_required','AlternatingItemTemplate');
324
+			throw new TInvalidDataTypeException('repeater_template_required', 'AlternatingItemTemplate');
325 325
 	}
326 326
 
327 327
 	/**
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 		if($value instanceof ITemplate || $value===null)
342 342
 			$this->_headerTemplate=$value;
343 343
 		else
344
-			throw new TInvalidDataTypeException('repeater_template_required','HeaderTemplate');
344
+			throw new TInvalidDataTypeException('repeater_template_required', 'HeaderTemplate');
345 345
 	}
346 346
 
347 347
 	/**
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 		if($value instanceof ITemplate || $value===null)
362 362
 			$this->_footerTemplate=$value;
363 363
 		else
364
-			throw new TInvalidDataTypeException('repeater_template_required','FooterTemplate');
364
+			throw new TInvalidDataTypeException('repeater_template_required', 'FooterTemplate');
365 365
 	}
366 366
 
367 367
 	/**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 		if($value instanceof ITemplate || $value===null)
382 382
 			$this->_emptyTemplate=$value;
383 383
 		else
384
-			throw new TInvalidDataTypeException('repeater_template_required','EmptyTemplate');
384
+			throw new TInvalidDataTypeException('repeater_template_required', 'EmptyTemplate');
385 385
 	}
386 386
 
387 387
 	/**
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 		if($value instanceof ITemplate || $value===null)
402 402
 			$this->_separatorTemplate=$value;
403 403
 		else
404
-			throw new TInvalidDataTypeException('repeater_template_required','SeparatorTemplate');
404
+			throw new TInvalidDataTypeException('repeater_template_required', 'SeparatorTemplate');
405 405
 	}
406 406
 
407 407
 	/**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	 */
436 436
 	public function getDataKeyField()
437 437
 	{
438
-		return $this->getViewState('DataKeyField','');
438
+		return $this->getViewState('DataKeyField', '');
439 439
 	}
440 440
 
441 441
 	/**
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	public function setDataKeyField($value)
445 445
 	{
446
-		$this->setViewState('DataKeyField',$value,'');
446
+		$this->setViewState('DataKeyField', $value, '');
447 447
 	}
448 448
 
449 449
 	/**
@@ -451,10 +451,10 @@  discard block
 block discarded – undo
451 451
 	 */
452 452
 	public function getDataKeys()
453 453
 	{
454
-		if(($dataKeys=$this->getViewState('DataKeys',null))===null)
454
+		if(($dataKeys=$this->getViewState('DataKeys', null))===null)
455 455
 		{
456 456
 			$dataKeys=new TList;
457
-			$this->setViewState('DataKeys',$dataKeys,null);
457
+			$this->setViewState('DataKeys', $dataKeys, null);
458 458
 		}
459 459
 		return $dataKeys;
460 460
 	}
@@ -466,9 +466,9 @@  discard block
 block discarded – undo
466 466
 	 * @param TListItemType item type
467 467
 	 * @return TControl the created item, null if item is not created
468 468
 	 */
469
-	private function createItemInternal($itemIndex,$itemType)
469
+	private function createItemInternal($itemIndex, $itemType)
470 470
 	{
471
-		if(($item=$this->createItem($itemIndex,$itemType))!==null)
471
+		if(($item=$this->createItem($itemIndex, $itemType))!==null)
472 472
 		{
473 473
 			$param=new TRepeaterItemEventParameter($item);
474 474
 			$this->onItemCreated($param);
@@ -487,9 +487,9 @@  discard block
 block discarded – undo
487 487
 	 * @param mixed data to be associated with the item
488 488
 	 * @return TControl the created item, null if item is not created
489 489
 	 */
490
-	private function createItemWithDataInternal($itemIndex,$itemType,$dataItem)
490
+	private function createItemWithDataInternal($itemIndex, $itemType, $dataItem)
491 491
 	{
492
-		if(($item=$this->createItem($itemIndex,$itemType))!==null)
492
+		if(($item=$this->createItem($itemIndex, $itemType))!==null)
493 493
 		{
494 494
 			$param=new TRepeaterItemEventParameter($item);
495 495
 			if($item instanceof IDataRenderer)
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	 * @param TListItemType item type
511 511
 	 * @return TControl created repeater item
512 512
 	 */
513
-	protected function createItem($itemIndex,$itemType)
513
+	protected function createItem($itemIndex, $itemType)
514 514
 	{
515 515
 		$template=null;
516 516
 		$classPath=null;
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 				$template=$this->_separatorTemplate;
541 541
 				break;
542 542
 			default:
543
-				throw new TInvalidDataValueException('repeater_itemtype_unknown',$itemType);
543
+				throw new TInvalidDataValueException('repeater_itemtype_unknown', $itemType);
544 544
 		}
545 545
 		if($classPath!=='')
546 546
 		{
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 	{
596 596
 		parent::saveState();
597 597
 		if($this->_items)
598
-			$this->setViewState('ItemCount',$this->_items->getCount(),0);
598
+			$this->setViewState('ItemCount', $this->_items->getCount(), 0);
599 599
 		else
600 600
 			$this->clearViewState('ItemCount');
601 601
 	}
@@ -629,19 +629,19 @@  discard block
 block discarded – undo
629 629
 	protected function restoreItemsFromViewState()
630 630
 	{
631 631
 		$this->reset();
632
-		if(($itemCount=$this->getViewState('ItemCount',0))>0)
632
+		if(($itemCount=$this->getViewState('ItemCount', 0)) > 0)
633 633
 		{
634 634
 			$items=$this->getItems();
635 635
 			$hasSeparator=$this->_separatorTemplate!==null || $this->getSeparatorRenderer()!=='';
636
-			$this->_header=$this->createItemInternal(-1,TListItemType::Header);
637
-			for($i=0;$i<$itemCount;++$i)
636
+			$this->_header=$this->createItemInternal(-1, TListItemType::Header);
637
+			for($i=0; $i < $itemCount; ++$i)
638 638
 			{
639
-				if($hasSeparator && $i>0)
640
-					$this->createItemInternal($i-1,TListItemType::Separator);
641
-				$itemType=$i%2==0?TListItemType::Item : TListItemType::AlternatingItem;
642
-				$items->add($this->createItemInternal($i,$itemType,false,null));
639
+				if($hasSeparator && $i > 0)
640
+					$this->createItemInternal($i - 1, TListItemType::Separator);
641
+				$itemType=$i % 2==0 ? TListItemType::Item : TListItemType::AlternatingItem;
642
+				$items->add($this->createItemInternal($i, $itemType, false, null));
643 643
 			}
644
-			$this->_footer=$this->createItemInternal(-1,TListItemType::Footer);
644
+			$this->_footer=$this->createItemInternal(-1, TListItemType::Footer);
645 645
 		}
646 646
 		else
647 647
 			$this->createEmptyContent();
@@ -668,25 +668,25 @@  discard block
 block discarded – undo
668 668
 		foreach($data as $key=>$dataItem)
669 669
 		{
670 670
 			if($keyField!=='')
671
-				$keys->add($this->getDataFieldValue($dataItem,$keyField));
671
+				$keys->add($this->getDataFieldValue($dataItem, $keyField));
672 672
 			else
673 673
 				$keys->add($key);
674 674
 			if($itemIndex===0)
675
-				$this->_header=$this->createItemWithDataInternal(-1,TListItemType::Header,null);
676
-			if($hasSeparator && $itemIndex>0)
677
-				$this->createItemWithDataInternal($itemIndex-1,TListItemType::Separator,null);
678
-			$itemType=$itemIndex%2==0?TListItemType::Item : TListItemType::AlternatingItem;
679
-			$items->add($this->createItemWithDataInternal($itemIndex,$itemType,$dataItem));
675
+				$this->_header=$this->createItemWithDataInternal(-1, TListItemType::Header, null);
676
+			if($hasSeparator && $itemIndex > 0)
677
+				$this->createItemWithDataInternal($itemIndex - 1, TListItemType::Separator, null);
678
+			$itemType=$itemIndex % 2==0 ? TListItemType::Item : TListItemType::AlternatingItem;
679
+			$items->add($this->createItemWithDataInternal($itemIndex, $itemType, $dataItem));
680 680
 			$itemIndex++;
681 681
 		}
682
-		if($itemIndex>0)
683
-			$this->_footer=$this->createItemWithDataInternal(-1,TListItemType::Footer,null);
682
+		if($itemIndex > 0)
683
+			$this->_footer=$this->createItemWithDataInternal(-1, TListItemType::Footer, null);
684 684
 		else
685 685
 		{
686 686
 			$this->createEmptyContent();
687 687
 			$this->dataBindChildren();
688 688
 		}
689
-		$this->setViewState('ItemCount',$itemIndex,0);
689
+		$this->setViewState('ItemCount', $itemIndex, 0);
690 690
 	}
691 691
 
692 692
 	/**
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 	 * @param TEventParameter event parameter
699 699
 	 * @return boolean whether the event bubbling should stop here.
700 700
 	 */
701
-	public function bubbleEvent($sender,$param)
701
+	public function bubbleEvent($sender, $param)
702 702
 	{
703 703
 		if($param instanceof TRepeaterCommandEventParameter)
704 704
 		{
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 	 */
722 722
 	public function onItemCreated($param)
723 723
 	{
724
-		$this->raiseEvent('OnItemCreated',$this,$param);
724
+		$this->raiseEvent('OnItemCreated', $this, $param);
725 725
 	}
726 726
 
727 727
 	/**
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 	 */
736 736
 	public function onItemDataBound($param)
737 737
 	{
738
-		$this->raiseEvent('OnItemDataBound',$this,$param);
738
+		$this->raiseEvent('OnItemDataBound', $this, $param);
739 739
 	}
740 740
 
741 741
 	/**
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
 	 */
755 755
 	public function onItemCommand($param)
756 756
 	{
757
-		$this->raiseEvent('OnItemCommand',$this,$param);
757
+		$this->raiseEvent('OnItemCommand', $this, $param);
758 758
 	}
759 759
 
760 760
 	/**
@@ -768,9 +768,9 @@  discard block
 block discarded – undo
768 768
 	 * @return mixed data value at the specified field
769 769
 	 * @throws TInvalidDataValueException if the data is invalid
770 770
 	 */
771
-	protected function getDataFieldValue($data,$field)
771
+	protected function getDataFieldValue($data, $field)
772 772
 	{
773
-		return TDataFieldAccessor::getDataFieldValue($data,$field);
773
+		return TDataFieldAccessor::getDataFieldValue($data, $field);
774 774
 	}
775 775
 }
776 776
 
@@ -842,11 +842,11 @@  discard block
 block discarded – undo
842 842
 	 * @param TControl original event sender
843 843
 	 * @param TCommandEventParameter original event parameter
844 844
 	 */
845
-	public function __construct($item,$source,TCommandEventParameter $param)
845
+	public function __construct($item, $source, TCommandEventParameter $param)
846 846
 	{
847 847
 		$this->_item=$item;
848 848
 		$this->_source=$source;
849
-		parent::__construct($param->getCommandName(),$param->getCommandParameter());
849
+		parent::__construct($param->getCommandName(), $param->getCommandParameter());
850 850
 	}
851 851
 
852 852
 	/**
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
 	 */
910 910
 	public function setItemType($value)
911 911
 	{
912
-		$this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType');
912
+		$this->_itemType=TPropertyValue::ensureEnum($value, 'TListItemType');
913 913
 	}
914 914
 
915 915
 	/**
@@ -977,11 +977,11 @@  discard block
 block discarded – undo
977 977
 	 * @param TEventParameter event parameter
978 978
 	 * @return boolean whether the event bubbling should stop here.
979 979
 	 */
980
-	public function bubbleEvent($sender,$param)
980
+	public function bubbleEvent($sender, $param)
981 981
 	{
982 982
 		if($param instanceof TCommandEventParameter)
983 983
 		{
984
-			$this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param));
984
+			$this->raiseBubbleEvent($this, new TRepeaterCommandEventParameter($this, $sender, $param));
985 985
 			return true;
986 986
 		}
987 987
 		else
@@ -1008,10 +1008,10 @@  discard block
 block discarded – undo
1008 1008
 	 * @param TControl new item
1009 1009
 	 * @throws TInvalidDataTypeException if the item to be inserted is not a control.
1010 1010
 	 */
1011
-	public function insertAt($index,$item)
1011
+	public function insertAt($index, $item)
1012 1012
 	{
1013 1013
 		if($item instanceof TControl)
1014
-			parent::insertAt($index,$item);
1014
+			parent::insertAt($index, $item);
1015 1015
 		else
1016 1016
 			throw new TInvalidDataTypeException('repeateritemcollection_item_invalid');
1017 1017
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFileUpload.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
 	{
77 77
 		$this->getPage()->ensureRenderInForm($this);
78 78
 		parent::addAttributesToRender($writer);
79
-		$writer->addAttribute('type','file');
80
-		$writer->addAttribute('name',$this->getUniqueID());
79
+		$writer->addAttribute('type', 'file');
80
+		$writer->addAttribute('name', $this->getUniqueID());
81 81
 		$isEnabled=$this->getEnabled(true);
82 82
 		if(!$isEnabled && $this->getEnabled())  // in this case parent will not render 'disabled'
83
-			$writer->addAttribute('disabled','disabled');
83
+			$writer->addAttribute('disabled', 'disabled');
84 84
 	}
85 85
 
86 86
 	/**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		parent::onPreRender($param);
94 94
 		if(($form=$this->getPage()->getForm())!==null)
95 95
 			$form->setEnctype('multipart/form-data');
96
-		$this->getPage()->getClientScript()->registerHiddenField('MAX_FILE_SIZE',$this->getMaxFileSize());
96
+		$this->getPage()->getClientScript()->registerHiddenField('MAX_FILE_SIZE', $this->getMaxFileSize());
97 97
 		if($this->getEnabled(true))
98 98
 			$this->getPage()->registerRequiresPostData($this);
99 99
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 */
105 105
 	public function getMaxFileSize()
106 106
 	{
107
-		return $this->getViewState('MaxFileSize',self::MAX_FILE_SIZE);
107
+		return $this->getViewState('MaxFileSize', self::MAX_FILE_SIZE);
108 108
 	}
109 109
 
110 110
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function setMaxFileSize($size)
119 119
 	{
120
-		$this->setViewState('MaxFileSize',TPropertyValue::ensureInteger($size),self::MAX_FILE_SIZE);
120
+		$this->setViewState('MaxFileSize', TPropertyValue::ensureInteger($size), self::MAX_FILE_SIZE);
121 121
 	}
122 122
 
123 123
 	/**
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 	 * If true, you will not be able to save the uploaded file again.
180 180
 	 * @return boolean true if the file saving is successful
181 181
 	 */
182
-	public function saveAs($fileName,$deleteTempFile=true)
182
+	public function saveAs($fileName, $deleteTempFile=true)
183 183
 	{
184 184
 		if($this->_errorCode===UPLOAD_ERR_OK)
185 185
 		{
186 186
 			if($deleteTempFile)
187
-				return move_uploaded_file($this->_localName,$fileName);
187
+				return move_uploaded_file($this->_localName, $fileName);
188 188
 			else if(is_uploaded_file($this->_localName))
189
-				return file_put_contents($fileName,file_get_contents($this->_localName))!==false;
189
+				return file_put_contents($fileName, file_get_contents($this->_localName))!==false;
190 190
 			else
191 191
 				return false;
192 192
 		}
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 * @param array the input data collection
202 202
 	 * @return boolean whether the data of the control has been changed
203 203
 	 */
204
-	public function loadPostData($key,$values)
204
+	public function loadPostData($key, $values)
205 205
 	{
206 206
 		if(isset($_FILES[$key]))
207 207
 		{
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function onFileUpload($param)
237 237
 	{
238
-		$this->raiseEvent('OnFileUpload',$this,$param);
238
+		$this->raiseEvent('OnFileUpload', $this, $param);
239 239
 	}
240 240
 
241 241
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TLiteral.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public function getText()
38 38
 	{
39
-		return $this->getViewState('Text','');
39
+		return $this->getViewState('Text', '');
40 40
 	}
41 41
 
42 42
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function setText($value)
47 47
 	{
48
-		$this->setViewState('Text',TPropertyValue::ensureString($value),'');
48
+		$this->setViewState('Text', TPropertyValue::ensureString($value), '');
49 49
 	}
50 50
 
51 51
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function getEncode()
81 81
 	{
82
-		return $this->getViewState('Encode',false);
82
+		return $this->getViewState('Encode', false);
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function setEncode($value)
89 89
 	{
90
-		$this->setViewState('Encode',TPropertyValue::ensureBoolean($value),false);
90
+		$this->setViewState('Encode', TPropertyValue::ensureBoolean($value), false);
91 91
 	}
92 92
 
93 93
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TRegularExpressionValidator.php 1 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.