Passed
Push — master ( bfa15f...7e7224 )
by Fabio
06:58
created
framework/TApplication.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@
 block discarded – undo
377 377
 					break;
378 378
 				}
379 379
 				$method = self::$_steps[$this->_step];
380
-				Prado::trace("Executing $method()", 'Prado\TApplication');
380
+				Prado::trace("executing $method()", 'Prado\TApplication');
381 381
 				$this->$method();
382 382
 				$this->_step++;
383 383
 			}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1235,7 +1235,7 @@
 block discarded – undo
1235 1235
 	public function onEndRequest()
1236 1236
 	{
1237 1237
 		$this->flushOutput(false); // flush all remaining content in the buffer
1238
-		$this->saveGlobals();  // save global state
1238
+		$this->saveGlobals(); // save global state
1239 1239
 		$this->raiseEvent('OnEndRequest', $this, null);
1240 1240
 	}
1241 1241
 }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 	 *
412 412
 	 * A global value is one that is persistent across users sessions and requests.
413 413
 	 * @param string $key the name of the value to be returned
414
-	 * @param mixed $defaultValue the default value. If $key is not found, $defaultValue will be returned
414
+	 * @param integer $defaultValue the default value. If $key is not found, $defaultValue will be returned
415 415
 	 * @return mixed the global value corresponding to $key
416 416
 	 */
417 417
 	public function getGlobalState($key, $defaultValue = null)
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
 	}
670 670
 
671 671
 	/**
672
-	 * @param mixed $id
672
+	 * @param string $id
673 673
 	 * @return IModule the module with the specified ID, null if not found
674 674
 	 */
675 675
 	public function getModule($id)
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 	}
742 742
 
743 743
 	/**
744
-	 * @param THttpRequest $response the request module
744
+	 * @param THttpResponse $response the request module
745 745
 	 */
746 746
 	public function setResponse(THttpResponse $response)
747 747
 	{
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 	 * Raises OnError event.
1097 1097
 	 * This method is invoked when an exception is raised during the lifecycles
1098 1098
 	 * of the application.
1099
-	 * @param mixed $param event parameter
1099
+	 * @param \Exception $param event parameter
1100 1100
 	 */
1101 1101
 	public function onError($param)
1102 1102
 	{
Please login to merge, or discard this patch.
framework/Data/SqlMap/Statements/TMappedStatement.php 2 patches
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -236,8 +236,7 @@  discard block
 block discarded – undo
236 236
 	public function runQueryForList($connection, $parameter, $sql, $result, $delegate = null)
237 237
 	{
238 238
 		$registry = $this->getManager()->getTypeHandlers();
239
-		$list = $result instanceof \ArrayAccess ? $result :
240
-							$this->_statement->createInstanceOfListClass($registry);
239
+		$list = $result instanceof \ArrayAccess ? $result : $this->_statement->createInstanceOfListClass($registry);
241 240
 		$connection->setActive(true);
242 241
 		$reader = $sql->query();
243 242
 		//$reader = $this->executeSQLQueryLimit($connection, $sql, $max, $skip);
@@ -313,8 +312,7 @@  discard block
 block discarded – undo
313 312
 			foreach ($reader as $row) {
314 313
 				$obj = $this->applyResultMap($row);
315 314
 				$key = TPropertyAccess::get($obj, $keyProperty);
316
-				$value = ($valueProperty === null) ? $obj :
317
-							TPropertyAccess::get($obj, $valueProperty);
315
+				$value = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty);
318 316
 				$param = new TResultSetMapItemParameter($key, $value, $parameter, $map);
319 317
 				$this->raiseRowDelegate($delegate, $param);
320 318
 			}
@@ -323,8 +321,7 @@  discard block
 block discarded – undo
323 321
 			foreach ($reader as $row) {
324 322
 				$obj = $this->applyResultMap($row);
325 323
 				$key = TPropertyAccess::get($obj, $keyProperty);
326
-				$map[$key] = ($valueProperty === null) ? $obj :
327
-								TPropertyAccess::get($obj, $valueProperty);
324
+				$map[$key] = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty);
328 325
 			}
329 326
 		}
330 327
 		$this->onExecuteQuery($command);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	 * Execute the select key statement, used to obtain last insert ID.
469 469
 	 * @param IDbConnection $connection database connection
470 470
 	 * @param mixed $parameter insert statement parameter
471
-	 * @param TSqlMapSelectKey $selectKey select key statement
471
+	 * @param \Prado\Data\SqlMap\Configuration\TSqlMapSelectKey $selectKey select key statement
472 472
 	 * @return string last insert ID.
473 473
 	 */
474 474
 	protected function executeSelectKey($connection, $parameter, $selectKey)
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 	/**
596 596
 	 * Apply the result to a TList or an array.
597 597
 	 * @param array $row a result set row retrieved from the database
598
-	 * @param object $resultObject result object, array or list
598
+	 * @param \ArrayAccess $resultObject result object, array or list
599 599
 	 * @return object result filled with data.
600 600
 	 */
601 601
 	protected function fillResultArrayList($row, $resultObject)
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 	 * Fills the result object according to result mappings.
641 641
 	 * @param string $resultMapName result map name.
642 642
 	 * @param array $row a result set row retrieved from the database
643
-	 * @param null|mixed $parentGroup
643
+	 * @param null|string $parentGroup
644 644
 	 * @param null|&object $resultObject result object to fill, will create new instances if required.
645 645
 	 * @return object result object filled with data.
646 646
 	 */
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TFileUpload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@
 block discarded – undo
295 295
 	 */
296 296
 	public function getValidationPropertyValue()
297 297
 	{
298
-		return implode(',', array_map(function ($file) {
298
+		return implode(',', array_map(function($file) {
299 299
 			return $file->getFileName();
300 300
 		}, $this->_files));
301 301
 	}
Please login to merge, or discard this patch.
framework/Collections/TList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
 	 */
227 227
 	public function clear()
228 228
 	{
229
-		for ($i = $this->_c - 1;$i >= 0;--$i) {
229
+		for ($i = $this->_c - 1; $i >= 0; --$i) {
230 230
 			$this->removeAt($i);
231 231
 		}
232 232
 	}
Please login to merge, or discard this patch.
framework/I18N/core/Gettext/TGettext.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 	public static function poFile2moFile($pofile, $mofile)
128 128
 	{
129 129
 		if (!is_file($pofile)) {
130
-			throw new Exception("File $pofile doesn't exist.");
130
+			throw new Exception("file $pofile doesn't exist.");
131 131
 		}
132 132
 
133 133
 		include_once __DIR__ . '/PO.php';
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * @access  public
123 123
 	 * @param   string  $pofile path to GNU PO file
124 124
 	 * @param   string  $mofile path to GNU MO file
125
-	 * @return  mixed   Returns true on success or PEAR_Error on failure.
125
+	 * @return  boolean   Returns true on success or PEAR_Error on failure.
126 126
 	 */
127 127
 	public static function poFile2moFile($pofile, $mofile)
128 128
 	{
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * toMO
263 263
 	 *
264 264
 	 * @access  protected
265
-	 * @return  object  File_Gettext_MO
265
+	 * @return  TGettext_MO  File_Gettext_MO
266 266
 	 */
267 267
 	public function toMO()
268 268
 	{
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	 * toPO
277 277
 	 *
278 278
 	 * @access  protected
279
-	 * @return  object      File_Gettext_PO
279
+	 * @return  TGettext_PO      File_Gettext_PO
280 280
 	 */
281 281
 	public function toPO()
282 282
 	{
Please login to merge, or discard this patch.
framework/Collections/TPriorityList.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -481,7 +481,7 @@
 block discarded – undo
481 481
 		}
482 482
 
483 483
 		foreach ($this->_d as $priority => $items) {
484
-			for ($index = count($items) - 1;$index >= 0;$index--) {
484
+			for ($index = count($items) - 1; $index >= 0; $index--) {
485 485
 				$this->removeAtIndexInPriority($index, $priority);
486 486
 			}
487 487
 			unset($this->_d[$priority]);
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * Initializes the list with an array or an iterable object.
85 85
 	 * @param null|array|Iterator $data the intial data. Default is null, meaning no initial data.
86 86
 	 * @param bool $readOnly whether the list is read-only
87
-	 * @param numeric $defaultPriority the default priority of items without specified priorities.
87
+	 * @param integer $defaultPriority the default priority of items without specified priorities.
88 88
 	 * @param int $precision the precision of the numeric priorities
89 89
 	 * @throws TInvalidDataTypeException If data is not null and is neither an array nor an iterator.
90 90
 	 */
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 	/**
148 148
 	 * This must be called internally or when instantiated.
149
-	 * @param numeric $value sets the default priority of inserted items without a specified priority
149
+	 * @param integer $value sets the default priority of inserted items without a specified priority
150 150
 	 */
151 151
 	protected function setDefaultPriority($value)
152 152
 	{
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	/**
174 174
 	 * Returns an iterator for traversing the items in the list.
175 175
 	 * This method is required by the interface \IteratorAggregate.
176
-	 * @return Iterator an iterator for traversing the items in the list.
176
+	 * @return \ArrayIterator an iterator for traversing the items in the list.
177 177
 	 */
178 178
 	public function getIterator()
179 179
 	{
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	/**
387 387
 	 * Removes an item from the priority list.
388 388
 	 * The list will search for the item.  The first matching item found will be removed from the list.
389
-	 * @param mixed $item item the item to be removed.
389
+	 * @param callable $item item the item to be removed.
390 390
 	 * @param null|bool|float $priority priority of item to remove. without this parameter it defaults to false.
391 391
 	 * A value of false means any priority. null will be filled in with the default priority.
392 392
 	 * @throws TInvalidDataValueException If the item does not exist
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 
631 631
 	/**
632 632
 	 * Combines the map elements which have a priority below the parameter value
633
-	 * @param numeric $priority the cut-off priority.  All items of priority less than this are returned.
633
+	 * @param integer $priority the cut-off priority.  All items of priority less than this are returned.
634 634
 	 * @param bool $inclusive whether or not the input cut-off priority is inclusive.  Default: false, not inclusive.
635 635
 	 * @return array the array of priorities keys with values of arrays of items that are below a specified priority.
636 636
 	 *  The priorities are sorted so important priorities, lower numerics, are first.
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
 
651 651
 	/**
652 652
 	 * Combines the map elements which have a priority above the parameter value
653
-	 * @param numeric $priority the cut-off priority.  All items of priority greater than this are returned.
653
+	 * @param integer $priority the cut-off priority.  All items of priority greater than this are returned.
654 654
 	 * @param bool $inclusive whether or not the input cut-off priority is inclusive.  Default: true, inclusive.
655 655
 	 * @return array the array of priorities keys with values of arrays of items that are above a specified priority.
656 656
 	 *  The priorities are sorted so important priorities, lower numerics, are first.
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/assets/captcha.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	$hexLength = strlen($hex);
63 63
 	$base = strlen($alphabet);
64 64
 	$result = '';
65
-	for ($i = 0;$i < $hexLength;$i += 6) {
65
+	for ($i = 0; $i < $hexLength; $i += 6) {
66 66
 		$number = hexdec(substr($hex, $i, 6));
67 67
 		while ($number) {
68 68
 			$result .= $alphabet[$number % $base];
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	$hasShadow = ($theme & THEME_SHADOWED_TEXT);
109
-	for ($i = 0;$i < $length;$i++) {
109
+	for ($i = 0; $i < $length; $i++) {
110 110
 		$color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220));
111 111
 		$size = rand($fontWidth - 10, $fontWidth);
112 112
 		$angle = rand(-30, 30);
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 
160 160
 function addNoise($image, $width, $height)
161 161
 {
162
-	for ($x = 0;$x < $width;++$x) {
163
-		for ($y = 0;$y < $height;++$y) {
162
+	for ($x = 0; $x < $width; ++$x) {
163
+		for ($y = 0; $y < $height; ++$y) {
164 164
 			if (rand(0, 100) < 25) {
165 165
 				$color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220));
166 166
 				imagesetpixel($image, $x, $y, $color);
@@ -172,13 +172,13 @@  discard block
 block discarded – undo
172 172
 
173 173
 function addGrid($image, $width, $height)
174 174
 {
175
-	for ($i = 0;$i < $width;$i += rand(15, 25)) {
175
+	for ($i = 0; $i < $width; $i += rand(15, 25)) {
176 176
 		imagesetthickness($image, rand(2, 6));
177 177
 		$color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
178 178
 		imageline($image, $i + rand(-10, 20), 0, $i + rand(-10, 20), $height, $color);
179 179
 		imagecolordeallocate($image, $color);
180 180
 	}
181
-	for ($i = 0;$i < $height;$i += rand(15, 25)) {
181
+	for ($i = 0; $i < $height; $i += rand(15, 25)) {
182 182
 		imagesetthickness($image, rand(2, 6));
183 183
 		$color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
184 184
 		imageline($image, 0, $i + rand(-10, 20), $width, $i + rand(-10, 20), $color);
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
 
189 189
 function addScribble($image, $width, $height)
190 190
 {
191
-	for ($i = 0;$i < 8;$i++) {
191
+	for ($i = 0; $i < 8; $i++) {
192 192
 		$color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180));
193 193
 		$points = [];
194
-		for ($j = 1;$j < rand(5, 10);$j++) {
194
+		for ($j = 1; $j < rand(5, 10); $j++) {
195 195
 			$points[] = rand(2 * (20 * ($i + 1)), 2 * (50 * ($i + 1)));
196 196
 			$points[] = rand(30, $height + 30);
197 197
 		}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 {
206 206
 	$tempImage = imagecreatetruecolor($width, $height);
207 207
 	$chunk = rand(1, 5);
208
-	for ($x = $y = 0;$x < $width;$x += $chunk) {
208
+	for ($x = $y = 0; $x < $width; $x += $chunk) {
209 209
 		$chunk = rand(1, 5);
210 210
 		$y += rand(-1, 1);
211 211
 		if ($y >= $height) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 		}
217 217
 		imagecopy($tempImage, $image, $x, 0, $x, $y, $chunk, $height);
218 218
 	}
219
-	for ($x = $y = 0;$y < $height;$y += $chunk) {
219
+	for ($x = $y = 0; $y < $height; $y += $chunk) {
220 220
 		$chunk = rand(1, 5);
221 221
 		$x += rand(-1, 1);
222 222
 		if ($x >= $width) {
Please login to merge, or discard this patch.
framework/Web/UI/TClientScriptManager.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -542,7 +542,7 @@
 block discarded – undo
542 542
 	public function getStyleSheetUrls()
543 543
 	{
544 544
 		$stylesheets = array_values(
545
-			array_map(function ($e) {
545
+			array_map(function($e) {
546 546
 				return is_array($e) ? $e[0] : $e;
547 547
 			}, $this->_styleSheetFiles)
548 548
 		);
Please login to merge, or discard this patch.
Doc Comments   +20 added lines, -5 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	}
222 222
 
223 223
 	/**
224
-	 * @param mixed $script
224
+	 * @param string $script
225 225
 	 * @return string Prado javascript library base asset url.
226 226
 	 */
227 227
 	public function getPradoScriptAssetUrl($script = 'prado')
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	}
237 237
 
238 238
 	/**
239
-	 * @param mixed $script
239
+	 * @param string $script
240 240
 	 * @return string Prado javascript library base asset path in local filesystem.
241 241
 	 */
242 242
 	public function getPradoScriptAssetPath($script = 'prado')
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
 	/**
267 267
 	 * @param string $base javascript or css package path.
268
-	 * @return array tuple($path,$url).
268
+	 * @return string[] tuple($path,$url).
269 269
 	 */
270 270
 	protected function getPackagePathUrl($base)
271 271
 	{
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 
447 447
 	/**
448 448
 	 * Registers a Prado style library to be loaded.
449
-	 * @param mixed $name
449
+	 * @param string $name
450 450
 	 */
451 451
 	protected function registerPradoStyleInternal($name)
452 452
 	{
@@ -784,11 +784,17 @@  discard block
 block discarded – undo
784 784
 		$writer->write(TJavaScript::renderScriptBlocks($this->_headScripts));
785 785
 	}
786 786
 
787
+	/**
788
+	 * @param THtmlWriter $writer
789
+	 */
787 790
 	public function renderScriptFilesBegin($writer)
788 791
 	{
789 792
 		$this->renderAllPendingScriptFiles($writer);
790 793
 	}
791 794
 
795
+	/**
796
+	 * @param THtmlWriter $writer
797
+	 */
792 798
 	public function renderScriptFilesEnd($writer)
793 799
 	{
794 800
 		$this->renderAllPendingScriptFiles($writer);
@@ -801,6 +807,9 @@  discard block
 block discarded – undo
801 807
 		$this->_page->registerCachingAction('Page.ClientScript', 'markScriptFileAsRendered', $params);
802 808
 	}
803 809
 
810
+	/**
811
+	 * @param THtmlWriter $writer
812
+	 */
804 813
 	protected function renderScriptFiles($writer, array $scripts)
805 814
 	{
806 815
 		foreach ($scripts as $script) {
@@ -857,11 +866,17 @@  discard block
 block discarded – undo
857 866
 		$writer->write(TJavaScript::renderScriptBlocksCallback($this->_endScripts));
858 867
 	}
859 868
 
869
+	/**
870
+	 * @param THtmlWriter $writer
871
+	 */
860 872
 	public function renderHiddenFieldsBegin($writer)
861 873
 	{
862 874
 		$this->renderHiddenFieldsInt($writer, true);
863 875
 	}
864 876
 
877
+	/**
878
+	 * @param THtmlWriter $writer
879
+	 */
865 880
 	public function renderHiddenFieldsEnd($writer)
866 881
 	{
867 882
 		$this->renderHiddenFieldsInt($writer, false);
@@ -886,7 +901,7 @@  discard block
 block discarded – undo
886 901
 	 * Unfortunately this attribute is invalid for hidden fields, so text fields are
887 902
 	 * rendered instead (#642).
888 903
 	 * @param THtmlWriter $writer writer for the rendering purpose
889
-	 * @param mixed $initial
904
+	 * @param boolean $initial
890 905
 	 */
891 906
 
892 907
 	protected function renderHiddenFieldsInt($writer, $initial)
Please login to merge, or discard this patch.
framework/Collections/TAttributeCollection.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	/**
104 104
 	 * Returns the item with the specified key.
105 105
 	 * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false.
106
-	 * @param mixed $key the key
106
+	 * @param string $key the key
107 107
 	 * @return mixed the element at the offset, null if no element is found at the offset
108 108
 	 */
109 109
 	public function itemAt($key)
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	/**
116 116
 	 * Adds an item into the map.
117 117
 	 * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false.
118
-	 * @param mixed $key
118
+	 * @param string $key
119 119
 	 * @param mixed $value
120 120
 	 */
121 121
 	public function add($key, $value)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	/**
127 127
 	 * Removes an item from the map by its key.
128 128
 	 * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false.
129
-	 * @param mixed $key the key of the item to be removed
129
+	 * @param string $key the key of the item to be removed
130 130
 	 * @return mixed the removed value, null if no such key exists.
131 131
 	 */
132 132
 	public function remove($key)
Please login to merge, or discard this patch.