Completed
Push — scrutinizer ( 5826f3...ba0b09 )
by Fabio
11:34
created
framework/Web/UI/JuiControls/TJuiProgressbar.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * TJuiProgressbar class file.
4
- *
5
- * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
- * @link https://github.com/pradosoft/prado
7
- * @copyright Copyright &copy; 2013-2015 PradoSoft
8
- * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
- * @package System.Web.UI.JuiControls
10
- */
3
+	 * TJuiProgressbar class file.
4
+	 *
5
+	 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
+	 * @link https://github.com/pradosoft/prado
7
+	 * @copyright Copyright &copy; 2013-2015 PradoSoft
8
+	 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
+	 * @package System.Web.UI.JuiControls
10
+	 */
11 11
 
12 12
 Prado::using('System.Web.UI.JuiControls.TJuiControlAdapter');
13 13
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function getOptions()
70 70
 	{
71
-		if (($options=$this->getViewState('JuiOptions'))===null)
71
+		if(($options=$this->getViewState('JuiOptions'))===null)
72 72
 		{
73 73
 		  $options=new TJuiControlOptions($this);
74 74
 		  $this->setViewState('JuiOptions', $options);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	{
111 111
 		parent::addAttributesToRender($writer);
112 112
 
113
-		$writer->addAttribute('id',$this->getClientID());
113
+		$writer->addAttribute('id', $this->getClientID());
114 114
 		$options=TJavascript::encode($this->getPostBackOptions());
115 115
 		$cs=$this->getPage()->getClientScript();
116 116
 		$code="jQuery('#".$this->getWidgetID()."').".$this->getWidget()."(".$options.");";
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveListControlAdapter.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
 		}
121 121
 	}
122 122
 
123
-    /**
124
-     * Clears all existing selections on the client side.
125
-     */
126
-    public function clearSelection()
127
-    {
123
+	/**
124
+	 * Clears all existing selections on the client side.
125
+	 */
126
+	public function clearSelection()
127
+	{
128 128
 		if($this->canUpdateClientSide())
129 129
 		{
130 130
 			$this->updateListItems();
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 				$this->getPage()->getCallbackClient()->select($this->getControl(), 'Clear');
138 138
 			}
139 139
 		}
140
-    }
140
+	}
141 141
 
142 142
 	/**
143 143
 	 * Update the client-side list options.
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
 		if($this->canUpdateClientSide())
68 68
 		{
69 69
 			$this->updateListItems();
70
-			$n = $this->getControl()->getItemCount();
70
+			$n=$this->getControl()->getItemCount();
71 71
 
72 72
 			$promptValue=$this->getControl()->getPromptValue();
73 73
 			if($promptValue==='')
74 74
 				$promptValue=$this->getControl()->getPromptText();
75 75
 
76
-			$list = array();
76
+			$list=array();
77 77
 			foreach($indices as $index)
78 78
 			{
79
-				$index = intval($index);
79
+				$index=intval($index);
80 80
 				if($promptValue!=='')
81 81
 					$index++;
82 82
 				if($index >= 0 && $index <= $n)
83
-					$list[] = $index;
83
+					$list[]=$index;
84 84
 			}
85 85
 			if(count($list) > 0)
86 86
 				$this->getPage()->getCallbackClient()->select(
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 		if($this->canUpdateClientSide())
112 112
 		{
113 113
 			$this->updateListItems();
114
-			$list = array();
114
+			$list=array();
115 115
 			foreach($values as $value)
116
-				$list[] = $value;
116
+				$list[]=$value;
117 117
 			if(count($list) > 0)
118 118
 				$this->getPage()->getCallbackClient()->select(
119 119
 					$this->getControl(), 'Values', $list);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	{
147 147
 		if($this->canUpdateClientSide())
148 148
 		{
149
-			$items = $this->getControl()->getItems();
149
+			$items=$this->getControl()->getItems();
150 150
 			if($items instanceof TActiveListItemCollection
151 151
 				&& $items->getListHasChanged())
152 152
 			{
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function setControl(IActiveControl $control)
199 199
 	{
200
-		$this->_control = $control;
200
+		$this->_control=$control;
201 201
 	}
202 202
 
203 203
 	/**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 */
222 222
 	public function updateClientSide()
223 223
 	{
224
-		$client = $this->getControl()->getPage()->getCallbackClient();
224
+		$client=$this->getControl()->getPage()->getCallbackClient();
225 225
 		$client->setListItems($this->getControl(), $this);
226 226
 		$this->_hasChanged=false;
227 227
 	}
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	{
239 239
 		parent::insertAt($index, $value);
240 240
 		if($this->canUpdateClientSide())
241
-			$this->_hasChanged = true;
241
+			$this->_hasChanged=true;
242 242
 	}
243 243
 
244 244
 	/**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	{
250 250
 		parent::removeAt($index);
251 251
 		if($this->canUpdateClientSide())
252
-			$this->_hasChanged = true;
252
+			$this->_hasChanged=true;
253 253
 	}
254 254
 }
255 255
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TKeyboard.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -173,15 +173,15 @@
 block discarded – undo
173 173
 	{
174 174
 		if(($forControl=$this->getForControl())==='')
175 175
 			throw new TConfigurationException('keyboard_forcontrol_required');
176
-	    if(($target=$this->findControl($forControl))===null)
177
-	        throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl);
176
+		if(($target=$this->findControl($forControl))===null)
177
+			throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl);
178 178
 
179
-	    $options['ID'] = $this->getClientID();
180
-	    $options['ForControl'] = $target->getClientID();
181
-	    $options['AutoHide'] = $this->getAutoHide();
182
-	    $options['CssClass'] = $this->getKeyboardCssClass();
179
+		$options['ID'] = $this->getClientID();
180
+		$options['ForControl'] = $target->getClientID();
181
+		$options['AutoHide'] = $this->getAutoHide();
182
+		$options['CssClass'] = $this->getKeyboardCssClass();
183 183
 
184
-	    return $options;
184
+		return $options;
185 185
 	}
186 186
 }
187 187
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function getForControl()
44 44
 	{
45
-		return $this->getViewState('ForControl','');
45
+		return $this->getViewState('ForControl', '');
46 46
 	}
47 47
 
48 48
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	{
132 132
 		parent::addAttributesToRender($writer);
133 133
 		if($this->getPage()->getClientSupportsJavaScript())
134
-			$writer->addAttribute('id',$this->getClientID());
134
+			$writer->addAttribute('id', $this->getClientID());
135 135
 	}
136 136
 
137 137
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	{
144 144
 		if(($url=$this->getCssUrl())==='')
145 145
 			$url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'keyboard.css');
146
-		$this->getPage()->getClientScript()->registerStyleSheetFile($url,$url);
146
+		$this->getPage()->getClientScript()->registerStyleSheetFile($url, $url);
147 147
 	}
148 148
 
149 149
 	/**
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
 		if(($forControl=$this->getForControl())==='')
175 175
 			throw new TConfigurationException('keyboard_forcontrol_required');
176 176
 	    if(($target=$this->findControl($forControl))===null)
177
-	        throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl);
177
+	        throw new TConfigurationException('keyboard_forcontrol_invalid', $forControl);
178 178
 
179
-	    $options['ID'] = $this->getClientID();
180
-	    $options['ForControl'] = $target->getClientID();
181
-	    $options['AutoHide'] = $this->getAutoHide();
182
-	    $options['CssClass'] = $this->getKeyboardCssClass();
179
+	    $options['ID']=$this->getClientID();
180
+	    $options['ForControl']=$target->getClientID();
181
+	    $options['AutoHide']=$this->getAutoHide();
182
+	    $options['CssClass']=$this->getKeyboardCssClass();
183 183
 
184 184
 	    return $options;
185 185
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TItemDataRenderer.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
  *
20 20
  * The following property is provided by TDataRenderer:
21 21
  * - {@link getData Data}: data associated with this renderer.
22
-
23 22
  * @author Qiang Xue <[email protected]>
24 23
  * @package System.Web.UI.WebControls
25 24
  * @since 3.1.2
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 */
56 56
 	public function setItemType($value)
57 57
 	{
58
-		$this->_itemType=TPropertyValue::ensureEnum($value,'TListItemType');
58
+		$this->_itemType=TPropertyValue::ensureEnum($value, 'TListItemType');
59 59
 	}
60 60
 
61 61
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTableCell.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 	/**
91 91
 	 * Sets the horizontal alignment of the contents within the table item.
92
-     * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
92
+	 * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
93 93
 	 * @param string the horizontal alignment
94 94
 	 */
95 95
 	public function setHorizontalAlign($value)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	/**
112 112
 	 * Sets the vertical alignment of the contents within the table item.
113
-     * Valid values include 'NotSet','Top','Bottom','Middle'
113
+	 * Valid values include 'NotSet','Top','Bottom','Middle'
114 114
 	 * @param string the horizontal alignment
115 115
 	 */
116 116
 	public function setVerticalAlign($value)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getText()
153 153
 	{
154
-		return $this->getViewState('Text','');
154
+		return $this->getViewState('Text', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function setText($value)
163 163
 	{
164
-		$this->setViewState('Text',$value,'');
164
+		$this->setViewState('Text', $value, '');
165 165
 	}
166 166
 
167 167
 	/**
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
 	protected function addAttributesToRender($writer)
198 198
 	{
199 199
 		parent::addAttributesToRender($writer);
200
-		if(($colspan=$this->getColumnSpan())>0)
201
-			$writer->addAttribute('colspan',"$colspan");
202
-		if(($rowspan=$this->getRowSpan())>0)
203
-			$writer->addAttribute('rowspan',"$rowspan");
200
+		if(($colspan=$this->getColumnSpan()) > 0)
201
+			$writer->addAttribute('colspan', "$colspan");
202
+		if(($rowspan=$this->getRowSpan()) > 0)
203
+			$writer->addAttribute('rowspan', "$rowspan");
204 204
 	}
205 205
 
206 206
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TPanel.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
 
102 102
 	/**
103 103
 	 * Sets the horizontal alignment of the contents within the panel.
104
-     * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
104
+	 * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
105 105
 	 * @param string the horizontal alignment
106 106
 	 */
107 107
 	public function setHorizontalAlign($value)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	{
72 72
 		parent::addAttributesToRender($writer);
73 73
 		if(($butt=$this->getDefaultButton())!=='')
74
-			$writer->addAttribute('id',$this->getClientID());
74
+			$writer->addAttribute('id', $this->getClientID());
75 75
 	}
76 76
 
77 77
 	/**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function getGroupingText()
170 170
 	{
171
-		return $this->getViewState('GroupingText','');
171
+		return $this->getViewState('GroupingText', '');
172 172
 	}
173 173
 
174 174
 	/**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function setGroupingText($value)
178 178
 	{
179
-		$this->setViewState('GroupingText',$value,'');
179
+		$this->setViewState('GroupingText', $value, '');
180 180
 	}
181 181
 
182 182
 	/**
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		if(($butt=$this->getDefaultButton())!=='')
231 231
 		{
232 232
 			if(($button=$this->findControl($butt))===null)
233
-				throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt);
233
+				throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
234 234
 			else
235 235
 				$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
236 236
 		}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveLabel.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
 	 * @param THtmlWriter the writer used for the rendering purpose
61 61
 	 */
62 62
 	protected function addAttributesToRender($writer) {
63
-	    $writer->addAttribute('id',$this->getClientID());
64
-	    parent::addAttributesToRender($writer);
63
+		$writer->addAttribute('id',$this->getClientID());
64
+		parent::addAttributesToRender($writer);
65 65
 	}
66 66
 
67 67
 	/**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setText($value)
57 57
 	{
58
-		if(parent::getText() === $value)
58
+		if(parent::getText()===$value)
59 59
 			return;
60 60
 
61 61
 		parent::setText($value);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setForControl($value)
73 73
 	{
74
-		if(parent::getForControl() === $value)
74
+		if(parent::getForControl()===$value)
75 75
 			return;
76 76
 
77 77
 		parent::setForControl($value);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @param THtmlWriter the writer used for the rendering purpose
88 88
 	 */
89 89
 	protected function addAttributesToRender($writer) {
90
-	    $writer->addAttribute('id',$this->getClientID());
90
+	    $writer->addAttribute('id', $this->getClientID());
91 91
 	    parent::addAttributesToRender($writer);
92 92
 	}
93 93
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackClientSide.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	}
200 200
 
201 201
 	/**
202
-	 * @return boolean true to post the inputs of the form on callback, default
202
+	 * @return string true to post the inputs of the form on callback, default
203 203
 	 * is post the inputs on callback.
204 204
 	 */
205 205
 	public function getPostState()
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	}
218 218
 
219 219
 	/**
220
-	 * @return integer callback request timeout.
220
+	 * @return string callback request timeout.
221 221
 	 */
222 222
 	public function getRequestTimeOut()
223 223
 	{
@@ -261,6 +261,7 @@  discard block
 block discarded – undo
261 261
 	 * update. This will automatically set HasPrority to true.
262 262
 	 * @param boolean true enables the callback response to update the
263 263
 	 * viewstate.
264
+	 * @param boolean $value
264 265
 	 */
265 266
 	public function setEnablePageStateUpdate($value)
266 267
 	{
@@ -269,7 +270,7 @@  discard block
 block discarded – undo
269 270
 	}
270 271
 
271 272
 	/**
272
-	 * @return boolean client-side viewstate will be updated on callback
273
+	 * @return boolean|string client-side viewstate will be updated on callback
273 274
 	 * response if true. Default is true.
274 275
 	 */
275 276
 	public function getEnablePageStateUpdate()
Please login to merge, or discard this patch.
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.
framework/Web/UI/ActiveControls/TActiveDataGrid.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	/**
71
-	* Creates a new callback control, sets the adapter to
72
-	* TActiveControlAdapter.
73
-	*/
71
+	 * Creates a new callback control, sets the adapter to
72
+	 * TActiveControlAdapter.
73
+	 */
74 74
 	public function __construct() {
75 75
 		parent::__construct();
76 76
 		$this->setAdapter(new TActiveControlAdapter($this));
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @param string $value container tag
112 112
 	 */
113 113
 	public function setSurroundingTag($value) {
114
-    $this->_surroundingTag=TPropertyValue::ensureString($value);
114
+	$this->_surroundingTag=TPropertyValue::ensureString($value);
115 115
 	}
116 116
 
117 117
 	/**
Please login to merge, or discard this patch.
Braces   +34 added lines, -68 removed lines patch added patch discarded remove patch
@@ -145,8 +145,7 @@  discard block
 block discarded – undo
145 145
 				$button->setText($text);
146 146
 				return $button;
147 147
 			}
148
-		}
149
-		else {
148
+		} else {
150 149
 			$button=new TActiveButton;
151 150
 			if(!$enabled)
152 151
 				$button->setEnabled(false);
@@ -180,8 +179,7 @@  discard block
 block discarded – undo
180 179
 		if($this->getHasPreRendered()) {
181 180
 			$this->renderDataGrid($writer);
182 181
 			if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer);
183
-		}
184
-		else {
182
+		} else {
185 183
 			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
186 184
 		}
187 185
 	}
@@ -248,8 +246,7 @@  discard block
 block discarded – undo
248 246
 				$control->setData($text);
249 247
 			}
250 248
 			$cell->getControls()->add($control);
251
-		}
252
-		else if($this->getAllowSorting()) {
249
+		} else if($this->getAllowSorting()) {
253 250
 				$sortExpression=$this->getSortExpression();
254 251
 				if(($url=$this->getHeaderImageUrl())!=='') {
255 252
 					$button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton');
@@ -262,19 +259,16 @@  discard block
 block discarded – undo
262 259
 					}
263 260
 					$button->setCausesValidation(false);
264 261
 					$cell->getControls()->add($button);
265
-				}
266
-				else if($text!=='') {
262
+				} else if($text!=='') {
267 263
 						$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
268 264
 						$button->setText($text);
269 265
 						$button->setCommandName(TDataGrid::CMD_SORT);
270 266
 						$button->setCommandParameter($sortExpression);
271 267
 						$button->setCausesValidation(false);
272 268
 						$cell->getControls()->add($button);
273
-					}
274
-					else
269
+					} else
275 270
 						$cell->setText('&nbsp;');
276
-			}
277
-			else {
271
+			} else {
278 272
 				if(($url=$this->getHeaderImageUrl())!=='') {
279 273
 					$image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage');
280 274
 					$image->setImageUrl($url);
@@ -283,8 +277,7 @@  discard block
 block discarded – undo
283 277
 						$image->setToolTip($text);
284 278
 					}
285 279
 					$cell->getControls()->add($image);
286
-				}
287
-				else if($text!=='')
280
+				} else if($text!=='')
288 281
 						$cell->setText($text);
289 282
 					else
290 283
 						$cell->setText('&nbsp;');
@@ -376,8 +369,7 @@  discard block
 block discarded – undo
376 369
 				$button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
377 370
 			$cell->getControls()->add($button);
378 371
 			$cell->registerObject('Button',$button);
379
-		}
380
-		else
372
+		} else
381 373
 			parent::initializeCell($cell,$columnIndex,$itemType);
382 374
 	}
383 375
 }
@@ -416,8 +408,7 @@  discard block
 block discarded – undo
416 408
 				$control->setData($text);
417 409
 			}
418 410
 			$cell->getControls()->add($control);
419
-		}
420
-		else if($this->getAllowSorting()) {
411
+		} else if($this->getAllowSorting()) {
421 412
 				$sortExpression=$this->getSortExpression();
422 413
 				if(($url=$this->getHeaderImageUrl())!=='') {
423 414
 					$button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton');
@@ -428,27 +419,23 @@  discard block
 block discarded – undo
428 419
 						$button->setAlternateText($text);
429 420
 					$button->setCausesValidation(false);
430 421
 					$cell->getControls()->add($button);
431
-				}
432
-				else if($text!=='') {
422
+				} else if($text!=='') {
433 423
 						$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
434 424
 						$button->setText($text);
435 425
 						$button->setCommandName(TDataGrid::CMD_SORT);
436 426
 						$button->setCommandParameter($sortExpression);
437 427
 						$button->setCausesValidation(false);
438 428
 						$cell->getControls()->add($button);
439
-					}
440
-					else
429
+					} else
441 430
 						$cell->setText('&nbsp;');
442
-			}
443
-			else {
431
+			} else {
444 432
 				if(($url=$this->getHeaderImageUrl())!=='') {
445 433
 					$image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage');
446 434
 					$image->setImageUrl($url);
447 435
 					if($text!=='')
448 436
 						$image->setAlternateText($text);
449 437
 					$cell->getControls()->add($image);
450
-				}
451
-				else if($text!=='')
438
+				} else if($text!=='')
452 439
 						$cell->setText($text);
453 440
 					else
454 441
 						$cell->setText('&nbsp;');
@@ -491,8 +478,7 @@  discard block
 block discarded – undo
491 478
 				$control->setData($text);
492 479
 			}
493 480
 			$cell->getControls()->add($control);
494
-		}
495
-		else if($this->getAllowSorting())
481
+		} else if($this->getAllowSorting())
496 482
 		{
497 483
 			$sortExpression=$this->getSortExpression();
498 484
 			if(($url=$this->getHeaderImageUrl())!=='')
@@ -505,8 +491,7 @@  discard block
 block discarded – undo
505 491
 					$button->setAlternateText($text);
506 492
 				$button->setCausesValidation(false);
507 493
 				$cell->getControls()->add($button);
508
-			}
509
-			else if($text!=='')
494
+			} else if($text!=='')
510 495
 			{
511 496
 				$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
512 497
 				$button->setText($text);
@@ -514,11 +499,9 @@  discard block
 block discarded – undo
514 499
 				$button->setCommandParameter($sortExpression);
515 500
 				$button->setCausesValidation(false);
516 501
 				$cell->getControls()->add($button);
517
-			}
518
-			else
502
+			} else
519 503
 				$cell->setText('&nbsp;');
520
-		}
521
-		else
504
+		} else
522 505
 		{
523 506
 			if(($url=$this->getHeaderImageUrl())!=='')
524 507
 			{
@@ -527,8 +510,7 @@  discard block
 block discarded – undo
527 510
 				if($text!=='')
528 511
 					$image->setAlternateText($text);
529 512
 				$cell->getControls()->add($image);
530
-			}
531
-			else if($text!=='')
513
+			} else if($text!=='')
532 514
 				$cell->setText($text);
533 515
 			else
534 516
 				$cell->setText('&nbsp;');
@@ -574,8 +556,7 @@  discard block
 block discarded – undo
574 556
 			$cell->registerObject('CheckBox',$checkBox);
575 557
 			if($this->getDataField()!=='')
576 558
 				$checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
577
-		}
578
-		else
559
+		} else
579 560
 			parent::initializeCell($cell,$columnIndex,$itemType);
580 561
 	}
581 562
 
@@ -597,8 +578,7 @@  discard block
 block discarded – undo
597 578
 				$control->setData($text);
598 579
 			}
599 580
 			$cell->getControls()->add($control);
600
-		}
601
-		else if($this->getAllowSorting())
581
+		} else if($this->getAllowSorting())
602 582
 		{
603 583
 			$sortExpression=$this->getSortExpression();
604 584
 			if(($url=$this->getHeaderImageUrl())!=='')
@@ -611,8 +591,7 @@  discard block
 block discarded – undo
611 591
 					$button->setAlternateText($text);
612 592
 				$button->setCausesValidation(false);
613 593
 				$cell->getControls()->add($button);
614
-			}
615
-			else if($text!=='')
594
+			} else if($text!=='')
616 595
 			{
617 596
 				$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
618 597
 				$button->setText($text);
@@ -620,11 +599,9 @@  discard block
 block discarded – undo
620 599
 				$button->setCommandParameter($sortExpression);
621 600
 				$button->setCausesValidation(false);
622 601
 				$cell->getControls()->add($button);
623
-			}
624
-			else
602
+			} else
625 603
 				$cell->setText('&nbsp;');
626
-		}
627
-		else
604
+		} else
628 605
 		{
629 606
 			if(($url=$this->getHeaderImageUrl())!=='')
630 607
 			{
@@ -633,8 +610,7 @@  discard block
 block discarded – undo
633 610
 				if($text!=='')
634 611
 					$image->setAlternateText($text);
635 612
 				$cell->getControls()->add($image);
636
-			}
637
-			else if($text!=='')
613
+			} else if($text!=='')
638 614
 				$cell->setText($text);
639 615
 			else
640 616
 				$cell->setText('&nbsp;');
@@ -676,8 +652,7 @@  discard block
 block discarded – undo
676 652
 				$control->setData($text);
677 653
 			}
678 654
 			$cell->getControls()->add($control);
679
-		}
680
-		else if($this->getAllowSorting())
655
+		} else if($this->getAllowSorting())
681 656
 		{
682 657
 			$sortExpression=$this->getSortExpression();
683 658
 			if(($url=$this->getHeaderImageUrl())!=='')
@@ -690,8 +665,7 @@  discard block
 block discarded – undo
690 665
 					$button->setAlternateText($text);
691 666
 				$button->setCausesValidation(false);
692 667
 				$cell->getControls()->add($button);
693
-			}
694
-			else if($text!=='')
668
+			} else if($text!=='')
695 669
 			{
696 670
 				$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
697 671
 				$button->setText($text);
@@ -699,11 +673,9 @@  discard block
 block discarded – undo
699 673
 				$button->setCommandParameter($sortExpression);
700 674
 				$button->setCausesValidation(false);
701 675
 				$cell->getControls()->add($button);
702
-			}
703
-			else
676
+			} else
704 677
 				$cell->setText('&nbsp;');
705
-		}
706
-		else
678
+		} else
707 679
 		{
708 680
 			if(($url=$this->getHeaderImageUrl())!=='')
709 681
 			{
@@ -712,8 +684,7 @@  discard block
 block discarded – undo
712 684
 				if($text!=='')
713 685
 					$image->setAlternateText($text);
714 686
 				$cell->getControls()->add($image);
715
-			}
716
-			else if($text!=='')
687
+			} else if($text!=='')
717 688
 				$cell->setText($text);
718 689
 			else
719 690
 				$cell->setText('&nbsp;');
@@ -759,8 +730,7 @@  discard block
 block discarded – undo
759 730
 				$control->setData($text);
760 731
 			}
761 732
 			$cell->getControls()->add($control);
762
-		}
763
-		else if($this->getAllowSorting()) {
733
+		} else if($this->getAllowSorting()) {
764 734
 				$sortExpression=$this->getSortExpression();
765 735
 				if(($url=$this->getHeaderImageUrl())!=='') {
766 736
 					$button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton');
@@ -773,19 +743,16 @@  discard block
 block discarded – undo
773 743
 					}
774 744
 					$button->setCausesValidation(false);
775 745
 					$cell->getControls()->add($button);
776
-				}
777
-				else if($text!=='') {
746
+				} else if($text!=='') {
778 747
 						$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
779 748
 						$button->setText($text);
780 749
 						$button->setCommandName(TDataGrid::CMD_SORT);
781 750
 						$button->setCommandParameter($sortExpression);
782 751
 						$button->setCausesValidation(false);
783 752
 						$cell->getControls()->add($button);
784
-					}
785
-					else
753
+					} else
786 754
 						$cell->setText('&nbsp;');
787
-			}
788
-			else {
755
+			} else {
789 756
 				if(($url=$this->getHeaderImageUrl())!=='') {
790 757
 					$image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage');
791 758
 					$image->setImageUrl($url);
@@ -794,8 +761,7 @@  discard block
 block discarded – undo
794 761
 						$image->setToolTip($text);
795 762
 					}
796 763
 					$cell->getControls()->add($image);
797
-				}
798
-				else if($text!=='')
764
+				} else if($text!=='')
799 765
 						$cell->setText($text);
800 766
 					else
801 767
 						$cell->setText('&nbsp;');
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		parent::setDataSource($value);
95 95
 		if($this->getActiveControl()->canUpdateClientSide()) {
96 96
 			$this->renderPager();
97
-			$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
97
+			$this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
98 98
 		}
99 99
 	}
100 100
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * @param string CommandParameter corresponding to the OnCommand event of the button
137 137
 	 * @return mixed the button instance
138 138
 	 */
139
-	protected function createPagerButton($pager,$buttonType,$enabled,$text,$commandName,$commandParameter) {
139
+	protected function createPagerButton($pager, $buttonType, $enabled, $text, $commandName, $commandParameter) {
140 140
 		if($buttonType===TDataGridPagerButtonType::LinkButton) {
141 141
 			if($enabled)
142 142
 				$button=new TActiveLinkButton;
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
 	public function render($writer) {
180 180
 		if($this->getHasPreRendered()) {
181 181
 			$this->renderDataGrid($writer);
182
-			if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer);
182
+			if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(), $writer);
183 183
 		}
184 184
 		else {
185
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
185
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
186 186
 		}
187 187
 	}
188 188
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		foreach($pager as $item) {
197 197
 			if($item->ControlToPaginate==$this->ID) {
198 198
 				$writer=$this->getResponse()->createHtmlWriter();
199
-				$this->getPage()->getAdapter()->registerControlToRender($item,$writer);
199
+				$this->getPage()->getAdapter()->registerControlToRender($item, $writer);
200 200
 			}
201 201
 		}
202 202
 	}
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 * @param THtmlWriter writer for the rendering purpose
209 209
 	 */
210 210
 	private function renderDataGrid($writer) {
211
-	  $writer->addAttribute('id',$this->getSurroundingTagID());
211
+	  $writer->addAttribute('id', $this->getSurroundingTagID());
212 212
 	  $writer->renderBeginTag($this->getSurroundingTag());
213 213
 		parent::render($writer);
214 214
 		$writer->renderEndTag();
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
  * @since 3.1.9
235 235
  */
236 236
 class TActiveBoundColumn extends TBoundColumn {
237
-	protected function initializeHeaderCell($cell,$columnIndex) {
237
+	protected function initializeHeaderCell($cell, $columnIndex) {
238 238
 		$text=$this->getHeaderText();
239 239
 
240 240
 		if(($classPath=$this->getHeaderRenderer())!=='') {
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
  * @since 3.1.9
314 314
  */
315 315
 class TActiveEditCommandColumn extends TEditCommandColumn {
316
-	protected function createButton($commandName,$text,$causesValidation,$validationGroup) {
316
+	protected function createButton($commandName, $text, $causesValidation, $validationGroup) {
317 317
 		if($this->getButtonType()===TButtonColumnType::LinkButton)
318 318
 			$button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton');
319 319
 		else if($this->getButtonType()===TButtonColumnType::PushButton)
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 			{
323 323
 				$button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton');
324 324
 				$button->setToolTip($text);
325
-				if(strcasecmp($commandName,'Update')===0)
325
+				if(strcasecmp($commandName, 'Update')===0)
326 326
 					$url=$this->getUpdateImageUrl();
327
-				else if(strcasecmp($commandName,'Cancel')===0)
327
+				else if(strcasecmp($commandName, 'Cancel')===0)
328 328
 						$url=$this->getCancelImageUrl();
329 329
 					else
330 330
 						$url=$this->getEditImageUrl();
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
  * @since 3.1.9
356 356
  */
357 357
 class TActiveButtonColumn extends TButtonColumn {
358
-	public function initializeCell($cell,$columnIndex,$itemType) {
358
+	public function initializeCell($cell, $columnIndex, $itemType) {
359 359
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) {
360 360
 			$buttonType=$this->getButtonType();
361 361
 			if($buttonType===TButtonColumnType::LinkButton)
@@ -373,12 +373,12 @@  discard block
 block discarded – undo
373 373
 			$button->setCausesValidation($this->getCausesValidation());
374 374
 			$button->setValidationGroup($this->getValidationGroup());
375 375
 			if($this->getDataTextField()!=='' || ($buttonType===TButtonColumnType::ImageButton && $this->getDataImageUrlField()!==''))
376
-				$button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
376
+				$button->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
377 377
 			$cell->getControls()->add($button);
378
-			$cell->registerObject('Button',$button);
378
+			$cell->registerObject('Button', $button);
379 379
 		}
380 380
 		else
381
-			parent::initializeCell($cell,$columnIndex,$itemType);
381
+			parent::initializeCell($cell, $columnIndex, $itemType);
382 382
 	}
383 383
 }
384 384
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
  * @since 3.1.9
403 403
  */
404 404
 class TActiveTemplateColumn extends TTemplateColumn {
405
-	protected function initializeHeaderCell($cell,$columnIndex) {
405
+	protected function initializeHeaderCell($cell, $columnIndex) {
406 406
 		$text=$this->getHeaderText();
407 407
 
408 408
 		if(($classPath=$this->getHeaderRenderer())!=='') {
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 class TActiveHyperLinkColumn extends THyperLinkColumn
474 474
 {
475 475
 
476
-	protected function initializeHeaderCell($cell,$columnIndex)
476
+	protected function initializeHeaderCell($cell, $columnIndex)
477 477
 	{
478 478
 		$text=$this->getHeaderText();
479 479
 
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 	 * @param integer the index to the Columns property that the cell resides in.
563 563
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
564 564
 	 */
565
-	public function initializeCell($cell,$columnIndex,$itemType)
565
+	public function initializeCell($cell, $columnIndex, $itemType)
566 566
 	{
567 567
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem)
568 568
 		{
@@ -571,15 +571,15 @@  discard block
 block discarded – undo
571 571
 				$checkBox->setEnabled(false);
572 572
 			$cell->setHorizontalAlign('Center');
573 573
 			$cell->getControls()->add($checkBox);
574
-			$cell->registerObject('CheckBox',$checkBox);
574
+			$cell->registerObject('CheckBox', $checkBox);
575 575
 			if($this->getDataField()!=='')
576
-				$checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
576
+				$checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
577 577
 		}
578 578
 		else
579
-			parent::initializeCell($cell,$columnIndex,$itemType);
579
+			parent::initializeCell($cell, $columnIndex, $itemType);
580 580
 	}
581 581
 
582
-	protected function initializeHeaderCell($cell,$columnIndex)
582
+	protected function initializeHeaderCell($cell, $columnIndex)
583 583
 	{
584 584
 		$text=$this->getHeaderText();
585 585
 
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
  */
659 659
 class TActiveDropDownListColumn extends TDropDownListColumn
660 660
 {
661
-	protected function initializeHeaderCell($cell,$columnIndex)
661
+	protected function initializeHeaderCell($cell, $columnIndex)
662 662
 	{
663 663
 		$text=$this->getHeaderText();
664 664
 
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
  * @since 3.1.9
746 746
  */
747 747
 class TActiveLiteralColumn extends TLiteralColumn {
748
-	protected function initializeHeaderCell($cell,$columnIndex) {
748
+	protected function initializeHeaderCell($cell, $columnIndex) {
749 749
 		$text=$this->getHeaderText();
750 750
 
751 751
 		if(($classPath=$this->getHeaderRenderer())!=='') {
@@ -821,8 +821,8 @@  discard block
 block discarded – undo
821 821
 	 */
822 822
 	public function getClientSide()
823 823
 	{
824
-		if($this->_callbackoptions === null)
825
-			$this->_callbackoptions = new TCallbackOptions;
824
+		if($this->_callbackoptions===null)
825
+			$this->_callbackoptions=new TCallbackOptions;
826 826
 		return $this->_callbackoptions->getClientSide();
827 827
 	}
828 828
 }
Please login to merge, or discard this patch.