Completed
Push — intl ( b391f2...20c33e )
by Fabio
08:04
created
framework/Web/UI/ActiveControls/TActiveClientScript.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	protected function renderCustomScriptFile($writer)
43 43
 	{
44
-		if(($scriptUrl = $this->getScriptUrl())!=='')
44
+		if(($scriptUrl=$this->getScriptUrl())!=='')
45 45
 		{
46 46
 			if($this->getPage()->getIsCallback())
47 47
 			{
48
-				$cs = $this->getPage()->getClientScript();
48
+				$cs=$this->getPage()->getClientScript();
49 49
 				$uniqueid=$this->ClientID.'_custom';
50 50
 				if(!$cs->isScriptFileRegistered($uniqueid))
51 51
 					$cs->registerScriptFile($uniqueid, $scriptUrl);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		{
66 66
 			if($this->getPage()->getIsCallback())
67 67
 			{
68
-				$extWriter= $this->getPage()->getResponse()->createHtmlWriter();
68
+				$extWriter=$this->getPage()->getResponse()->createHtmlWriter();
69 69
 				$extWriter->write("/*<![CDATA[*/\n");
70 70
 				$this->renderChildren($extWriter);
71 71
 				$extWriter->write("\n/*]]>*/");
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	public function getClientSide()
37 37
 	{
38 38
 		if($this->_clientSide===null)
39
-			$this->_clientSide = $this->createClientSide();
39
+			$this->_clientSide=$this->createClientSide();
40 40
 		return $this->_clientSide;
41 41
 	}
42 42
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackClientSide.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	public function setEnablePageStateUpdate($value)
266 266
 	{
267
-		$enabled = TPropertyValue::ensureBoolean($value);
267
+		$enabled=TPropertyValue::ensureBoolean($value);
268 268
 		$this->setOption('EnablePageStateUpdate', $enabled);
269 269
 	}
270 270
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	public function getEnablePageStateUpdate()
276 276
 	{
277
-		$option = $this->getOption('EnablePageStateUpdate');
277
+		$option=$this->getOption('EnablePageStateUpdate');
278 278
 		return ($option===null) ? true : $option;
279 279
 	}
280 280
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	public function setPostBackTarget($value)
293 293
 	{
294 294
 		if($value instanceof TControl)
295
-			$value = $value->getUniqueID();
295
+			$value=$value->getUniqueID();
296 296
 		$this->setOption('EventTarget', $value);
297 297
 	}
298 298
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	}
205 205
 
206 206
 	/**
207
-	 * @return boolean true to post the inputs of the form on callback, default
207
+	 * @return string true to post the inputs of the form on callback, default
208 208
 	 * is post the inputs on callback.
209 209
 	 */
210 210
 	public function getPostState()
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	}
223 223
 
224 224
 	/**
225
-	 * @return integer callback request timeout.
225
+	 * @return string callback request timeout.
226 226
 	 */
227 227
 	public function getRequestTimeOut()
228 228
 	{
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	}
251 251
 
252 252
 	/**
253
-	 * @return boolean client-side viewstate will be updated on callback
253
+	 * @return boolean|string client-side viewstate will be updated on callback
254 254
 	 * response if true. Default is true.
255 255
 	 */
256 256
 	public function getEnablePageStateUpdate()
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableRow.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
 		{
120 120
 			$this->raiseCallbackEvent($param);
121 121
 			return true;
122
-		}
123
-		else return false;
122
+		} else return false;
124 123
 	}
125 124
 
126 125
 	/**
@@ -163,8 +162,7 @@  discard block
 block discarded – undo
163 162
 			parent::render($writer);
164 163
 			if ($this->getActiveControl()->canUpdateClientSide())
165 164
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
166
-		}
167
-		else
165
+		} else
168 166
 		{
169 167
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
170 168
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -100,6 +100,7 @@  discard block
 block discarded – undo
100 100
 	 * TActiveTableRow.
101 101
 	 * This method is mainly used by framework and control developers.
102 102
 	 * @param TCallbackEventParameter the event parameter
103
+	 * @param TActiveTableCellEventParameter $param
103 104
 	 */
104 105
 	public function raiseCallbackEvent($param)
105 106
 	{
@@ -131,6 +132,7 @@  discard block
 block discarded – undo
131 132
 	 * method, be sure to call the parent implementation so that the event
132 133
 	 * handler can be invoked.
133 134
 	 * @param TActiveTableRowEventParameter event parameter to be passed to the event handlers
135
+	 * @param TActiveTableRowEventParameter $param
134 136
 	 */
135 137
 	public function onRowSelected($param)
136 138
 	{
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function raiseCallbackEvent($param)
105 105
 	{
106
-		$parameter = new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
106
+		$parameter=new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
107 107
 		$this->onRowSelected($parameter);
108 108
 	}
109 109
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	public function bubbleEvent($sender, $param)
119 119
 	{
120
-		if ($param instanceof TActiveTableCellEventParameter)
120
+		if($param instanceof TActiveTableCellEventParameter)
121 121
 		{
122 122
 			$this->raiseCallbackEvent($param);
123 123
 			return true;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	{
148 148
 		parent::addAttributesToRender($writer);
149 149
 		$writer->addAttribute('id', $this->getClientID());
150
-		if ($this->hasEventHandler('OnRowSelected'))
150
+		if($this->hasEventHandler('OnRowSelected'))
151 151
 			$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
152 152
 	}
153 153
 
@@ -160,10 +160,10 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function render($writer)
162 162
 	{
163
-		if ($this->getHasPreRendered())
163
+		if($this->getHasPreRendered())
164 164
 		{
165 165
 			parent::render($writer);
166
-			if ($this->getActiveControl()->canUpdateClientSide())
166
+			if($this->getActiveControl()->canUpdateClientSide())
167 167
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
168 168
 		}
169 169
 		else
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
172 172
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
173 173
 			// because the whole content will be replaced by the parent.
174
-			if ($this->getHasControls())
174
+			if($this->getHasControls())
175 175
 			{
176
-				foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control)
176
+				foreach($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control)
177 177
 					$control->getActiveControl()->setEnableUpdate(false);
178 178
 			}
179 179
 		}
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	protected function getPostBackOptions()
188 188
 	{
189
-		$options['ID'] = $this->getClientID();
190
-		$options['EventTarget'] = $this->getUniqueID();
189
+		$options['ID']=$this->getClientID();
190
+		$options['EventTarget']=$this->getUniqueID();
191 191
 		return $options;
192 192
 	}
193 193
 
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	public function getRowIndex()
201 201
 	{
202
-		foreach ($this->getTable()->getRows() as $key => $row)
203
-			if ($row == $this) return $key;
202
+		foreach($this->getTable()->getRows() as $key => $row)
203
+			if($row==$this) return $key;
204 204
 		throw new TConfigurationException('tactivetablerow_control_notincollection', get_class($this), $this->getUniqueID());
205 205
 	}
206 206
 
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
 	 */
212 212
 	public function getTable()
213 213
 	{
214
-		if ($this->_table === null)
214
+		if($this->_table===null)
215 215
 		{
216
-			$table = $this->getParent();
217
-			while (!($table instanceof TTable) && $table !== null)
216
+			$table=$this->getParent();
217
+			while(!($table instanceof TTable) && $table!==null)
218 218
 			{
219
-				$table = $table->getParent();
219
+				$table=$table->getParent();
220 220
 			}
221
-			if ($table instanceof TTable) $this->_table = $table;
221
+			if($table instanceof TTable) $this->_table=$table;
222 222
 			else throw new TConfigurationException('tactivetablerow_control_outoftable', get_class($this), $this->getUniqueID());
223 223
 		}
224 224
 		return $this->_table;
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackEventParameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
 	 */
48 48
 	public function __construct($response, $parameter)
49 49
 	{
50
-		$this->_response = $response;
51
-		$this->_parameter = $parameter;
50
+		$this->_response=$response;
51
+		$this->_parameter=$parameter;
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TEventTriggeredCallback.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
 	 */
65 65
 	protected function getTriggerOptions()
66 66
 	{
67
-		$options = parent::getTriggerOptions();
68
-		$name = preg_replace('/^on/', '', $this->getEventName());
69
-		$options['EventName'] = strtolower($name);
70
-		$options['StopEvent'] = $this->getPreventDefaultAction();
67
+		$options=parent::getTriggerOptions();
68
+		$name=preg_replace('/^on/', '', $this->getEventName());
69
+		$options['EventName']=strtolower($name);
70
+		$options['StopEvent']=$this->getPreventDefaultAction();
71 71
 		return $options;
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THyperLinkColumn.php 2 patches
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function getText()
56 56
 	{
57
-		return $this->getViewState('Text','');
57
+		return $this->getViewState('Text', '');
58 58
 	}
59 59
 
60 60
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setText($value)
65 65
 	{
66
-		$this->setViewState('Text',$value,'');
66
+		$this->setViewState('Text', $value, '');
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function getDataTextField()
73 73
 	{
74
-		return $this->getViewState('DataTextField','');
74
+		return $this->getViewState('DataTextField', '');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setDataTextField($value)
81 81
 	{
82
-		$this->setViewState('DataTextField',$value,'');
82
+		$this->setViewState('DataTextField', $value, '');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getDataTextFormatString()
89 89
 	{
90
-		return $this->getViewState('DataTextFormatString','');
90
+		return $this->getViewState('DataTextFormatString', '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setDataTextFormatString($value)
97 97
 	{
98
-		$this->setViewState('DataTextFormatString',$value,'');
98
+		$this->setViewState('DataTextFormatString', $value, '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getImageHeight()
105 105
 	{
106
-		return $this->getViewState('ImageHeight','');
106
+		return $this->getViewState('ImageHeight', '');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setImageHeight($value)
113 113
 	{
114
-		$this->setViewState('ImageHeight',$value,'');
114
+		$this->setViewState('ImageHeight', $value, '');
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getImageUrl()
121 121
 	{
122
-		return $this->getViewState('ImageUrl','');
122
+		return $this->getViewState('ImageUrl', '');
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setImageUrl($value)
129 129
 	{
130
-		$this->setViewState('ImageUrl',$value,'');
130
+		$this->setViewState('ImageUrl', $value, '');
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getImageWidth()
137 137
 	{
138
-		return $this->getViewState('ImageWidth','');
138
+		return $this->getViewState('ImageWidth', '');
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setImageWidth($value)
145 145
 	{
146
-		$this->setViewState('ImageWidth',$value,'');
146
+		$this->setViewState('ImageWidth', $value, '');
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getNavigateUrl()
153 153
 	{
154
-		return $this->getViewState('NavigateUrl','');
154
+		return $this->getViewState('NavigateUrl', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function setNavigateUrl($value)
162 162
 	{
163
-		$this->setViewState('NavigateUrl',$value,'');
163
+		$this->setViewState('NavigateUrl', $value, '');
164 164
 	}
165 165
 
166 166
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getDataNavigateUrlField()
170 170
 	{
171
-		return $this->getViewState('DataNavigateUrlField','');
171
+		return $this->getViewState('DataNavigateUrlField', '');
172 172
 	}
173 173
 
174 174
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setDataNavigateUrlField($value)
178 178
 	{
179
-		$this->setViewState('DataNavigateUrlField',$value,'');
179
+		$this->setViewState('DataNavigateUrlField', $value, '');
180 180
 	}
181 181
 
182 182
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getDataNavigateUrlFormatString()
186 186
 	{
187
-		return $this->getViewState('DataNavigateUrlFormatString','');
187
+		return $this->getViewState('DataNavigateUrlFormatString', '');
188 188
 	}
189 189
 
190 190
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	public function setDataNavigateUrlFormatString($value)
194 194
 	{
195
-		$this->setViewState('DataNavigateUrlFormatString',$value,'');
195
+		$this->setViewState('DataNavigateUrlFormatString', $value, '');
196 196
 	}
197 197
 
198 198
 	/**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 */
201 201
 	public function getTarget()
202 202
 	{
203
-		return $this->getViewState('Target','');
203
+		return $this->getViewState('Target', '');
204 204
 	}
205 205
 
206 206
 	/**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function setTarget($value)
211 211
 	{
212
-		$this->setViewState('Target',$value,'');
212
+		$this->setViewState('Target', $value, '');
213 213
 	}
214 214
 
215 215
 	/**
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 	 * @param integer the index to the Columns property that the cell resides in.
221 221
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
222 222
 	 */
223
-	public function initializeCell($cell,$columnIndex,$itemType)
223
+	public function initializeCell($cell, $columnIndex, $itemType)
224 224
 	{
225 225
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
226 226
 		{
227 227
 			$link=new THyperLink;
228
-			if(($url = $this->getImageUrl())!=='')
228
+			if(($url=$this->getImageUrl())!=='')
229 229
 			{
230 230
 				$link->setImageUrl($url);
231 231
 				if(($width=$this->getImageWidth())!=='')
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
 			$link->setNavigateUrl($this->getNavigateUrl());
238 238
 			$link->setTarget($this->getTarget());
239 239
 			if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='')
240
-				$link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
240
+				$link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
241 241
 			$cell->getControls()->add($link);
242
-			$cell->registerObject('HyperLink',$link);
242
+			$cell->registerObject('HyperLink', $link);
243 243
 		}
244 244
 		else
245
-			parent::initializeCell($cell,$columnIndex,$itemType);
245
+			parent::initializeCell($cell, $columnIndex, $itemType);
246 246
 	}
247 247
 
248 248
 	/**
@@ -250,20 +250,20 @@  discard block
 block discarded – undo
250 250
 	 * This method is invoked when datagrid performs databinding.
251 251
 	 * It populates the content of the cell with the relevant data from data source.
252 252
 	 */
253
-	public function dataBindColumn($sender,$param)
253
+	public function dataBindColumn($sender, $param)
254 254
 	{
255 255
 		$item=$sender->getNamingContainer();
256 256
 		$data=$item->getData();
257 257
 		if(($field=$this->getDataTextField())!=='')
258 258
 		{
259
-			$value=$this->getDataFieldValue($data,$field);
260
-			$text=$this->formatDataValue($this->getDataTextFormatString(),$value);
259
+			$value=$this->getDataFieldValue($data, $field);
260
+			$text=$this->formatDataValue($this->getDataTextFormatString(), $value);
261 261
 			$sender->setText($text);
262 262
 		}
263 263
 		if(($field=$this->getDataNavigateUrlField())!=='')
264 264
 		{
265
-			$value=$this->getDataFieldValue($data,$field);
266
-			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(),$value);
265
+			$value=$this->getDataFieldValue($data, $field);
266
+			$url=$this->formatDataValue($this->getDataNavigateUrlFormatString(), $value);
267 267
 			$sender->setNavigateUrl($url);
268 268
 		}
269 269
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@
 block discarded – undo
233 233
 				$link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
234 234
 			$cell->getControls()->add($link);
235 235
 			$cell->registerObject('HyperLink',$link);
236
-		}
237
-		else
236
+		} else
238 237
 			parent::initializeCell($cell,$columnIndex,$itemType);
239 238
 	}
240 239
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THtmlElement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public function getTagName()
39 39
 	{
40
-		return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName());
40
+		return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName());
41 41
 	}
42 42
 
43 43
 	/**
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
 	 * @return boolean true if TagName has deviated from the default.
62 62
 	 */
63 63
 	public function getIsMutated() {
64
-		return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName();
64
+		return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName();
65 65
 	}
66 66
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TContentPlaceHolder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	{
40 40
 		if(($id=$this->getID())==='')
41 41
 			throw new TConfigurationException('contentplaceholder_id_required');
42
-		$this->getTemplateControl()->registerContentPlaceHolder($id,$this);
42
+		$this->getTemplateControl()->registerContentPlaceHolder($id, $this);
43 43
 		$parent->getControls()->add($this);
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.