Completed
Push — remove_deprecates ( 1de955 )
by Fabio
07:55
created
framework/Web/THttpResponseAdapter.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -31,6 +31,7 @@
 block discarded – undo
31 31
 	/**
32 32
 	 * Constructor. Attach a response to be adapted.
33 33
 	 * @param THttpResponse the response object the adapter is to attach to.
34
+	 * @param THttpResponse $response
34 35
 	 */
35 36
 	public function __construct($response)
36 37
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 	 */
72 72
 	public function createNewHtmlWriter($type, $writer)
73 73
 	{
74
-		return $this->_response->createNewHtmlWriter($type,$writer);
74
+		return $this->_response->createNewHtmlWriter($type, $writer);
75 75
 	}
76 76
 }
77 77
 
Please login to merge, or discard this patch.
framework/Web/THttpSession.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -265,6 +265,7 @@  discard block
 block discarded – undo
265 265
 	 * If true, make sure the methods {@link _open}, {@link _close}, {@link _read},
266 266
 	 * {@link _write}, {@link _destroy}, and {@link _gc} are overridden in child
267 267
 	 * class, because they will be used as the callback handlers.
268
+	 * @param boolean $value
268 269
 	 */
269 270
 	public function setUseCustomStorage($value)
270 271
 	{
@@ -527,6 +528,7 @@  discard block
 block discarded – undo
527 528
 	 * Returns the session variable value with the session variable name.
528 529
 	 * This method is exactly the same as {@link offsetGet}.
529 530
 	 * @param mixed the session variable name
531
+	 * @param string $key
530 532
 	 * @return mixed the session variable value, null if no such variable exists
531 533
 	 */
532 534
 	public function itemAt($key)
@@ -539,6 +541,7 @@  discard block
 block discarded – undo
539 541
 	 * Note, if the specified name already exists, the old value will be removed first.
540 542
 	 * @param mixed session variable name
541 543
 	 * @param mixed session variable value
544
+	 * @param string $key
542 545
 	 */
543 546
 	public function add($key,$value)
544 547
 	{
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -309,13 +309,11 @@  discard block
 block discarded – undo
309 309
       {
310 310
 				ini_set('session.use_cookies','0');
311 311
 			  ini_set('session.use_only_cookies','0');
312
-      }
313
-			else if($value===THttpSessionCookieMode::Allow)
312
+      } else if($value===THttpSessionCookieMode::Allow)
314 313
 			{
315 314
 				ini_set('session.use_cookies','1');
316 315
 				ini_set('session.use_only_cookies','0');
317
-			}
318
-			else
316
+			} else
319 317
 			{
320 318
 				ini_set('session.use_cookies','1');
321 319
 				ini_set('session.use_only_cookies','1');
@@ -368,8 +366,7 @@  discard block
 block discarded – undo
368 366
 			{
369 367
 				ini_set('session.gc_probability',$value);
370 368
 				ini_set('session.gc_divisor','100');
371
-			}
372
-			else
369
+			} else
373 370
 				throw new TInvalidDataValueException('httpsession_gcprobability_invalid',$value);
374 371
 		}
375 372
 	}
@@ -557,8 +554,7 @@  discard block
 block discarded – undo
557 554
 			$value=$_SESSION[$key];
558 555
 			unset($_SESSION[$key]);
559 556
 			return $value;
560
-		}
561
-		else
557
+		} else
562 558
 			return null;
563 559
 	}
564 560
 
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 		if(!$this->_started)
140 140
 		{
141 141
 			if($this->_customStorage)
142
-				session_set_save_handler(array($this,'_open'),array($this,'_close'),array($this,'_read'),array($this,'_write'),array($this,'_destroy'),array($this,'_gc'));
142
+				session_set_save_handler(array($this, '_open'), array($this, '_close'), array($this, '_read'), array($this, '_write'), array($this, '_destroy'), array($this, '_gc'));
143 143
 			if($this->_cookie!==null)
144
-				session_set_cookie_params($this->_cookie->getExpire(),$this->_cookie->getPath(),$this->_cookie->getDomain(),$this->_cookie->getSecure(),$this->_cookie->getHttpOnly());
144
+				session_set_cookie_params($this->_cookie->getExpire(), $this->_cookie->getPath(), $this->_cookie->getDomain(), $this->_cookie->getSecure(), $this->_cookie->getHttpOnly());
145 145
 			if(ini_get('session.auto_start')!=='1')
146 146
 				session_start();
147 147
 			$this->_started=true;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function regenerate($deleteOld=false)
183 183
 	{
184
-		$old = $this->getSessionID();
184
+		$old=$this->getSessionID();
185 185
 		session_regenerate_id($deleteOld);
186 186
 		return $old;
187 187
 	}
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		else if(ctype_alnum($value))
234 234
 			session_name($value);
235 235
 		else
236
-			throw new TInvalidDataValueException('httpsession_sessionname_invalid',$value);
236
+			throw new TInvalidDataValueException('httpsession_sessionname_invalid', $value);
237 237
 	}
238 238
 
239 239
 	/**
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
 			throw new TInvalidOperationException('httpsession_savepath_unchangeable');
255 255
 		elseif(is_dir($value))
256 256
 			session_save_path(realpath($value));
257
-		elseif(null !== ($ns = Prado::getPathOfNamespace($value)) && is_dir($ns))
257
+		elseif(null!==($ns=Prado::getPathOfNamespace($value)) && is_dir($ns))
258 258
 			session_save_path(realpath($ns));
259 259
 		else
260
-			throw new TInvalidDataValueException('httpsession_savepath_invalid',$value);
260
+			throw new TInvalidDataValueException('httpsession_savepath_invalid', $value);
261 261
 	}
262 262
 
263 263
 	/**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	public function getCookie()
286 286
 	{
287 287
 		if($this->_cookie===null)
288
-			$this->_cookie=new THttpCookie($this->getSessionName(),$this->getSessionID());
288
+			$this->_cookie=new THttpCookie($this->getSessionName(), $this->getSessionID());
289 289
 		return $this->_cookie;
290 290
 	}
291 291
 
@@ -312,21 +312,21 @@  discard block
 block discarded – undo
312 312
 			throw new TInvalidOperationException('httpsession_cookiemode_unchangeable');
313 313
 		else
314 314
 		{
315
-			$value=TPropertyValue::ensureEnum($value,'Prado\\Web\\THttpSessionCookieMode');
315
+			$value=TPropertyValue::ensureEnum($value, 'Prado\\Web\\THttpSessionCookieMode');
316 316
 			if($value===THttpSessionCookieMode::None) 
317 317
       {
318
-				ini_set('session.use_cookies','0');
319
-			  ini_set('session.use_only_cookies','0');
318
+				ini_set('session.use_cookies', '0');
319
+			  ini_set('session.use_only_cookies', '0');
320 320
       }
321 321
 			else if($value===THttpSessionCookieMode::Allow)
322 322
 			{
323
-				ini_set('session.use_cookies','1');
324
-				ini_set('session.use_only_cookies','0');
323
+				ini_set('session.use_cookies', '1');
324
+				ini_set('session.use_only_cookies', '0');
325 325
 			}
326 326
 			else
327 327
 			{
328
-				ini_set('session.use_cookies','1');
329
-				ini_set('session.use_only_cookies','1');
328
+				ini_set('session.use_cookies', '1');
329
+				ini_set('session.use_only_cookies', '1');
330 330
 				ini_set('session.use_trans_sid', 0);
331 331
 			}
332 332
 		}
@@ -372,13 +372,13 @@  discard block
 block discarded – undo
372 372
 		else
373 373
 		{
374 374
 			$value=TPropertyValue::ensureInteger($value);
375
-			if($value>=0 && $value<=100)
375
+			if($value >= 0 && $value <= 100)
376 376
 			{
377
-				ini_set('session.gc_probability',$value);
378
-				ini_set('session.gc_divisor','100');
377
+				ini_set('session.gc_probability', $value);
378
+				ini_set('session.gc_divisor', '100');
379 379
 			}
380 380
 			else
381
-				throw new TInvalidDataValueException('httpsession_gcprobability_invalid',$value);
381
+				throw new TInvalidDataValueException('httpsession_gcprobability_invalid', $value);
382 382
 		}
383 383
 	}
384 384
 
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 		else
401 401
 		{
402 402
 			$value=TPropertyValue::ensureBoolean($value);
403
-			if ($value && $this->getCookieMode()==THttpSessionCookieMode::Only)
403
+			if($value && $this->getCookieMode()==THttpSessionCookieMode::Only)
404 404
 					throw new TInvalidOperationException('httpsession_transid_cookieonly');
405
-			ini_set('session.use_trans_sid',$value?'1':'0');
405
+			ini_set('session.use_trans_sid', $value ? '1' : '0');
406 406
 		}
407 407
 	}
408 408
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 		if($this->_started)
424 424
 			throw new TInvalidOperationException('httpsession_maxlifetime_unchangeable');
425 425
 		else
426
-			ini_set('session.gc_maxlifetime',$value);
426
+			ini_set('session.gc_maxlifetime', $value);
427 427
 	}
428 428
 
429 429
 	/**
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	 * @param string session name
434 434
 	 * @return boolean whether session is opened successfully
435 435
 	 */
436
-	public function _open($savePath,$sessionName)
436
+	public function _open($savePath, $sessionName)
437 437
 	{
438 438
 		return true;
439 439
 	}
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 	 * @param string session data
467 467
 	 * @return boolean whether session write is successful
468 468
 	 */
469
-	public function _write($id,$data)
469
+	public function _write($id, $data)
470 470
 	{
471 471
 		return true;
472 472
 	}
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 	 * @param mixed session variable name
549 549
 	 * @param mixed session variable value
550 550
 	 */
551
-	public function add($key,$value)
551
+	public function add($key, $value)
552 552
 	{
553 553
 		$_SESSION[$key]=$value;
554 554
 	}
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 	 * @param integer the offset to set element
622 622
 	 * @param mixed the element value
623 623
 	 */
624
-	public function offsetSet($offset,$item)
624
+	public function offsetSet($offset, $item)
625 625
 	{
626 626
 		$_SESSION[$offset]=$item;
627 627
 	}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -314,10 +314,10 @@
 block discarded – undo
314 314
 		{
315 315
 			$value=TPropertyValue::ensureEnum($value,'Prado\\Web\\THttpSessionCookieMode');
316 316
 			if($value===THttpSessionCookieMode::None) 
317
-      {
317
+	  {
318 318
 				ini_set('session.use_cookies','0');
319 319
 			  ini_set('session.use_only_cookies','0');
320
-      }
320
+	  }
321 321
 			else if($value===THttpSessionCookieMode::Allow)
322 322
 			{
323 323
 				ini_set('session.use_cookies','1');
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveControlAdapter.php 4 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -175,6 +175,7 @@
 block discarded – undo
175 175
 
176 176
 	/**
177 177
 	 * @param string state tracker class.
178
+	 * @param string $value
178 179
 	 */
179 180
 	public function setStateTracker($value)
180 181
 	{
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@
 block discarded – undo
78 78
 	}
79 79
 
80 80
  	/**
81
-	 * Publish the ajax script
82
-	 */
81
+ 	 * Publish the ajax script
82
+ 	 */
83 83
 	public function onPreRender($param)
84 84
 	{
85 85
 		parent::onPreRender($param);
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
 		if($type===null)
74 74
 		{
75 75
 			if($this->getControl() instanceof ICallbackEventHandler)
76
-				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
76
+				$this->_activeControlType='Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
77 77
 			else
78
-				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
78
+				$this->_activeControlType='Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
79 79
 		}
80 80
 		else
81
-			$this->_activeControlType = $type;
81
+			$this->_activeControlType=$type;
82 82
 	}
83 83
 
84 84
  	/**
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	{
119 119
 		if($this->_baseActiveControl===null)
120 120
 		{
121
-			$type = $this->_activeControlType;
122
-			$this->_baseActiveControl = new $type($this->getControl());
121
+			$type=$this->_activeControlType;
122
+			$this->_baseActiveControl=new $type($this->getControl());
123 123
 		}
124 124
 		return $this->_baseActiveControl;
125 125
 	}
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 	{
132 132
 		if($this->getPage()->getIsCallback())
133 133
 		{
134
-			$target = $this->getPage()->getCallbackEventTarget();
134
+			$target=$this->getPage()->getCallbackEventTarget();
135 135
 			if($target instanceof ICallbackEventHandler)
136 136
 			{
137
-				$client = $target->getActiveControl()->getClientSide();
137
+				$client=$target->getActiveControl()->getClientSide();
138 138
 				return $client->getEnablePageStateUpdate();
139 139
 			}
140 140
 		}
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	{
149 149
 		if($this->getIsTrackingPageState())
150 150
 		{
151
-		  $stateTrackerClass = $this->_stateTrackerClass;
152
-			$this->_stateTracker = new $stateTrackerClass($this->getControl());
151
+		  $stateTrackerClass=$this->_stateTrackerClass;
152
+			$this->_stateTracker=new $stateTrackerClass($this->getControl());
153 153
 			$this->_stateTracker->trackChanges();
154 154
 		}
155 155
 		parent::onLoad($param);
@@ -182,6 +182,6 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function setStateTracker($value)
184 184
 	{
185
-		$this->_stateTrackerClass = TPropertyValue::ensureString($value);
185
+		$this->_stateTrackerClass=TPropertyValue::ensureString($value);
186 186
 	}
187 187
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,8 +76,7 @@
 block discarded – undo
76 76
 				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveCallbackControl';
77 77
 			else
78 78
 				$this->_activeControlType = 'Prado\\Web\UI\\ActiveControls\\TBaseActiveControl';
79
-		}
80
-		else
79
+		} else
81 80
 			$this->_activeControlType = $type;
82 81
 	}
83 82
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDropDownList.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	/**
67 67
 	 * No client class for this control.
68 68
 	 * This method overrides the parent implementation.
69
-	 * @return null no javascript class name.
69
+	 * @return string no javascript class name.
70 70
 	 */
71 71
 	protected function getClientClassName()
72 72
 	{
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	protected function createListItemCollection()
84 84
 	{
85
-		$collection  = new TActiveListItemCollection;
85
+		$collection=new TActiveListItemCollection;
86 86
 		$collection->setControl($this);
87 87
 		return $collection;
88 88
 	}
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 	protected function addAttributesToRender($writer)
103 103
 	{
104 104
 		parent::addAttributesToRender($writer);
105
-		$writer->addAttribute('id',$this->getClientID());
106
-		if ($this->getAutoPostBack())
105
+		$writer->addAttribute('id', $this->getClientID());
106
+		if($this->getAutoPostBack())
107 107
 			$this->getActiveControl()->registerCallbackClientScript(
108 108
 				$this->getClientClassName(), $this->getPostBackOptions());
109 109
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveListBox.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 	/**
71 71
 	 * Javascript client class for this control.
72 72
 	 * This method overrides the parent implementation.
73
-	 * @return null no javascript class name.
73
+	 * @return string no javascript class name.
74 74
 	 */
75 75
 	protected function getClientClassName()
76 76
 	{
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	protected function createListItemCollection()
64 64
 	{
65
-		$collection  = new TActiveListItemCollection;
65
+		$collection=new TActiveListItemCollection;
66 66
 		$collection->setControl($this);
67 67
 		return $collection;
68 68
 	}
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function setSelectionMode($value)
87 87
 	{
88
-		if(parent::getSelectionMode() === $value)
88
+		if(parent::getSelectionMode()===$value)
89 89
 			return;
90 90
 
91 91
 		parent::setSelectionMode($value);
92
-		$multiple = $this->getIsMultiSelect();
93
-		$id = $this->getUniqueID(); $multi_id = $id.'[]';
92
+		$multiple=$this->getIsMultiSelect();
93
+		$id=$this->getUniqueID(); $multi_id=$id.'[]';
94 94
 		if($this->getActiveControl()->canUpdateClientSide())
95 95
 		{
96
-			$client = $this->getPage()->getCallbackClient();
96
+			$client=$this->getPage()->getCallbackClient();
97 97
 			$client->setAttribute($this, 'multiple', $multiple ? 'multiple' : false);
98 98
 			$client->setAttribute($this, 'name', $multiple ? $multi_id : $id);
99 99
 		}
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 	protected function addAttributesToRender($writer)
147 147
 	{
148 148
 		parent::addAttributesToRender($writer);
149
-		$writer->addAttribute('id',$this->getClientID());
150
-		if ($this->getAutoPostBack())
149
+		$writer->addAttribute('id', $this->getClientID());
150
+		if($this->getAutoPostBack())
151 151
 			$this->getActiveControl()->registerCallbackClientScript(
152 152
 				$this->getClientClassName(), $this->getPostBackOptions());
153 153
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveRatingList.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -99,6 +99,7 @@
 block discarded – undo
99 99
 	 * Calls the client-side static method for this control class.
100 100
 	 * @param string static method name
101 101
 	 * @param mixed method parmaeter
102
+	 * @param string $func
102 103
 	 */
103 104
 	protected function callClientFunction($func,$value)
104 105
 	{
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function setReadOnly($value)
82 82
 	{
83
-		if(parent::getReadOnly() === $value)
83
+		if(parent::getReadOnly()===$value)
84 84
 			return;
85 85
 
86 86
 		parent::setReadOnly($value);
87
-		$value = $this->getReadOnly();
88
-		$this->callClientFunction('setReadOnly',$value);
87
+		$value=$this->getReadOnly();
88
+		$this->callClientFunction('setReadOnly', $value);
89 89
 	}
90 90
 
91 91
 	/**
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
 	 */
94 94
 	public function setRating($value)
95 95
 	{
96
-		if(parent::getRating() === $value)
96
+		if(parent::getRating()===$value)
97 97
 			return;
98 98
 
99 99
 		parent::setRating($value);
100
-		$value = $this->getRating();
101
-		$this->callClientFunction('setRating',$value);
100
+		$value=$this->getRating();
101
+		$this->callClientFunction('setRating', $value);
102 102
 	}
103 103
 
104 104
 	/**
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 	 * @param string static method name
107 107
 	 * @param mixed method parmaeter
108 108
 	 */
109
-	protected function callClientFunction($func,$value)
109
+	protected function callClientFunction($func, $value)
110 110
 	{
111 111
 		if($this->getActiveControl()->canUpdateClientSide())
112 112
 		{
113
-			$client = $this->getPage()->getCallbackClient();
114
-			$code = 'Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')';
115
-			$client->evaluateScript($code,array($value));
113
+			$client=$this->getPage()->getCallbackClient();
114
+			$code='Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')';
115
+			$client->evaluateScript($code, array($value));
116 116
 		}
117 117
 	}
118 118
 
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function setCaption($value)
123 123
 	{
124
-		if(parent::getCaption() === $value)
124
+		if(parent::getCaption()===$value)
125 125
 			return;
126 126
 
127 127
 		parent::setCaption($value);
128 128
 		// if it's an active control, this should not be needed.
129
-		$this->callClientFunction('setCaption',$value);
129
+		$this->callClientFunction('setCaption', $value);
130 130
 	}
131 131
 
132 132
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TDraggable.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 *   o 'True' or 'Revert' : The draggable will revert to it's original position
54 54
 	 *   o 'False' or 'None' : The draggable won't revert to it's original position
55 55
 	 *   o 'Failure' : The draggable will only revert if it's dropped on a non droppable area
56
-	 * @return TDraggableRevertOption true to revert
56
+	 * @return string true to revert
57 57
 	 */
58 58
 	public function getRevert()
59 59
 	{
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 	/**
120 120
 	 * Determine if the element should be constrainted in one direction or not
121
-	 * @return CDraggableConstraint
121
+	 * @return string
122 122
 	 */
123 123
 	public function getConstraint()
124 124
 	{
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * Set the handle id or css class
42 42
 	 * @param string
43 43
 	 */
44
-	public function setHandle ($value)
44
+	public function setHandle($value)
45 45
 	{
46 46
 		$this->setViewState('DragHandle', TPropertyValue::ensureString($value), null);
47 47
 	}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * Get the handle id or css class
51 51
 	 * @return string
52 52
 	 */
53
-	public function getHandle ()
53
+	public function getHandle()
54 54
 	{
55 55
 		return $this->getViewState('DragHandle', null);
56 56
 	}
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function setRevert($value)
82 82
 	{
83
-		if (strcasecmp($value,'true')==0 || $value===true)
83
+		if(strcasecmp($value, 'true')==0 || $value===true)
84 84
 			$value=TDraggableRevertOptions::Revert;
85
-		elseif (strcasecmp($value,'false')==0 || $value===false)
85
+		elseif(strcasecmp($value, 'false')==0 || $value===false)
86 86
 			$value=TDraggableRevertOptions::None;
87 87
 		$this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableRevertOptions'), true);
88 88
 	}
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return TDraggableGhostingOption to clone the element
101 101
 	 */
102
-	public function getGhosting ()
102
+	public function getGhosting()
103 103
 	{
104 104
 		return $this->getViewState('Ghosting', TDraggableGhostingOptions::None);
105 105
 	}
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	 *  o "False" or "None" means no Ghosting options
117 117
 	 *
118 118
 	 */
119
-	public function setGhosting ($value)
119
+	public function setGhosting($value)
120 120
 	{
121
-		if (strcasecmp($value,'true')==0 || $value===true)
121
+		if(strcasecmp($value, 'true')==0 || $value===true)
122 122
 			$value=TDraggableGhostingOptions::Ghosting;
123
-		elseif (strcasecmp($value,'false')==0 || $value===false)
123
+		elseif(strcasecmp($value, 'false')==0 || $value===false)
124 124
 			$value=TDraggableGhostingOptions::None;
125 125
 		$this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\ActiveControls\\TDraggableGhostingOptions'), TDraggableGhostingOptions::None);
126 126
 	}
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 		parent::addAttributesToRender($writer);
164 164
 
165 165
 		$cs=$this->getPage()->getClientScript();
166
-		if ($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting)
166
+		if($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting)
167 167
 			$cs->registerPradoScript('dragdropextra');
168 168
 		else
169 169
 			$cs->registerPradoScript('dragdrop');
170
-		$writer->addAttribute('id',$this->getClientID());
170
+		$writer->addAttribute('id', $this->getClientID());
171 171
 		$options=TJavaScript::encode($this->getPostBackOptions());
172 172
 		$class=$this->getClientClassName();
173 173
 		$code="new {$class}('{$this->getClientId()}', {$options}) ";
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	 * This method overrides the parent implementation.
180 180
 	 * @return string the javascript class name
181 181
 	 */
182
-	protected function getClientClassName ()
182
+	protected function getClientClassName()
183 183
 	{
184 184
 		return 'Draggable';
185 185
 	}
@@ -190,17 +190,17 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	protected function getPostBackOptions()
192 192
 	{
193
-		$options['ID'] = $this->getClientID();
193
+		$options['ID']=$this->getClientID();
194 194
 
195
-		if (($handle=$this->getHandle())!== null) $options['handle']=$handle;
196
-		if (($revert=$this->getRevert())===TDraggableRevertOptions::None)
195
+		if(($handle=$this->getHandle())!==null) $options['handle']=$handle;
196
+		if(($revert=$this->getRevert())===TDraggableRevertOptions::None)
197 197
 			$options['revert']=false;
198
-		elseif ($revert==TDraggableRevertOptions::Revert)
198
+		elseif($revert==TDraggableRevertOptions::Revert)
199 199
 			$options['revert']=true;
200 200
 		else
201 201
 			$options['revert']=strtolower($revert);
202
-		if (($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint);
203
-		switch ($this->getGhosting())
202
+		if(($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint);
203
+		switch($this->getGhosting())
204 204
 		{
205 205
 			case TDraggableGhostingOptions::SuperGhosting:
206 206
 				$options['superghosting']=true;
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TInPlaceTextBox.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -92,6 +92,8 @@  discard block
 block discarded – undo
92 92
 	 * Calls the client-side static method for this control class.
93 93
 	 * @param string static method name
94 94
 	 * @param mixed method parmaeter
95
+	 * @param string $func
96
+	 * @param boolean $value
95 97
 	 */
96 98
 	protected function callClientFunction($func,$value)
97 99
 	{
@@ -239,6 +241,7 @@  discard block
 block discarded – undo
239 241
 	 * Raised when editing the content is requsted to be loaded from the
240 242
 	 * server side.
241 243
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
244
+	 * @param TCallbackEventParameter $param
242 245
 	 */
243 246
 	public function onLoadingText($param)
244 247
 	{
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function setDisplayTextBox($value)
76 76
 	{
77
-		$value = TPropertyValue::ensureBoolean($value);
78
-		$this->setViewState('DisplayTextBox', $value,false);
77
+		$value=TPropertyValue::ensureBoolean($value);
78
+		$this->setViewState('DisplayTextBox', $value, false);
79 79
 		if($this->getActiveControl()->canUpdateClientSide())
80
-			$this->callClientFunction('setDisplayTextBox',$value);
80
+			$this->callClientFunction('setDisplayTextBox', $value);
81 81
 	}
82 82
 
83 83
 	/**
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 	 * @param string static method name
94 94
 	 * @param mixed method parmaeter
95 95
 	 */
96
-	protected function callClientFunction($func,$value)
96
+	protected function callClientFunction($func, $value)
97 97
 	{
98
-		$client = $this->getPage()->getCallbackClient();
99
-		$code = $this->getClientClassName().'.'.$func;
100
-		$client->callClientFunction($code,array($this,$value));
98
+		$client=$this->getPage()->getCallbackClient();
99
+		$code=$this->getClientClassName().'.'.$func;
100
+		$client->callClientFunction($code, array($this, $value));
101 101
 	}
102 102
 
103 103
 	/**
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	protected function getExternalControlID()
123 123
 	{
124
-		$extID = $this->getEditTriggerControlID();
124
+		$extID=$this->getEditTriggerControlID();
125 125
 		if($extID===null) return '';
126
-		if(($control = $this->findControl($extID))!==null)
126
+		if(($control=$this->findControl($extID))!==null)
127 127
 			return $control->getClientID();
128 128
 		return $extID;
129 129
 	}
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function setText($value)
137 137
 	{
138
-		if(TTextBox::getText() === $value)
138
+		if(TTextBox::getText()===$value)
139 139
 			return;
140 140
 
141 141
 		TTextBox::setText($value);
142 142
 		if($this->getActiveControl()->canUpdateClientSide())
143 143
 		{
144
-			$client = $this->getPage()->getCallbackClient();
144
+			$client=$this->getPage()->getCallbackClient();
145 145
 			$client->update($this->getLabelClientID(), $value);
146 146
 			$client->setValue($this, $value);
147 147
 		}
@@ -152,14 +152,14 @@  discard block
 block discarded – undo
152 152
 	 * @param boolean value
153 153
 	 * @since 3.1.2
154 154
 	 */
155
-	public function setReadOnly ($value)
155
+	public function setReadOnly($value)
156 156
 	{
157 157
 		$value=TPropertyValue::ensureBoolean($value);
158
-		if(TTextBox::getReadOnly() === $value)
158
+		if(TTextBox::getReadOnly()===$value)
159 159
 			return;
160 160
 
161 161
 		TTextBox::setReadOnly($value);
162
-		if ($this->getActiveControl()->canUpdateClientSide())
162
+		if($this->getActiveControl()->canUpdateClientSide())
163 163
 		{
164 164
 			$this->callClientFunction('setReadOnly', $value);
165 165
 		}
@@ -202,10 +202,10 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function onCallback($param)
204 204
 	{
205
-		$action = $param->getCallbackParameter();
206
-		if(is_array($action) && $action[0] === '__InlineEditor_loadExternalText__')
205
+		$action=$param->getCallbackParameter();
206
+		if(is_array($action) && $action[0]==='__InlineEditor_loadExternalText__')
207 207
 		{
208
-			$parameter = new TCallbackEventParameter($this->getResponse(), $action[1]);
208
+			$parameter=new TCallbackEventParameter($this->getResponse(), $action[1]);
209 209
 			$this->onLoadingText($parameter);
210 210
 		}
211 211
 		$this->raiseEvent('OnCallback', $this, $param);
@@ -216,26 +216,26 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	protected function getPostBackOptions()
218 218
 	{
219
-		$options = parent::getPostBackOptions();
220
-		$options['ID'] = $this->getLabelClientID();
221
-		$options['TextBoxID'] = $this->getClientID();
222
-		$options['ExternalControl'] = $this->getExternalControlID();
223
-		$options['AutoHide'] = $this->getAutoHideTextBox() == false ? '' : true;
224
-		$options['AutoPostBack'] = $this->getAutoPostBack() == false ? '' : true;
225
-		$options['Columns'] = $this->getColumns();
219
+		$options=parent::getPostBackOptions();
220
+		$options['ID']=$this->getLabelClientID();
221
+		$options['TextBoxID']=$this->getClientID();
222
+		$options['ExternalControl']=$this->getExternalControlID();
223
+		$options['AutoHide']=$this->getAutoHideTextBox()==false ? '' : true;
224
+		$options['AutoPostBack']=$this->getAutoPostBack()==false ? '' : true;
225
+		$options['Columns']=$this->getColumns();
226 226
 		if($this->getTextMode()==='MultiLine')
227 227
 		{
228
-			$options['Rows'] = $this->getRows();
229
-			$options['Wrap'] = $this->getWrap()== false ? '' : true;
228
+			$options['Rows']=$this->getRows();
229
+			$options['Wrap']=$this->getWrap()==false ? '' : true;
230 230
 		}
231 231
 		else
232 232
 		{
233
-			$length = $this->getMaxLength();
234
-			$options['MaxLength'] = $length > 0 ? $length : '';
233
+			$length=$this->getMaxLength();
234
+			$options['MaxLength']=$length > 0 ? $length : '';
235 235
 		}
236 236
 
237 237
 		if($this->hasEventHandler('OnLoadingText'))
238
-			$options['LoadTextOnEdit'] = true;
238
+			$options['LoadTextOnEdit']=true;
239 239
 
240 240
 		$options['ReadOnly']=$this->getReadOnly();
241 241
 		return $options;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function onLoadingText($param)
250 250
 	{
251
-		$this->raiseEvent('OnLoadingText',$this,$param);
251
+		$this->raiseEvent('OnLoadingText', $this, $param);
252 252
 	}
253 253
 
254 254
 	/**
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	{
268 268
 		//calls the TWebControl to avoid rendering other attribute normally render for a textbox.
269 269
 		TWebControl::addAttributesToRender($writer);
270
-		$writer->addAttribute('id',$this->getLabelClientID());
270
+		$writer->addAttribute('id', $this->getLabelClientID());
271 271
 		$this->getActiveControl()->registerCallbackClientScript(
272 272
 			$this->getClientClassName(), $this->getPostBackOptions());
273 273
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,8 +233,7 @@
 block discarded – undo
233 233
 		{
234 234
 			$options['Rows'] = $this->getRows();
235 235
 			$options['Wrap'] = $this->getWrap()== false ? '' : true;
236
-		}
237
-		else
236
+		} else
238 237
 		{
239 238
 			$length = $this->getMaxLength();
240 239
 			$options['MaxLength'] = $length > 0 ? $length : '';
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TTriggeredCallback.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	/**
59
-	 * @return array list of trigger callback options.
59
+	 * @return string list of trigger callback options.
60 60
 	 */
61 61
 	protected function getTriggerOptions()
62 62
 	{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	protected function getTargetControl()
46 46
 	{
47
-		$id = $this->getControlID();
47
+		$id=$this->getControlID();
48 48
 		if(($control=$this->findControl($id)) instanceof TControl)
49 49
 			return $control->getClientID();
50 50
 		if($id==='')
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	protected function getTriggerOptions()
62 62
 	{
63
-		$options['ID'] = $this->getClientID();
64
-		$options['EventTarget'] = $this->getUniqueID();
65
-		$options['ControlID'] = $this->getTargetControl();
63
+		$options['ID']=$this->getClientID();
64
+		$options['EventTarget']=$this->getUniqueID();
65
+		$options['ControlID']=$this->getTargetControl();
66 66
 		return $options;
67 67
 	}
68 68
 }
Please login to merge, or discard this patch.