Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created
framework/Util/TSimpleDateFormatter.php 2 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -60,6 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * Constructor, create a new date time formatter.
61 61
 	 * @param string formatting pattern.
62 62
 	 * @param string pattern and value charset
63
+	 * @param string $pattern
63 64
 	 */
64 65
 	public function __construct($pattern, $charset='UTF-8')
65 66
 	{
@@ -93,6 +94,7 @@  discard block
 block discarded – undo
93 94
 
94 95
 	/**
95 96
 	 * @param string formatting charset.
97
+	 * @param string $charset
96 98
 	 */
97 99
 	public function setCharset($charset)
98 100
 	{
@@ -313,6 +315,7 @@  discard block
 block discarded – undo
313 315
 
314 316
 	/**
315 317
 	 * Calculate the length of a string, may be consider iconv_strlen?
318
+	 * @param string $string
316 319
 	 */
317 320
 	private function length($string)
318 321
 	{
@@ -338,6 +341,9 @@  discard block
 block discarded – undo
338 341
 
339 342
 	/**
340 343
 	 * Returns true if char at position equals a particular char.
344
+	 * @param string $string
345
+	 * @param integer $pos
346
+	 * @param string $char
341 347
 	 */
342 348
 	private function charEqual($string, $pos, $char)
343 349
 	{
@@ -350,6 +356,10 @@  discard block
 block discarded – undo
350 356
 	 * @param int starting position
351 357
 	 * @param int minimum integer length
352 358
 	 * @param int maximum integer length
359
+	 * @param string $str
360
+	 * @param integer $i
361
+	 * @param integer|null $minlength
362
+	 * @param integer|null $maxlength
353 363
 	 * @return string integer portion of the string, null otherwise
354 364
 	 */
355 365
 	private function getInteger($str,$i,$minlength,$maxlength)
Please login to merge, or discard this patch.
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * Charset, default is 'UTF-8'
61 61
 	 * @var string
62 62
 	 */
63
-	private $charset = 'UTF-8';
63
+	private $charset='UTF-8';
64 64
 
65 65
 	/**
66 66
 	 * Constructor, create a new date time formatter.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function setPattern($pattern)
88 88
 	{
89
-		$this->pattern = $pattern;
89
+		$this->pattern=$pattern;
90 90
 	}
91 91
 
92 92
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function setCharset($charset)
104 104
 	{
105
-		$this->charset = $charset;
105
+		$this->charset=$charset;
106 106
 	}
107 107
 
108 108
 	/**
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function format($value)
114 114
 	{
115
-		$date = $this->getDate($value);
116
-		$bits['yyyy'] = $date['year'];
117
-		$bits['yy'] = substr("{$date['year']}", -2);
115
+		$date=$this->getDate($value);
116
+		$bits['yyyy']=$date['year'];
117
+		$bits['yy']=substr("{$date['year']}", -2);
118 118
 
119
-		$bits['MM'] = str_pad("{$date['mon']}", 2, '0', STR_PAD_LEFT);
120
-		$bits['M'] = $date['mon'];
119
+		$bits['MM']=str_pad("{$date['mon']}", 2, '0', STR_PAD_LEFT);
120
+		$bits['M']=$date['mon'];
121 121
 
122
-		$bits['dd'] = str_pad("{$date['mday']}", 2, '0', STR_PAD_LEFT);
123
-		$bits['d'] = $date['mday'];
122
+		$bits['dd']=str_pad("{$date['mday']}", 2, '0', STR_PAD_LEFT);
123
+		$bits['d']=$date['mday'];
124 124
 
125
-		$pattern = preg_replace('/M{3,4}/', 'MM', $this->pattern);
125
+		$pattern=preg_replace('/M{3,4}/', 'MM', $this->pattern);
126 126
 		return str_replace(array_keys($bits), $bits, $pattern);
127 127
 	}
128 128
 
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
 
160 160
 	public function getDayMonthYearOrdering()
161 161
 	{
162
-		$ordering = array();
163
-		if(is_int($day= strpos($this->pattern, 'd')))
164
-			$ordering['day'] = $day;
165
-		if(is_int($month= strpos($this->pattern, 'M')))
166
-			$ordering['month'] = $month;
167
-		if(is_int($year= strpos($this->pattern, 'yy')))
168
-			$ordering['year'] = $year;
162
+		$ordering=array();
163
+		if(is_int($day=strpos($this->pattern, 'd')))
164
+			$ordering['day']=$day;
165
+		if(is_int($month=strpos($this->pattern, 'M')))
166
+			$ordering['month']=$month;
167
+		if(is_int($year=strpos($this->pattern, 'yy')))
168
+			$ordering['year']=$year;
169 169
 		asort($ordering);
170 170
 		return array_keys($ordering);
171 171
 	}
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	private function getDate($value)
179 179
 	{
180
-		$s = new TDateTimeStamp;
180
+		$s=new TDateTimeStamp;
181 181
 		if(is_numeric($value))
182 182
 			return $s->getDate($value);
183 183
 		else
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	public function isValidDate($value)
191 191
 	{
192
-		if($value === null) {
192
+		if($value===null) {
193 193
 			return false;
194 194
 		} else {
195
-			return $this->parse($value, false) !== null;
195
+			return $this->parse($value, false)!==null;
196 196
 		}
197 197
 	}
198 198
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * @return int date time stamp
203 203
 	 * @throws TInvalidDataValueException if date string is malformed.
204 204
 	 */
205
-	public function parse($value,$defaultToCurrentTime=true)
205
+	public function parse($value, $defaultToCurrentTime=true)
206 206
 	{
207 207
 		if(is_int($value) || is_float($value))
208 208
 			return $value;
@@ -211,108 +211,108 @@  discard block
 block discarded – undo
211 211
 
212 212
 		if(empty($this->pattern)) return time();
213 213
 
214
-		$date = time();
214
+		$date=time();
215 215
 
216 216
 		if($this->length(trim($value)) < 1)
217 217
 			return $defaultToCurrentTime ? $date : null;
218 218
 
219
-		$pattern = $this->pattern;
219
+		$pattern=$this->pattern;
220 220
 
221
-		$i_val = 0;
222
-		$i_format = 0;
223
-		$pattern_length = $this->length($pattern);
224
-		$c = '';
221
+		$i_val=0;
222
+		$i_format=0;
223
+		$pattern_length=$this->length($pattern);
224
+		$c='';
225 225
 		$token='';
226 226
 		$x=null; $y=null;
227 227
 
228 228
 
229 229
 		if($defaultToCurrentTime)
230 230
 		{
231
-			$year = "{$date['year']}";
232
-			$month = $date['mon'];
233
-			$day = $date['mday'];
231
+			$year="{$date['year']}";
232
+			$month=$date['mon'];
233
+			$day=$date['mday'];
234 234
 		}
235 235
 		else
236 236
 		{
237
-			$year = null;
238
-			$month = null;
239
-			$day = null;
237
+			$year=null;
238
+			$month=null;
239
+			$day=null;
240 240
 		}
241 241
 
242
-		while ($i_format < $pattern_length)
242
+		while($i_format < $pattern_length)
243 243
 		{
244
-			$c = $this->charAt($pattern,$i_format);
244
+			$c=$this->charAt($pattern, $i_format);
245 245
 			$token='';
246
-			while ($this->charEqual($pattern, $i_format, $c)
246
+			while($this->charEqual($pattern, $i_format, $c)
247 247
 						&& ($i_format < $pattern_length))
248 248
 			{
249
-				$token .= $this->charAt($pattern, $i_format++);
249
+				$token.=$this->charAt($pattern, $i_format++);
250 250
 			}
251 251
 
252
-			if ($token=='yyyy' || $token=='yy' || $token=='y')
252
+			if($token=='yyyy' || $token=='yy' || $token=='y')
253 253
 			{
254
-				if ($token=='yyyy') { $x=4;$y=4; }
255
-				if ($token=='yy')   { $x=2;$y=2; }
256
-				if ($token=='y')    { $x=2;$y=4; }
257
-				$year = $this->getInteger($value,$i_val,$x,$y);
258
-				if($year === null)
254
+				if($token=='yyyy') { $x=4; $y=4; }
255
+				if($token=='yy') { $x=2; $y=2; }
256
+				if($token=='y') { $x=2; $y=4; }
257
+				$year=$this->getInteger($value, $i_val, $x, $y);
258
+				if($year===null)
259 259
 					return null;
260 260
 					//throw new TInvalidDataValueException('Invalid year', $value);
261
-				$i_val += strlen($year);
262
-				if(strlen($year) == 2)
261
+				$i_val+=strlen($year);
262
+				if(strlen($year)==2)
263 263
 				{
264
-					$iYear = (int)$year;
264
+					$iYear=(int) $year;
265 265
 					if($iYear > 70)
266
-						$year = $iYear + 1900;
266
+						$year=$iYear + 1900;
267 267
 					else
268
-						$year = $iYear + 2000;
268
+						$year=$iYear + 2000;
269 269
 				}
270
-				$year = (int)$year;
270
+				$year=(int) $year;
271 271
 			}
272 272
 			elseif($token=='MM' || $token=='M')
273 273
 			{
274
-				$month=$this->getInteger($value,$i_val,
275
-									$this->length($token),2);
276
-				$iMonth = (int)$month;
277
-				if($month === null || $iMonth < 1 || $iMonth > 12 )
274
+				$month=$this->getInteger($value, $i_val,
275
+									$this->length($token), 2);
276
+				$iMonth=(int) $month;
277
+				if($month===null || $iMonth < 1 || $iMonth > 12)
278 278
 					return null;
279 279
 					//throw new TInvalidDataValueException('Invalid month', $value);
280
-				$i_val += strlen($month);
281
-				$month = $iMonth;
280
+				$i_val+=strlen($month);
281
+				$month=$iMonth;
282 282
 			}
283
-			elseif ($token=='dd' || $token=='d')
283
+			elseif($token=='dd' || $token=='d')
284 284
 			{
285
-				$day = $this->getInteger($value,$i_val,
285
+				$day=$this->getInteger($value, $i_val,
286 286
 									$this->length($token), 2);
287
-				$iDay = (int)$day;
288
-				if($day === null || $iDay < 1 || $iDay >31)
287
+				$iDay=(int) $day;
288
+				if($day===null || $iDay < 1 || $iDay > 31)
289 289
 					return null;
290 290
 					//throw new TInvalidDataValueException('Invalid day', $value);
291
-				$i_val += strlen($day);
292
-				$day = $iDay;
291
+				$i_val+=strlen($day);
292
+				$day=$iDay;
293 293
 			}
294 294
 			else
295 295
 			{
296
-				if($this->substring($value, $i_val, $this->length($token)) != $token)
296
+				if($this->substring($value, $i_val, $this->length($token))!=$token)
297 297
 					return null;
298 298
 					//throw new TInvalidDataValueException("Subpattern '{$this->pattern}' mismatch", $value);
299 299
 				else
300
-					$i_val += $this->length($token);
300
+					$i_val+=$this->length($token);
301 301
 			}
302 302
 		}
303
-		if ($i_val != $this->length($value))
303
+		if($i_val!=$this->length($value))
304 304
 			return null;
305 305
 			//throw new TInvalidDataValueException("Pattern '{$this->pattern}' mismatch", $value);
306
-		if(!$defaultToCurrentTime && ($month === null || $day === null || $year === null))
306
+		if(!$defaultToCurrentTime && ($month===null || $day===null || $year===null))
307 307
 			return null;
308 308
 		else
309 309
 		{
310 310
 			if(empty($year)) {
311
-				$year = date('Y');
311
+				$year=date('Y');
312 312
 			}
313
-			$day = (int)$day <= 0 ? 1 : (int)$day;
314
-			$month = (int)$month <= 0 ? 1 : (int)$month;
315
-			$s = new TDateTimeStamp;
313
+			$day=(int) $day <= 0 ? 1 : (int) $day;
314
+			$month=(int) $month <= 0 ? 1 : (int) $month;
315
+			$s=new TDateTimeStamp;
316 316
 			return $s->getTimeStamp(0, 0, 0, $month, $day, $year);
317 317
 		}
318 318
 	}
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 	 */
348 348
 	private function charEqual($string, $pos, $char)
349 349
 	{
350
-		return $this->charAt($string, $pos) == $char;
350
+		return $this->charAt($string, $pos)==$char;
351 351
 	}
352 352
 
353 353
 	/**
@@ -358,15 +358,15 @@  discard block
 block discarded – undo
358 358
 	 * @param int maximum integer length
359 359
 	 * @return string integer portion of the string, null otherwise
360 360
 	 */
361
-	private function getInteger($str,$i,$minlength,$maxlength)
361
+	private function getInteger($str, $i, $minlength, $maxlength)
362 362
 	{
363 363
 		//match for digits backwards
364
-		for ($x = $maxlength; $x >= $minlength; $x--)
364
+		for($x=$maxlength; $x >= $minlength; $x--)
365 365
 		{
366
-			$token= $this->substring($str, $i,$x);
367
-			if ($this->length($token) < $minlength)
366
+			$token=$this->substring($str, $i, $x);
367
+			if($this->length($token) < $minlength)
368 368
 				return null;
369
-			if (preg_match('/^\d+$/', $token))
369
+			if(preg_match('/^\d+$/', $token))
370 370
 				return $token;
371 371
 		}
372 372
 		return null;
Please login to merge, or discard this patch.
framework/Vendor/SafeHtml/HTMLSax3/Decorators.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -51,6 +51,7 @@  discard block
 block discarded – undo
51 51
     * Constructs TSax3_Trim
52 52
     * @param object handler object being decorated
53 53
     * @param string original handler method
54
+    * @param string $orig_method
54 55
     * @access protected
55 56
     */
56 57
     function __construct(&$orig_obj, $orig_method) {
@@ -99,6 +100,8 @@  discard block
 block discarded – undo
99 100
     * @param object handler object being decorated
100 101
     * @param string original open handler method
101 102
     * @param string original close handler method
103
+    * @param string $orig_open_method
104
+    * @param string $orig_close_method
102 105
     * @access protected
103 106
     */
104 107
     function __construct(&$orig_obj, $orig_open_method, $orig_close_method) {
@@ -149,6 +152,7 @@  discard block
 block discarded – undo
149 152
     * Constructs TSax3_LineFeed
150 153
     * @param object handler object being decorated
151 154
     * @param string original handler method
155
+    * @param string $orig_method
152 156
     * @access protected
153 157
     */
154 158
     function __construct(&$orig_obj, $orig_method) {
@@ -191,6 +195,7 @@  discard block
 block discarded – undo
191 195
     * Constructs TSax3_Tab
192 196
     * @param object handler object being decorated
193 197
     * @param string original handler method
198
+    * @param string $orig_method
194 199
     * @access protected
195 200
     */
196 201
     function __construct(&$orig_obj, $orig_method) {
@@ -234,6 +239,7 @@  discard block
 block discarded – undo
234 239
     * Constructs TSax3_Entities_Parsed
235 240
     * @param object handler object being decorated
236 241
     * @param string original handler method
242
+    * @param string $orig_method
237 243
     * @access protected
238 244
     */
239 245
     function __construct(&$orig_obj, $orig_method) {
@@ -286,6 +292,7 @@  discard block
 block discarded – undo
286 292
     * Constructs TSax3_Entities_Unparsed
287 293
     * @param object handler object being decorated
288 294
     * @param string original handler method
295
+    * @param string $orig_method
289 296
     * @access protected
290 297
     */
291 298
     function __construct(&$orig_obj, $orig_method) {
@@ -329,6 +336,7 @@  discard block
 block discarded – undo
329 336
     * Constructs TSax3_Entities_Unparsed
330 337
     * @param object handler object being decorated
331 338
     * @param string original handler method
339
+    * @param string $orig_method
332 340
     * @access protected
333 341
     */
334 342
     function __construct(&$orig_obj, $orig_method) {
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TDropContainer.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,6 @@  discard block
 block discarded – undo
135 135
 	 * Raises the onDrop event.
136 136
 	 * The drop parameters are encapsulated into a {@link TDropContainerEventParameter}
137 137
 	 *
138
-	 * @param object $dropControlId
139 138
 	 */
140 139
 	public function onDrop ($dropParams)
141 140
 	{
@@ -223,7 +222,7 @@  discard block
 block discarded – undo
223 222
 	/**
224 223
 	 * Override parent implementation to return the container control collection.
225 224
 	 *
226
-	 * @return TControlCollection
225
+	 * @return \Prado\Web\UI\TControlCollection
227 226
 	 */
228 227
 	public function getControls()
229 228
 	{
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 * @param object $dropControlId
139 139
 	 */
140
-	public function onDrop ($dropParams)
140
+	public function onDrop($dropParams)
141 141
 	{
142
-		$this->raiseEvent('OnDrop', $this, new TDropContainerEventParameter ($dropParams));
142
+		$this->raiseEvent('OnDrop', $this, new TDropContainerEventParameter($dropParams));
143 143
 
144 144
 	}
145 145
 
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	protected function getPostBackOptions()
163 163
 	{
164
-		$options['ID'] = $this->getClientID();
165
-		$options['EventTarget'] = $this->getUniqueID();
164
+		$options['ID']=$this->getClientID();
165
+		$options['EventTarget']=$this->getUniqueID();
166 166
 
167
-		$options['accept'] = $this->getAcceptCssClass();
168
-		$options['hoverclass'] = $this->getHoverCssClass();
167
+		$options['accept']=$this->getAcceptCssClass();
168
+		$options['hoverclass']=$this->getHoverCssClass();
169 169
 		return $options;
170 170
 	}
171 171
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	protected function addAttributesToRender($writer)
198 198
 	{
199 199
 		parent::addAttributesToRender($writer);
200
-		$writer->addAttribute('id',$this->getClientID());
200
+		$writer->addAttribute('id', $this->getClientID());
201 201
 
202 202
 		$this->getPage()->getClientScript()->registerPradoScript('dragdrop');
203 203
 		$this->getActiveControl()->registerCallbackClientScript(
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
 	 * child controls. This container will be a TActivePanel, in order to allow user
211 211
 	 * to update its content on callback.
212 212
 	 */
213
-	public function createChildControls ()
213
+	public function createChildControls()
214 214
 	{
215
-		if ($this->_container===null)
215
+		if($this->_container===null)
216 216
 		{
217
-			$this->_container= new TActivePanel;
217
+			$this->_container=new TActivePanel;
218 218
 			$this->_container->setId($this->getId(false).'_content');
219 219
 			parent::getControls()->add($this->_container);
220 220
 		}
@@ -238,17 +238,17 @@  discard block
 block discarded – undo
238 238
 	 * is defered until OnPreRender event is raised.
239 239
 	 * @param THtmlWriter html writer
240 240
 	 */
241
-	public function render ($writer)
241
+	public function render($writer)
242 242
 	{
243 243
 		if($this->getHasPreRendered())
244 244
 		{
245 245
 			parent::render($writer);
246 246
 			if($this->getActiveControl()->canUpdateClientSide())
247
-				$this->getPage()->getCallbackClient()->replaceContent($this->_container,$writer);
247
+				$this->getPage()->getCallbackClient()->replaceContent($this->_container, $writer);
248 248
 		}
249 249
 		else
250 250
 		{
251
-			$this->getPage()->getAdapter()->registerControlToRender($this->_container,$writer);
251
+			$this->getPage()->getAdapter()->registerControlToRender($this->_container, $writer);
252 252
 		}
253 253
 	}
254 254
 }
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiAutoComplete.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -260,6 +260,7 @@  discard block
 block discarded – undo
260 260
 	 * method, be sure to call the parent implementation so that the event
261 261
 	 * handler can be invoked.
262 262
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
263
+	 * @param TJuiAutoCompleteEventParameter $param
263 264
 	 */
264 265
 	public function onSuggest($param)
265 266
 	{
@@ -272,6 +273,7 @@  discard block
 block discarded – undo
272 273
 	 * method, be sure to call the parent implementation so that the event
273 274
 	 * handler can be invoked.
274 275
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
276
+	 * @param TJuiAutoCompleteEventParameter $param
275 277
 	 */
276 278
 	public function onSuggestionSelected($param)
277 279
 	{
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function getOptions()
133 133
 	{
134
-		if (($options=$this->getViewState('JuiOptions'))===null)
134
+		if(($options=$this->getViewState('JuiOptions'))===null)
135 135
 		{
136 136
 		  $options=new TJuiControlOptions($this);
137 137
 		  $this->setViewState('JuiOptions', $options);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	public function getMinChars()
214 214
 	{
215
-		return $this->getViewState('minChars','');
215
+		return $this->getViewState('minChars', '');
216 216
 	}
217 217
 
218 218
 	/**
@@ -236,17 +236,17 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
  	public function raiseCallbackEvent($param)
238 238
 	{
239
-		$token = $param->getCallbackParameter();
240
-		if(is_array($token) && count($token) == 2)
239
+		$token=$param->getCallbackParameter();
240
+		if(is_array($token) && count($token)==2)
241 241
 		{
242
-			if($token[1] === '__TJuiAutoComplete_onSuggest__')
242
+			if($token[1]==='__TJuiAutoComplete_onSuggest__')
243 243
 			{
244
-				$parameter = new TJuiAutoCompleteEventParameter($this->getResponse(), $token[0]);
244
+				$parameter=new TJuiAutoCompleteEventParameter($this->getResponse(), $token[0]);
245 245
 				$this->onSuggest($parameter);
246 246
 			}
247
-			else if($token[1] === '__TJuiAutoComplete_onSuggestionSelected__')
247
+			else if($token[1]==='__TJuiAutoComplete_onSuggestionSelected__')
248 248
 			{
249
-				$parameter = new TJuiAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
249
+				$parameter=new TJuiAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
250 250
 				$this->onSuggestionSelected($parameter);
251 251
 			}
252 252
 		}
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	public function getResultPanel()
304 304
 	{
305 305
 		if($this->_resultPanel===null)
306
-			$this->_resultPanel = $this->createResultPanel();
306
+			$this->_resultPanel=$this->createResultPanel();
307 307
 		return $this->_resultPanel;
308 308
 	}
309 309
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	protected function createResultPanel()
314 314
 	{
315
-		$panel = new TPanel;
315
+		$panel=new TPanel;
316 316
 		$this->getControls()->add($panel);
317 317
 		$panel->setID('result');
318 318
 		return $panel;
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	public function getSuggestions()
325 325
 	{
326 326
 		if($this->_repeater===null)
327
-			$this->_repeater = $this->createRepeater();
327
+			$this->_repeater=$this->createRepeater();
328 328
 		return $this->_repeater;
329 329
 	}
330 330
 
@@ -333,8 +333,8 @@  discard block
 block discarded – undo
333 333
 	 */
334 334
 	protected function createRepeater()
335 335
 	{
336
-		$repeater = new TRepeater;
337
-		$repeater->setItemTemplate(new TTemplate('<%# $this->Data %>',null));
336
+		$repeater=new TRepeater;
337
+		$repeater->setItemTemplate(new TTemplate('<%# $this->Data %>', null));
338 338
 		$this->getControls()->add($repeater);
339 339
 		return $repeater;
340 340
 	}
@@ -376,12 +376,12 @@  discard block
 block discarded – undo
376 376
 		{
377 377
 			$data=array();
378 378
 			$items=$this->getSuggestions()->getItems();
379
-			$writer = new TTextWriter;
380
-			for($i=0; $i<$items->Count; $i++)
379
+			$writer=new TTextWriter;
380
+			for($i=0; $i < $items->Count; $i++)
381 381
 			{
382 382
 				$items->itemAt($i)->render($writer);
383 383
 				$item=$writer->flush();
384
-				$data[]=array( 'id' => $i, 'label' => $item);
384
+				$data[]=array('id' => $i, 'label' => $item);
385 385
 			}
386 386
 
387 387
 			$this->getResponse()->getAdapter()->setResponseData($data);
@@ -393,25 +393,25 @@  discard block
 block discarded – undo
393 393
 	 */
394 394
 	protected function getPostBackOptions()
395 395
 	{
396
-		$options = $this->getOptions()->toArray();
396
+		$options=$this->getOptions()->toArray();
397 397
 
398
-		if(strlen($separator = $this->getSeparator()))
399
-			$options['Separators'] = $separator;
398
+		if(strlen($separator=$this->getSeparator()))
399
+			$options['Separators']=$separator;
400 400
 
401 401
 		if($this->getAutoPostBack())
402 402
 		{
403
-			$options = array_merge($options,parent::getPostBackOptions());
404
-			$options['AutoPostBack'] = true;
403
+			$options=array_merge($options, parent::getPostBackOptions());
404
+			$options['AutoPostBack']=true;
405 405
 		}
406
-		if(strlen($textCssClass = $this->getTextCssClass()))
407
-			$options['textCssClass'] = $textCssClass;
408
-		$options['minLength'] = $this->getMinChars();
409
-		$options['delay'] = $this->getFrequency()*1000.0;
410
-		$options['appendTo'] = '#'.$this->getResultPanel()->getClientID();
411
-		$options['ID'] = $this->getClientID();
412
-		$options['EventTarget'] = $this->getUniqueID();
413
-		$options['CausesValidation'] = $this->getCausesValidation();
414
-		$options['ValidationGroup'] = $this->getValidationGroup();
406
+		if(strlen($textCssClass=$this->getTextCssClass()))
407
+			$options['textCssClass']=$textCssClass;
408
+		$options['minLength']=$this->getMinChars();
409
+		$options['delay']=$this->getFrequency() * 1000.0;
410
+		$options['appendTo']='#'.$this->getResultPanel()->getClientID();
411
+		$options['ID']=$this->getClientID();
412
+		$options['EventTarget']=$this->getUniqueID();
413
+		$options['CausesValidation']=$this->getCausesValidation();
414
+		$options['ValidationGroup']=$this->getValidationGroup();
415 415
 		return $options;
416 416
 	}
417 417
 
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiDatePicker.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Prado\Web\UI\JuiControls;
13 13
 
14 14
 use Prado\Exceptions\TNotSupportedException;
15
-use Prado\Web\Javascripts\TJavaScript;
16 15
 use Prado\Web\UI\ActiveControls\ICallbackEventHandler;
17 16
 use Prado\Web\UI\ActiveControls\TActivePanel;
18 17
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * it will register an additional clientscript to set the language specific global default settings.
44 44
 	 * @var boolean true, if this is the first instance of TJuiDatePicker, false otherwise
45 45
 	 */
46
-	private static $_first = true;
46
+	private static $_first=true;
47 47
 
48 48
 	/**
49 49
 	 * Creates a new callback control, sets the adapter to
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function getOptions()
80 80
 	{
81
-		if (($options=$this->getViewState('JuiOptions'))===null)
81
+		if(($options=$this->getViewState('JuiOptions'))===null)
82 82
 		{
83 83
 		  $options=new TJuiControlOptions($this);
84 84
 		  $this->setViewState('JuiOptions', $options);
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	protected function getCurrentCulture()
174 174
 	{
175
-		$app = $this->getApplication()->getGlobalization(false);
176
-		return $this->getCulture() == '' ?
175
+		$app=$this->getApplication()->getGlobalization(false);
176
+		return $this->getCulture()=='' ?
177 177
 				($app ? $app->getCulture() : 'en') : $this->getCulture();
178 178
 	}
179 179
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function getDateFormat()
184 184
 	{
185
-		return $this->getViewState('DateFormat','dd-MM-yyyy');
185
+		return $this->getViewState('DateFormat', 'dd-MM-yyyy');
186 186
 	}
187 187
 
188 188
 	/**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	public function setDateFormat($value)
193 193
 	{
194
-		$this->setViewState('DateFormat',$value,'dd-MM-yyyy');
194
+		$this->setViewState('DateFormat', $value, 'dd-MM-yyyy');
195 195
 	}
196 196
 
197 197
 	/**
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 			$this->setText('');
258 258
 		else
259 259
 		{
260
-			$date = TPropertyValue::ensureFloat($value);
261
-			$formatter = new TSimpleDateFormatter($this->getDateFormat());
260
+			$date=TPropertyValue::ensureFloat($value);
261
+			$formatter=new TSimpleDateFormatter($this->getDateFormat());
262 262
 			$this->setText($formatter->format($date));
263 263
 		}
264 264
 	}
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	protected function getTimeStampFromText()
271 271
 	{
272
-		$pattern = $this->getDateFormat();
273
-		$pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern);
274
-		$formatter = new TSimpleDateFormatter($pattern);
272
+		$pattern=$this->getDateFormat();
273
+		$pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern);
274
+		$formatter=new TSimpleDateFormatter($pattern);
275 275
 		return $formatter->parse($this->getText());
276 276
 	}
277 277
 
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 	 */
283 283
 	public function getValidationPropertyValue()
284 284
 	{
285
-		if(($text = $this->getText()) === '')
285
+		if(($text=$this->getText())==='')
286 286
 			return '';
287
-		$date = $this->getTimeStamp();
288
-		return $date == null ? $text : $date;
287
+		$date=$this->getTimeStamp();
288
+		return $date==null ? $text : $date;
289 289
 	}
290 290
 
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/JuiControls/TJuiSelectableTemplate.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -317,6 +317,9 @@
 block discarded – undo
317 317
 {
318 318
 	private $_template;
319 319
 
320
+	/**
321
+	 * @param string $template
322
+	 */
320 323
 	public function __construct($template)
321 324
 	{
322 325
 		$this->_template = $template;
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDatePicker.php 2 patches
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,6 +111,7 @@  discard block
 block discarded – undo
111 111
 	/**
112 112
 	 * Sets the format of the date string.
113 113
 	 * @param string the format of the date string
114
+	 * @param string $value
114 115
 	 */
115 116
 	public function setDateFormat($value)
116 117
 	{
@@ -250,6 +251,7 @@  discard block
 block discarded – undo
250 251
 
251 252
 	/**
252 253
 	 * @param integer date picker starting year, default is 2000.
254
+	 * @param integer $value
253 255
 	 */
254 256
 	public function setFromYear($value)
255 257
 	{
@@ -359,6 +361,7 @@  discard block
 block discarded – undo
359 361
 
360 362
 	/**
361 363
 	 * @param string date string
364
+	 * @param string $value
362 365
 	 */
363 366
 	public function setDate($value)
364 367
 	{
@@ -482,7 +485,7 @@  discard block
 block discarded – undo
482 485
 	 * Loads date from drop down list data.
483 486
 	 * @param string the key that can be used to retrieve data from the input data collection
484 487
 	 * @param array the input data collection
485
-	 * @return array the date selected
488
+	 * @return string the date selected
486 489
 	 */
487 490
 	protected function getDateFromPostData($key, $values)
488 491
 	{
@@ -586,7 +589,7 @@  discard block
 block discarded – undo
586 589
 	}
587 590
 
588 591
 	/**
589
-	 * @return DateTimeFormatInfo date time format information for the current culture.
592
+	 * @return \Prado\I18N\core\DateTimeFormatInfo date time format information for the current culture.
590 593
 	 */
591 594
 	protected function getLocalizedCalendarInfo()
592 595
 	{
@@ -742,6 +745,7 @@  discard block
 block discarded – undo
742 745
 	 * "MMMM" will return the month names, "MM" or "MMM" return abbr. month names
743 746
 	 * and "M" return month digits.
744 747
 	 * @param DateTimeFormatInfo localized date format information.
748
+	 * @param \Prado\I18N\core\DateTimeFormatInfo $info
745 749
 	 * @return array localized month names.
746 750
 	 */
747 751
 	protected function getLocalizedMonthNames($info)
Please login to merge, or discard this patch.
Spacing   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	/**
86 86
 	 * Script path relative to the TClientScriptManager::SCRIPT_PATH
87 87
 	 */
88
-	const SCRIPT_PATH = 'prado/datepicker';
88
+	const SCRIPT_PATH='prado/datepicker';
89 89
 
90 90
 	/**
91 91
 	 * @var TDatePickerClientScript validator client-script options.
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function getDateFormat()
107 107
 	{
108
-		return $this->getViewState('DateFormat','dd-MM-yyyy');
108
+		return $this->getViewState('DateFormat', 'dd-MM-yyyy');
109 109
 	}
110 110
 
111 111
 	/**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function setDateFormat($value)
116 116
 	{
117
-		$this->setViewState('DateFormat',$value,'dd-MM-yyyy');
117
+		$this->setViewState('DateFormat', $value, 'dd-MM-yyyy');
118 118
 	}
119 119
 
120 120
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function getShowCalendar()
124 124
 	{
125
-		return $this->getViewState('ShowCalendar',true);
125
+		return $this->getViewState('ShowCalendar', true);
126 126
 	}
127 127
 
128 128
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function setShowCalendar($value)
133 133
 	{
134
-		$this->setViewState('ShowCalendar',TPropertyValue::ensureBoolean($value),true);
134
+		$this->setViewState('ShowCalendar', TPropertyValue::ensureBoolean($value), true);
135 135
 	}
136 136
 
137 137
 	/**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 */
254 254
 	public function setFromYear($value)
255 255
 	{
256
-		$this->setViewState('FromYear', TPropertyValue::ensureInteger($value), intval(@date('Y'))-5);
256
+		$this->setViewState('FromYear', TPropertyValue::ensureInteger($value), intval(@date('Y')) - 5);
257 257
 	}
258 258
 
259 259
 	/**
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 */
262 262
 	public function getFromYear()
263 263
 	{
264
-		return $this->getViewState('FromYear', intval(@date('Y'))-5);
264
+		return $this->getViewState('FromYear', intval(@date('Y')) - 5);
265 265
 	}
266 266
 
267 267
 	/**
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	public function setUpToYear($value)
271 271
 	{
272
-		$this->setViewState('UpToYear', TPropertyValue::ensureInteger($value), intval(@date('Y'))+10);
272
+		$this->setViewState('UpToYear', TPropertyValue::ensureInteger($value), intval(@date('Y')) + 10);
273 273
 	}
274 274
 
275 275
 	/**
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 */
278 278
 	public function getUpToYear()
279 279
 	{
280
-		return $this->getViewState('UpToYear', intval(@date('Y'))+10);
280
+		return $this->getViewState('UpToYear', intval(@date('Y')) + 10);
281 281
 	}
282 282
 
283 283
 	/**
@@ -317,8 +317,8 @@  discard block
 block discarded – undo
317 317
 			$this->setText('');
318 318
 		else
319 319
 		{
320
-			$date = TPropertyValue::ensureFloat($value);
321
-			$formatter = new TSimpleDateFormatter($this->getDateFormat());
320
+			$date=TPropertyValue::ensureFloat($value);
321
+			$formatter=new TSimpleDateFormatter($this->getDateFormat());
322 322
 			$this->setText($formatter->format($date));
323 323
 		}
324 324
 	}
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	public function getClientSide()
379 379
 	{
380 380
 		if($this->_clientScript===null)
381
-			$this->_clientScript = $this->createClientScript();
381
+			$this->_clientScript=$this->createClientScript();
382 382
 		return $this->_clientScript;
383 383
 	}
384 384
 
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
 	 */
398 398
 	public function getValidationPropertyValue()
399 399
 	{
400
-		if(($text = $this->getText()) === '')
400
+		if(($text=$this->getText())==='')
401 401
 			return '';
402
-		$date = $this->getTimeStamp();
403
-		return $date == null ? $text : $date;
402
+		$date=$this->getTimeStamp();
403
+		return $date==null ? $text : $date;
404 404
 	}
405 405
 
406 406
 	/**
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 	 */
422 422
 	public function render($writer)
423 423
 	{
424
-		if($this->getInputMode() == TDatePickerInputMode::TextBox)
424
+		if($this->getInputMode()==TDatePickerInputMode::TextBox)
425 425
 		{
426 426
 			parent::render($writer);
427 427
 			$this->renderDatePickerButtons($writer);
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 	{
445 445
 		if($this->getShowCalendar())
446 446
 		{
447
-			switch ($this->getMode())
447
+			switch($this->getMode())
448 448
 			{
449 449
 				case TDatePickerMode::Button:
450 450
 					$this->renderButtonDatePicker($writer);
@@ -464,11 +464,11 @@  discard block
 block discarded – undo
464 464
 	 * @param array the input data collection
465 465
 	 * @return boolean whether the data of the component has been changed
466 466
 	 */
467
-	public function loadPostData($key,$values)
467
+	public function loadPostData($key, $values)
468 468
 	{
469
-		if($this->getInputMode() == TDatePickerInputMode::TextBox)
469
+		if($this->getInputMode()==TDatePickerInputMode::TextBox)
470 470
 			return parent::loadPostData($key, $values);
471
-		$value = $this->getDateFromPostData($key, $values);
471
+		$value=$this->getDateFromPostData($key, $values);
472 472
 		if(!$this->getReadOnly() && $this->getText()!==$value)
473 473
 		{
474 474
 			$this->setText($value);
@@ -486,40 +486,40 @@  discard block
 block discarded – undo
486 486
 	 */
487 487
 	protected function getDateFromPostData($key, $values)
488 488
 	{
489
-		$date = @getdate();
489
+		$date=@getdate();
490 490
 
491
-		$pattern = $this->getDateFormat();
492
-		$pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern);
493
-		$formatter = new TSimpleDateFormatter($pattern);
491
+		$pattern=$this->getDateFormat();
492
+		$pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern);
493
+		$formatter=new TSimpleDateFormatter($pattern);
494 494
 
495
-		$order = $formatter->getDayMonthYearOrdering();
495
+		$order=$formatter->getDayMonthYearOrdering();
496 496
 
497 497
 		if(isset($values[$key.'$day'])) {
498
-			$day = intval($values[$key.'$day']);
498
+			$day=intval($values[$key.'$day']);
499 499
 		} elseif(in_array('day', $order)) {
500
-			$day = $date['mday'];
500
+			$day=$date['mday'];
501 501
 		} else {
502
-			$day = 1;
502
+			$day=1;
503 503
 		}
504 504
 
505 505
 		if(isset($values[$key.'$month']))
506
-			$month = intval($values[$key.'$month']) + 1;
506
+			$month=intval($values[$key.'$month']) + 1;
507 507
 		else
508
-			$month = $date['mon'];
508
+			$month=$date['mon'];
509 509
 
510 510
 		if(isset($values[$key.'$year']))
511
-			$year = intval($values[$key.'$year']);
511
+			$year=intval($values[$key.'$year']);
512 512
 		else
513
-			$year = $date['year'];
513
+			$year=$date['year'];
514 514
 
515
-		$s = new TDateTimeStamp;
516
-		$date = $s->getTimeStamp(0, 0, 0, $month, $day, $year);
515
+		$s=new TDateTimeStamp;
516
+		$date=$s->getTimeStamp(0, 0, 0, $month, $day, $year);
517 517
 		//$date = @mktime(0, 0, 0, $month, $day, $year);
518 518
 
519
-		$pattern = $this->getDateFormat();
520
-		$pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern);
519
+		$pattern=$this->getDateFormat();
520
+		$pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern);
521 521
 
522
-		$formatter = new TSimpleDateFormatter($pattern);
522
+		$formatter=new TSimpleDateFormatter($pattern);
523 523
 		return $formatter->format($date);
524 524
 	}
525 525
 
@@ -529,31 +529,31 @@  discard block
 block discarded – undo
529 529
 	 */
530 530
 	protected function getDatePickerOptions()
531 531
 	{
532
-		$options['ID'] = $this->getClientID();
533
-		$options['InputMode'] = $this->getInputMode();
534
-		$options['Format'] = $this->getDateFormat();
535
-		$options['FirstDayOfWeek'] = $this->getFirstDayOfWeek();
532
+		$options['ID']=$this->getClientID();
533
+		$options['InputMode']=$this->getInputMode();
534
+		$options['Format']=$this->getDateFormat();
535
+		$options['FirstDayOfWeek']=$this->getFirstDayOfWeek();
536 536
 		if(($cssClass=$this->getCssClass())!=='')
537
-			$options['ClassName'] = $cssClass;
538
-		$options['CalendarStyle'] = $this->getCalendarStyle();
539
-		$options['FromYear'] = $this->getFromYear();
540
-		$options['UpToYear'] = $this->getUpToYear();
537
+			$options['ClassName']=$cssClass;
538
+		$options['CalendarStyle']=$this->getCalendarStyle();
539
+		$options['FromYear']=$this->getFromYear();
540
+		$options['UpToYear']=$this->getUpToYear();
541 541
 		switch($this->getMode())
542 542
 		{
543 543
 			case TDatePickerMode::Basic:
544 544
 				break;
545 545
 			case TDatePickerMode::Clickable:
546
-				$options['TriggerEvent'] = "click";
546
+				$options['TriggerEvent']="click";
547 547
 				break;
548 548
 			default:
549
-				$options['Trigger'] = $this->getDatePickerButtonID();
549
+				$options['Trigger']=$this->getDatePickerButtonID();
550 550
 				break;
551 551
 		}
552
-		$options['PositionMode'] = $this->getPositionMode();
552
+		$options['PositionMode']=$this->getPositionMode();
553 553
 
554
-		$options = array_merge($options, $this->getCulturalOptions());
554
+		$options=array_merge($options, $this->getCulturalOptions());
555 555
 		if($this->_clientScript!==null)
556
-			$options = array_merge($options,
556
+			$options=array_merge($options,
557 557
 				$this->_clientScript->getOptions()->toArray());
558 558
 		return $options;
559 559
 	}
@@ -564,13 +564,13 @@  discard block
 block discarded – undo
564 564
 	 */
565 565
 	protected function getCulturalOptions()
566 566
 	{
567
-		if($this->getCurrentCulture() == 'en')
567
+		if($this->getCurrentCulture()=='en')
568 568
 			return array();
569 569
 
570
-		$date = $this->getLocalizedCalendarInfo();
571
-		$options['MonthNames'] = $date->getMonthNames();
572
-		$options['AbbreviatedMonthNames'] = $date->getAbbreviatedMonthNames();
573
-		$options['ShortWeekDayNames'] = $date->getAbbreviatedDayNames();
570
+		$date=$this->getLocalizedCalendarInfo();
571
+		$options['MonthNames']=$date->getMonthNames();
572
+		$options['AbbreviatedMonthNames']=$date->getAbbreviatedMonthNames();
573
+		$options['ShortWeekDayNames']=$date->getAbbreviatedDayNames();
574 574
 
575 575
 		return $options;
576 576
 	}
@@ -580,8 +580,8 @@  discard block
 block discarded – undo
580 580
 	 */
581 581
 	protected function getCurrentCulture()
582 582
 	{
583
-		$app = $this->getApplication()->getGlobalization(false);
584
-		return $this->getCulture() == '' ?
583
+		$app=$this->getApplication()->getGlobalization(false);
584
+		return $this->getCulture()=='' ?
585 585
 				($app ? $app->getCulture() : 'en') : $this->getCulture();
586 586
 	}
587 587
 
@@ -591,8 +591,8 @@  discard block
 block discarded – undo
591 591
 	protected function getLocalizedCalendarInfo()
592 592
 	{
593 593
 		//expensive operations
594
-		$culture = $this->getCurrentCulture();
595
-		$info = new CultureInfo($culture);
594
+		$culture=$this->getCurrentCulture();
595
+		$info=new CultureInfo($culture);
596 596
 		return $info->getDateTimeFormat();
597 597
 	}
598 598
 
@@ -601,19 +601,19 @@  discard block
 block discarded – undo
601 601
 	 */
602 602
 	protected function renderDropDownListCalendar($writer)
603 603
 	{
604
-		if($this->getMode() == TDatePickerMode::Basic)
604
+		if($this->getMode()==TDatePickerMode::Basic)
605 605
 			$this->setMode(TDatePickerMode::ImageButton);
606 606
 		parent::addAttributesToRender($writer);
607 607
 		$writer->removeAttribute('name');
608 608
 		$writer->removeAttribute('type');
609 609
 		$writer->addAttribute('id', $this->getClientID());
610 610
 
611
-		if(strlen($class = $this->getCssClass()) > 0)
611
+		if(strlen($class=$this->getCssClass()) > 0)
612 612
 			$writer->addAttribute('class', $class);
613 613
 		$writer->renderBeginTag('span');
614 614
 
615
-		$s = new TDateTimeStamp;
616
-		$date = $s->getDate($this->getTimeStampFromText());
615
+		$s=new TDateTimeStamp;
616
+		$date=$s->getDate($this->getTimeStampFromText());
617 617
 		//$date = @getdate($this->getTimeStampFromText());
618 618
 
619 619
 		$this->renderCalendarSelections($writer, $date);
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 
631 631
 	protected function hasDayPattern()
632 632
 	{
633
-		$formatter = new TSimpleDateFormatter($this->getDateFormat());
633
+		$formatter=new TSimpleDateFormatter($this->getDateFormat());
634 634
 		return ($formatter->getDayPattern()!==null);
635 635
 	}
636 636
 
@@ -641,16 +641,16 @@  discard block
 block discarded – undo
641 641
 	 */
642 642
 	protected function renderCalendarSelections($writer, $date)
643 643
 	{
644
-		$formatter = new TSimpleDateFormatter($this->getDateFormat());
644
+		$formatter=new TSimpleDateFormatter($this->getDateFormat());
645 645
 
646 646
 		foreach($formatter->getDayMonthYearOrdering() as $type)
647 647
 		{
648
-			if($type == 'day')
649
-				$this->renderCalendarDayOptions($writer,$date['mday']);
650
-			elseif($type == 'month')
651
-				$this->renderCalendarMonthOptions($writer,$date['mon']);
652
-			elseif($type == 'year')
653
-				$this->renderCalendarYearOptions($writer,$date['year']);
648
+			if($type=='day')
649
+				$this->renderCalendarDayOptions($writer, $date['mday']);
650
+			elseif($type=='month')
651
+				$this->renderCalendarMonthOptions($writer, $date['mon']);
652
+			elseif($type=='year')
653
+				$this->renderCalendarYearOptions($writer, $date['year']);
654 654
 		}
655 655
 	}
656 656
 
@@ -660,9 +660,9 @@  discard block
 block discarded – undo
660 660
 	 */
661 661
 	protected function getTimeStampFromText()
662 662
 	{
663
-		$pattern = $this->getDateFormat();
664
-		$pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern);
665
-		$formatter = new TSimpleDateFormatter($pattern);
663
+		$pattern=$this->getDateFormat();
664
+		$pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern);
665
+		$formatter=new TSimpleDateFormatter($pattern);
666 666
 		return $formatter->parse($this->getText());
667 667
 	}
668 668
 
@@ -672,12 +672,12 @@  discard block
 block discarded – undo
672 672
 	 * @param array list of selection options
673 673
 	 * @param mixed selected key.
674 674
 	 */
675
-	private function renderDropDownListOptions($writer,$options,$selected=null)
675
+	private function renderDropDownListOptions($writer, $options, $selected=null)
676 676
 	{
677 677
 		foreach($options as $k => $v)
678 678
 		{
679 679
 			$writer->addAttribute('value', $k);
680
-			if($k == $selected)
680
+			if($k==$selected)
681 681
 				$writer->addAttribute('selected', 'selected');
682 682
 			$writer->renderBeginTag('option');
683 683
 			$writer->write($v);
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 	 */
693 693
 	protected function renderCalendarDayOptions($writer, $selected=null)
694 694
 	{
695
-		$days = $this->getDropDownDayOptions();
695
+		$days=$this->getDropDownDayOptions();
696 696
 		$writer->addAttribute('id', $this->getClientID().TControl::CLIENT_ID_SEPARATOR.'day');
697 697
 		$writer->addAttribute('name', $this->getUniqueID().TControl::ID_SEPARATOR.'day');
698 698
 		$writer->addAttribute('class', 'datepicker_day_options');
@@ -708,12 +708,12 @@  discard block
 block discarded – undo
708 708
 	 */
709 709
 	protected function getDropDownDayOptions()
710 710
 	{
711
-		$formatter = new TSimpleDateFormatter($this->getDateFormat());
712
-		$days = array();
713
-		$requiresPadding = $formatter->getDayPattern() === 'dd';
714
-		for($i=1;$i<=31;$i++)
711
+		$formatter=new TSimpleDateFormatter($this->getDateFormat());
712
+		$days=array();
713
+		$requiresPadding=$formatter->getDayPattern()==='dd';
714
+		for($i=1; $i <= 31; $i++)
715 715
 		{
716
-			$days[$i] = $requiresPadding ? str_pad($i, 2, '0', STR_PAD_LEFT) : $i;
716
+			$days[$i]=$requiresPadding ? str_pad($i, 2, '0', STR_PAD_LEFT) : $i;
717 717
 		}
718 718
 		return $days;
719 719
 	}
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 	 */
726 726
 	protected function renderCalendarMonthOptions($writer, $selected=null)
727 727
 	{
728
-		$info = $this->getLocalizedCalendarInfo();
728
+		$info=$this->getLocalizedCalendarInfo();
729 729
 		$writer->addAttribute('id', $this->getClientID().TControl::CLIENT_ID_SEPARATOR.'month');
730 730
 		$writer->addAttribute('name', $this->getUniqueID().TControl::ID_SEPARATOR.'month');
731 731
 		$writer->addAttribute('class', 'datepicker_month_options');
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
 			$writer->addAttribute('disabled', 'disabled');
734 734
 		$writer->renderBeginTag('select');
735 735
 		$this->renderDropDownListOptions($writer,
736
-					$this->getLocalizedMonthNames($info), $selected-1);
736
+					$this->getLocalizedMonthNames($info), $selected - 1);
737 737
 		$writer->renderEndTag();
738 738
 	}
739 739
 
@@ -746,17 +746,17 @@  discard block
 block discarded – undo
746 746
 	 */
747 747
 	protected function getLocalizedMonthNames($info)
748 748
 	{
749
-		$formatter = new TSimpleDateFormatter($this->getDateFormat());
749
+		$formatter=new TSimpleDateFormatter($this->getDateFormat());
750 750
 		switch($formatter->getMonthPattern())
751 751
 		{
752 752
 			case 'MMM': return $info->getAbbreviatedMonthNames();
753 753
 			case 'MM':
754
-				$array = array();
755
-				for($i=1;$i<=12;$i++)
756
-						$array[$i-1] = $i < 10 ? '0'.$i : $i;
754
+				$array=array();
755
+				for($i=1; $i <= 12; $i++)
756
+						$array[$i - 1]=$i < 10 ? '0'.$i : $i;
757 757
 				return $array;
758 758
 			case 'M':
759
-				$array = array(); for($i=1;$i<=12;$i++) $array[$i-1] = $i;
759
+				$array=array(); for($i=1; $i <= 12; $i++) $array[$i - 1]=$i;
760 760
 				return $array;
761 761
 			default :	return $info->getMonthNames();
762 762
 		}
@@ -769,9 +769,9 @@  discard block
 block discarded – undo
769 769
 	 */
770 770
 	protected function renderCalendarYearOptions($writer, $selected=null)
771 771
 	{
772
-		$years = array();
773
-		for($i = $this->getFromYear(); $i <= $this->getUpToYear(); $i++)
774
-			$years[$i] = $i;
772
+		$years=array();
773
+		for($i=$this->getFromYear(); $i <= $this->getUpToYear(); $i++)
774
+			$years[$i]=$i;
775 775
 		$writer->addAttribute('id', $this->getClientID().TControl::CLIENT_ID_SEPARATOR.'year');
776 776
 		$writer->addAttribute('name', $this->getUniqueID().TControl::ID_SEPARATOR.'year');
777 777
 		$writer->addAttribute('class', 'datepicker_year_options');
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 		$writer->addAttribute('id', $this->getDatePickerButtonID());
801 801
 		$writer->addAttribute('type', 'button');
802 802
 		$writer->addAttribute('class', $this->getCssClass().' TDatePickerButton');
803
-		$writer->addAttribute('value',$this->getButtonText());
803
+		$writer->addAttribute('value', $this->getButtonText());
804 804
 		if(!$this->getEnabled(true))
805 805
 			$writer->addAttribute('disabled', 'disabled');
806 806
 		$writer->renderBeginTag("input");
@@ -813,8 +813,8 @@  discard block
 block discarded – undo
813 813
 	 */
814 814
 	 protected function renderImageButtonDatePicker($writer)
815 815
 	{
816
-		$url = $this->getButtonImageUrl();
817
-		$url = empty($url) ? $this->getAssetUrl('calendar.png') : $url;
816
+		$url=$this->getButtonImageUrl();
817
+		$url=empty($url) ? $this->getAssetUrl('calendar.png') : $url;
818 818
 		$writer->addAttribute('id', $this->getDatePickerButtonID());
819 819
 		$writer->addAttribute('src', $url);
820 820
 		$writer->addAttribute('alt', ' ');
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 	 */
834 834
 	protected function getAssetUrl($file='')
835 835
 	{
836
-		$base = $this->getPage()->getClientScript()->getPradoScriptAssetUrl();
836
+		$base=$this->getPage()->getClientScript()->getPradoScriptAssetUrl();
837 837
 		return $base.'/'.self::SCRIPT_PATH.'/'.$file;
838 838
 	}
839 839
 
@@ -843,8 +843,8 @@  discard block
 block discarded – undo
843 843
 	 */
844 844
 	protected function publishCalendarStyle()
845 845
 	{
846
-		$url = $this->getAssetUrl($this->getCalendarStyle().'.css');
847
-		$cs = $this->getPage()->getClientScript();
846
+		$url=$this->getAssetUrl($this->getCalendarStyle().'.css');
847
+		$cs=$this->getPage()->getClientScript();
848 848
 		if(!$cs->isStyleSheetFileRegistered($url))
849 849
 			$cs->registerStyleSheetFile($url, $url);
850 850
 		return $url;
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 	protected function addAttributesToRender($writer)
858 858
 	{
859 859
 		parent::addAttributesToRender($writer);
860
-		$writer->addAttribute('id',$this->getClientID());
860
+		$writer->addAttribute('id', $this->getClientID());
861 861
 	}
862 862
 
863 863
 	/**
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 	{
868 868
 		if($this->getShowCalendar())
869 869
 		{
870
-			$cs = $this->getPage()->getClientScript();
870
+			$cs=$this->getPage()->getClientScript();
871 871
 			$cs->registerPradoScript("datepicker");
872 872
 		}
873 873
 	}
@@ -876,16 +876,16 @@  discard block
 block discarded – undo
876 876
 	{
877 877
 		if($this->getShowCalendar())
878 878
 		{
879
-			$cs = $this->getPage()->getClientScript();
879
+			$cs=$this->getPage()->getClientScript();
880 880
 			if(!$cs->isEndScriptRegistered('TDatePicker.spacer'))
881 881
 			{
882
-				$spacer = $this->getAssetUrl('spacer.gif');
883
-				$code = "Prado.WebUI.TDatePicker.spacer = '$spacer';";
882
+				$spacer=$this->getAssetUrl('spacer.gif');
883
+				$code="Prado.WebUI.TDatePicker.spacer = '$spacer';";
884 884
 				$cs->registerEndScript('TDatePicker.spacer', $code);
885 885
 			}
886 886
 
887
-			$options = TJavaScript::encode($this->getDatePickerOptions());
888
-			$code = "new Prado.WebUI.TDatePicker($options);";
887
+			$options=TJavaScript::encode($this->getDatePickerOptions());
888
+			$code="new Prado.WebUI.TDatePicker($options);";
889 889
 			$cs->registerEndScript("prado:".$this->getClientID(), $code);
890 890
 		}
891 891
 	}
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TEditCommandColumn.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -233,6 +233,10 @@
 block discarded – undo
233 233
 	 * @param string button caption
234 234
 	 * @param boolean whether the button should cause validation
235 235
 	 * @param string the validation group that the button belongs to
236
+	 * @param string $commandName
237
+	 * @param string $text
238
+	 * @param boolean $causesValidation
239
+	 * @param string $validationGroup
236 240
 	 * @return mixed the newly created button.
237 241
 	 */
238 242
 	protected function createButton($commandName,$text,$causesValidation,$validationGroup)
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function getButtonType()
57 57
 	{
58
-		return $this->getViewState('ButtonType',TButtonColumnType::LinkButton);
58
+		return $this->getViewState('ButtonType', TButtonColumnType::LinkButton);
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function setButtonType($value)
65 65
 	{
66
-		$this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TButtonColumnType'),TButtonColumnType::LinkButton);
66
+		$this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TButtonColumnType'), TButtonColumnType::LinkButton);
67 67
 	}
68 68
 
69 69
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function getEditText()
73 73
 	{
74
-		return $this->getViewState('EditText','Edit');
74
+		return $this->getViewState('EditText', 'Edit');
75 75
 	}
76 76
 
77 77
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function setEditText($value)
81 81
 	{
82
-		$this->setViewState('EditText',$value,'Edit');
82
+		$this->setViewState('EditText', $value, 'Edit');
83 83
 	}
84 84
 
85 85
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getEditImageUrl()
89 89
 	{
90
-		return $this->getViewState('EditImageUrl','');
90
+		return $this->getViewState('EditImageUrl', '');
91 91
 	}
92 92
 
93 93
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setEditImageUrl($value)
97 97
 	{
98
-		$this->setViewState('EditImageUrl',$value,'');
98
+		$this->setViewState('EditImageUrl', $value, '');
99 99
 	}
100 100
 
101 101
 	/**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function getUpdateText()
105 105
 	{
106
-		return $this->getViewState('UpdateText','Update');
106
+		return $this->getViewState('UpdateText', 'Update');
107 107
 	}
108 108
 
109 109
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setUpdateText($value)
113 113
 	{
114
-		$this->setViewState('UpdateText',$value,'Update');
114
+		$this->setViewState('UpdateText', $value, 'Update');
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getUpdateImageUrl()
121 121
 	{
122
-		return $this->getViewState('UpdateImageUrl','');
122
+		return $this->getViewState('UpdateImageUrl', '');
123 123
 	}
124 124
 
125 125
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	public function setUpdateImageUrl($value)
129 129
 	{
130
-		$this->setViewState('UpdateImageUrl',$value,'');
130
+		$this->setViewState('UpdateImageUrl', $value, '');
131 131
 	}
132 132
 
133 133
 	/**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function getCancelText()
137 137
 	{
138
-		return $this->getViewState('CancelText','Cancel');
138
+		return $this->getViewState('CancelText', 'Cancel');
139 139
 	}
140 140
 
141 141
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	public function setCancelText($value)
145 145
 	{
146
-		$this->setViewState('CancelText',$value,'Cancel');
146
+		$this->setViewState('CancelText', $value, 'Cancel');
147 147
 	}
148 148
 
149 149
 	/**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function getCancelImageUrl()
153 153
 	{
154
-		return $this->getViewState('CancelImageUrl','');
154
+		return $this->getViewState('CancelImageUrl', '');
155 155
 	}
156 156
 
157 157
 	/**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function setCancelImageUrl($value)
161 161
 	{
162
-		$this->setViewState('CancelImageUrl',$value,'');
162
+		$this->setViewState('CancelImageUrl', $value, '');
163 163
 	}
164 164
 
165 165
 	/**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public function getCausesValidation()
169 169
 	{
170
-		return $this->getViewState('CausesValidation',true);
170
+		return $this->getViewState('CausesValidation', true);
171 171
 	}
172 172
 
173 173
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public function setCausesValidation($value)
177 177
 	{
178
-		$this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true);
178
+		$this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true);
179 179
 	}
180 180
 
181 181
 	/**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public function getValidationGroup()
185 185
 	{
186
-		return $this->getViewState('ValidationGroup','');
186
+		return $this->getViewState('ValidationGroup', '');
187 187
 	}
188 188
 
189 189
 	/**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 */
192 192
 	public function setValidationGroup($value)
193 193
 	{
194
-		$this->setViewState('ValidationGroup',$value,'');
194
+		$this->setViewState('ValidationGroup', $value, '');
195 195
 	}
196 196
 
197 197
 	/**
@@ -203,27 +203,27 @@  discard block
 block discarded – undo
203 203
 	 * @param integer the index to the Columns property that the cell resides in.
204 204
 	 * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem)
205 205
 	 */
206
-	public function initializeCell($cell,$columnIndex,$itemType)
206
+	public function initializeCell($cell, $columnIndex, $itemType)
207 207
 	{
208 208
 		if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem)
209 209
 		{
210
-			$button=$this->createButton('Edit',$this->getEditText(),false,'');
210
+			$button=$this->createButton('Edit', $this->getEditText(), false, '');
211 211
 			$cell->getControls()->add($button);
212
-			$cell->registerObject('EditButton',$button);
212
+			$cell->registerObject('EditButton', $button);
213 213
 		}
214 214
 		else if($itemType===TListItemType::EditItem)
215 215
 		{
216 216
 			$controls=$cell->getControls();
217
-			$button=$this->createButton('Update',$this->getUpdateText(),$this->getCausesValidation(),$this->getValidationGroup());
217
+			$button=$this->createButton('Update', $this->getUpdateText(), $this->getCausesValidation(), $this->getValidationGroup());
218 218
 			$controls->add($button);
219
-			$cell->registerObject('UpdateButton',$button);
219
+			$cell->registerObject('UpdateButton', $button);
220 220
 			$controls->add('&nbsp;');
221
-			$button=$this->createButton('Cancel',$this->getCancelText(),false,'');
221
+			$button=$this->createButton('Cancel', $this->getCancelText(), false, '');
222 222
 			$controls->add($button);
223
-			$cell->registerObject('CancelButton',$button);
223
+			$cell->registerObject('CancelButton', $button);
224 224
 		}
225 225
 		else
226
-			parent::initializeCell($cell,$columnIndex,$itemType);
226
+			parent::initializeCell($cell, $columnIndex, $itemType);
227 227
 	}
228 228
 
229 229
 	/**
@@ -235,18 +235,18 @@  discard block
 block discarded – undo
235 235
 	 * @param string the validation group that the button belongs to
236 236
 	 * @return mixed the newly created button.
237 237
 	 */
238
-	protected function createButton($commandName,$text,$causesValidation,$validationGroup)
238
+	protected function createButton($commandName, $text, $causesValidation, $validationGroup)
239 239
 	{
240 240
 		if($this->getButtonType()===TButtonColumnType::LinkButton)
241
-			$button= new TLinkButton;
241
+			$button=new TLinkButton;
242 242
 		else if($this->getButtonType()===TButtonColumnType::PushButton)
243
-			$button= new TButton;
243
+			$button=new TButton;
244 244
 		else	// image buttons
245 245
 		{
246
-			$button= new TImageButton;
247
-			if(strcasecmp($commandName,'Update')===0)
246
+			$button=new TImageButton;
247
+			if(strcasecmp($commandName, 'Update')===0)
248 248
 				$url=$this->getUpdateImageUrl();
249
-			else if(strcasecmp($commandName,'Cancel')===0)
249
+			else if(strcasecmp($commandName, 'Cancel')===0)
250 250
 				$url=$this->getCancelImageUrl();
251 251
 			else
252 252
 				$url=$this->getEditImageUrl();
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TWebControl.php 2 patches
Doc Comments   +11 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,6 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * control does work with javascript and your class wants to flag that it requires an id
54 54
 	 * to operate properly.  Once set to true, it stays that way.
55 55
 	 * @param boolean pass true to enable enforcement of the tag attribute id.
56
+	 * @param boolean $value
56 57
 	 */
57 58
 	public function setEnsureId($value)
58 59
 	{
@@ -60,7 +61,7 @@  discard block
 block discarded – undo
60 61
 	}
61 62
 
62 63
 	/**
63
-	 * @return whether this web control must have an id
64
+	 * @return boolean this web control must have an id
64 65
 	 */
65 66
 	public function getEnsureId()
66 67
 	{
@@ -107,6 +108,7 @@  discard block
 block discarded – undo
107 108
 	 * Only one-character string can be set, or an exception will be raised.
108 109
 	 * Pass in an empty string if you want to disable access key.
109 110
 	 * @param string the access key to be set
111
+	 * @param string $value
110 112
 	 * @throws TInvalidDataValueException if the access key is specified with more than one character
111 113
 	 */
112 114
 	public function setAccessKey($value)
@@ -186,6 +188,7 @@  discard block
 block discarded – undo
186 188
 
187 189
 	/**
188 190
 	 * @param string the border width of the control
191
+	 * @param string $value
189 192
 	 */
190 193
 	public function setBorderWidth($value)
191 194
 	{
@@ -213,6 +216,7 @@  discard block
 block discarded – undo
213 216
 
214 217
 	/**
215 218
 	 * @param string the foreground color of the control
219
+	 * @param string $value
216 220
 	 */
217 221
 	public function setForeColor($value)
218 222
 	{
@@ -239,7 +243,7 @@  discard block
 block discarded – undo
239 243
 	}
240 244
 
241 245
 	/**
242
-	 * @return TDisplayStyle display style of the control, default is TDisplayStyle::Fixed
246
+	 * @return string display style of the control, default is TDisplayStyle::Fixed
243 247
 	 */
244 248
 	public function getDisplay()
245 249
 	{
@@ -248,6 +252,7 @@  discard block
 block discarded – undo
248 252
 
249 253
 	/**
250 254
 	 * @param string the css class of the control
255
+	 * @param string $value
251 256
 	 */
252 257
 	public function setCssClass($value)
253 258
 	{
@@ -267,6 +272,7 @@  discard block
 block discarded – undo
267 272
 
268 273
 	/**
269 274
 	 * @param string the height of the control
275
+	 * @param string $value
270 276
 	 */
271 277
 	public function setHeight($value)
272 278
 	{
@@ -310,6 +316,7 @@  discard block
 block discarded – undo
310 316
 	 * Sets the css style string of the control.
311 317
 	 * The style string will be prefixed to the styles set via other control properties (e.g. Height, Width).
312 318
 	 * @param string the css style string
319
+	 * @param string $value
313 320
 	 * @throws TInvalidDataValueException if the parameter is not a string
314 321
 	 */
315 322
 	public function setStyle($value)
@@ -340,6 +347,7 @@  discard block
 block discarded – undo
340 347
 	 * Sets the tab index of the control.
341 348
 	 * Pass 0 if you want to disable tab index.
342 349
 	 * @param integer the tab index to be set
350
+	 * @param integer $value
343 351
 	 */
344 352
 	public function setTabIndex($value)
345 353
 	{
@@ -388,6 +396,7 @@  discard block
 block discarded – undo
388 396
 
389 397
 	/**
390 398
 	 * @param string the width of the control
399
+	 * @param string $value
391 400
 	 */
392 401
 	public function setWidth($value)
393 402
 	{
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public function setEnsureId($value)
58 58
 	{
59
-		$this->_ensureid |= TPropertyValue::ensureBoolean($value);
59
+		$this->_ensureid|=TPropertyValue::ensureBoolean($value);
60 60
 	}
61 61
 
62 62
 	/**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	public function getDecorator($create=true)
74 74
 	{
75 75
 		if($create && !$this->_decorator)
76
-			$this->_decorator = new TWebControlDecorator($this);
76
+			$this->_decorator=new TWebControlDecorator($this);
77 77
 		return $this->_decorator;
78 78
 	}
79 79
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function getAccessKey()
101 101
 	{
102
-		return $this->getViewState('AccessKey','');
102
+		return $this->getViewState('AccessKey', '');
103 103
 	}
104 104
 
105 105
 	/**
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function setAccessKey($value)
113 113
 	{
114
-		if(strlen($value)>1)
115
-			throw new TInvalidDataValueException('webcontrol_accesskey_invalid',get_class($this),$value);
116
-		$this->setViewState('AccessKey',$value,'');
114
+		if(strlen($value) > 1)
115
+			throw new TInvalidDataValueException('webcontrol_accesskey_invalid', get_class($this), $value);
116
+		$this->setViewState('AccessKey', $value, '');
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function getBackColor()
123 123
 	{
124
-		if($style=$this->getViewState('Style',null))
124
+		if($style=$this->getViewState('Style', null))
125 125
 			return $style->getBackColor();
126 126
 		else
127 127
 			return '';
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function getBorderColor()
142 142
 	{
143
-		if($style=$this->getViewState('Style',null))
143
+		if($style=$this->getViewState('Style', null))
144 144
 			return $style->getBorderColor();
145 145
 		else
146 146
 			return '';
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	public function getBorderStyle()
161 161
 	{
162
-		if($style=$this->getViewState('Style',null))
162
+		if($style=$this->getViewState('Style', null))
163 163
 			return $style->getBorderStyle();
164 164
 		else
165 165
 			return '';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function getBorderWidth()
180 180
 	{
181
-		if($style=$this->getViewState('Style',null))
181
+		if($style=$this->getViewState('Style', null))
182 182
 			return $style->getBorderWidth();
183 183
 		else
184 184
 			return '';
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	 */
206 206
 	public function getForeColor()
207 207
 	{
208
-		if($style=$this->getViewState('Style',null))
208
+		if($style=$this->getViewState('Style', null))
209 209
 			return $style->getForeColor();
210 210
 		else
211 211
 			return '';
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	public function getHeight()
226 226
 	{
227
-		if($style=$this->getViewState('Style',null))
227
+		if($style=$this->getViewState('Style', null))
228 228
 			return $style->getHeight();
229 229
 		else
230 230
 			return '';
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 */
260 260
 	public function getCssClass()
261 261
 	{
262
-		if($style=$this->getViewState('Style',null))
262
+		if($style=$this->getViewState('Style', null))
263 263
 			return $style->getCssClass();
264 264
 		else
265 265
 			return '';
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 */
279 279
 	public function getHasStyle()
280 280
 	{
281
-		return $this->getViewState('Style',null)!==null;
281
+		return $this->getViewState('Style', null)!==null;
282 282
 	}
283 283
 
284 284
 	/**
@@ -296,12 +296,12 @@  discard block
 block discarded – undo
296 296
 	 */
297 297
 	public function getStyle()
298 298
 	{
299
-		if($style=$this->getViewState('Style',null))
299
+		if($style=$this->getViewState('Style', null))
300 300
 			return $style;
301 301
 		else
302 302
 		{
303 303
 			$style=$this->createStyle();
304
-			$this->setViewState('Style',$style,null);
304
+			$this->setViewState('Style', $style, null);
305 305
 			return $style;
306 306
 		}
307 307
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		if(is_string($value))
318 318
 			$this->getStyle()->setCustomStyle($value);
319 319
 		else
320
-			throw new TInvalidDataValueException('webcontrol_style_invalid',get_class($this));
320
+			throw new TInvalidDataValueException('webcontrol_style_invalid', get_class($this));
321 321
 	}
322 322
 
323 323
 	/**
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 */
334 334
 	public function getTabIndex()
335 335
 	{
336
-		return $this->getViewState('TabIndex',0);
336
+		return $this->getViewState('TabIndex', 0);
337 337
 	}
338 338
 
339 339
 	/**
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	 */
344 344
 	public function setTabIndex($value)
345 345
 	{
346
-		$this->setViewState('TabIndex',TPropertyValue::ensureInteger($value),0);
346
+		$this->setViewState('TabIndex', TPropertyValue::ensureInteger($value), 0);
347 347
 	}
348 348
 
349 349
 	/**
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 	 */
363 363
 	public function getToolTip()
364 364
 	{
365
-		return $this->getViewState('ToolTip','');
365
+		return $this->getViewState('ToolTip', '');
366 366
 	}
367 367
 
368 368
 	/**
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	 */
373 373
 	public function setToolTip($value)
374 374
 	{
375
-		$this->setViewState('ToolTip',$value,'');
375
+		$this->setViewState('ToolTip', $value, '');
376 376
 	}
377 377
 
378 378
 	/**
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 */
381 381
 	public function getWidth()
382 382
 	{
383
-		if($style=$this->getViewState('Style',null))
383
+		if($style=$this->getViewState('Style', null))
384 384
 			return $style->getWidth();
385 385
 		else
386 386
 			return '';
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 	 * @param TEventParameter event parameter to be passed to the event handlers
403 403
 	 */
404 404
 	public function onPreRender($param) {
405
-		if($decorator = $this->getDecorator(false))
405
+		if($decorator=$this->getDecorator(false))
406 406
 			$decorator->instantiate();
407 407
 
408 408
 		parent::onPreRender($param);
@@ -418,21 +418,21 @@  discard block
 block discarded – undo
418 418
 	protected function addAttributesToRender($writer)
419 419
 	{
420 420
 		if($this->getID()!=='' || $this->getEnsureId())
421
-			$writer->addAttribute('id',$this->getClientID());
421
+			$writer->addAttribute('id', $this->getClientID());
422 422
 		if(($accessKey=$this->getAccessKey())!=='')
423
-			$writer->addAttribute('accesskey',$accessKey);
423
+			$writer->addAttribute('accesskey', $accessKey);
424 424
 		if(!$this->getEnabled())
425
-			$writer->addAttribute('disabled','disabled');
426
-		if(($tabIndex=$this->getTabIndex())>0)
427
-			$writer->addAttribute('tabindex',"$tabIndex");
425
+			$writer->addAttribute('disabled', 'disabled');
426
+		if(($tabIndex=$this->getTabIndex()) > 0)
427
+			$writer->addAttribute('tabindex', "$tabIndex");
428 428
 		if(($toolTip=$this->getToolTip())!=='')
429
-			$writer->addAttribute('title',$toolTip);
430
-		if($style=$this->getViewState('Style',null))
429
+			$writer->addAttribute('title', $toolTip);
430
+		if($style=$this->getViewState('Style', null))
431 431
 			$style->addAttributesToRender($writer);
432 432
 		if($this->getHasAttributes())
433 433
 		{
434 434
 			foreach($this->getAttributes() as $name=>$value)
435
-				$writer->addAttribute($name,$value);
435
+				$writer->addAttribute($name, $value);
436 436
 		}
437 437
 	}
438 438
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	 */
459 459
 	public function renderBeginTag($writer)
460 460
 	{
461
-		if($decorator = $this->getDecorator(false)) {
461
+		if($decorator=$this->getDecorator(false)) {
462 462
 			$decorator->renderPreTagText($writer);
463 463
 			$this->addAttributesToRender($writer);
464 464
 			$writer->renderBeginTag($this->getTagName());
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 	 */
487 487
 	public function renderEndTag($writer)
488 488
 	{
489
-		if($decorator = $this->getDecorator(false)) {
489
+		if($decorator=$this->getDecorator(false)) {
490 490
 			$decorator->renderPostContentsText($writer);
491 491
 			$writer->renderEndTag();
492 492
 			$decorator->renderPostTagText($writer);
Please login to merge, or discard this patch.