Completed
Pull Request — master (#2)
by Stephen
13:19
created
tests/phpunit/includes/object-cache.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
  * @link http://www.php.net/manual/en/memcached.replace.php
593 593
  *
594 594
  * @param string    $key        The key under which to store the value.
595
- * @param mixed     $value      The value to store.
595
+ * @param string     $value      The value to store.
596 596
  * @param string    $group      The group value appended to the $key.
597 597
  * @param int       $expiration The expiration time, defaults to 0.
598 598
  * @return bool                 Returns TRUE on success or FALSE on failure.
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
 	 *
1170 1170
 	 * @param   string      $key        The key under which to store the value.
1171 1171
 	 * @param   string      $group      The group value appended to the $key.
1172
-	 * @param   int         $time       The amount of time the server will wait to delete the item in seconds.
1172
+	 * @param   boolean         $time       The amount of time the server will wait to delete the item in seconds.
1173 1173
 	 * @param   string      $server_key The key identifying the server to store the value on.
1174 1174
 	 * @param   bool        $byKey      True to store in internal cache by key; false to not store by key
1175 1175
 	 * @return  bool                    Returns TRUE on success or FALSE on failure.
@@ -1272,7 +1272,7 @@  discard block
 block discarded – undo
1272 1272
 	 *
1273 1273
 	 * @param   string          $key        The key under which to store the value.
1274 1274
 	 * @param   string          $group      The group value appended to the $key.
1275
-	 * @param   bool            $force      Whether or not to force a cache invalidation.
1275
+	 * @param   false|string            $force      Whether or not to force a cache invalidation.
1276 1276
 	 * @param   null|bool       $found      Variable passed by reference to determine if the value was found or not.
1277 1277
 	 * @param   string          $server_key The key identifying the server to store the value on.
1278 1278
 	 * @param   bool            $byKey      True to store in internal cache by key; false to not store by key
Please login to merge, or discard this patch.
tests/phpunit/includes/testcase-xmlrpc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
 		parent::tearDown();
23 23
 	}
24 24
 
25
+	/**
26
+	 * @param string $role
27
+	 */
25 28
 	protected function make_user_by_role( $role ) {
26 29
 		return self::factory()->user->create( array(
27 30
 			'user_login' => $role,
Please login to merge, or discard this patch.
tests/phpunit/includes/testcase.php 1 patch
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -436,8 +436,7 @@  discard block
 block discarded – undo
436 436
 	 *
437 437
 	 * @since 4.2.0
438 438
 	 *
439
-	 * @param string $deprecated Name of the function, method, or class that appears in the first argument of the
440
-	 *                           source `_doing_it_wrong()` call.
439
+	 * @param string $doing_it_wrong
441 440
 	 */
442 441
 	public function setExpectedIncorrectUsage( $doing_it_wrong ) {
443 442
 		array_push( $this->expected_doing_it_wrong, $doing_it_wrong );
@@ -446,7 +445,7 @@  discard block
 block discarded – undo
446 445
 	/**
447 446
 	 * PHPUnit 6+ compatibility shim.
448 447
 	 *
449
-	 * @param mixed      $exception
448
+	 * @param string      $exception
450 449
 	 * @param string     $message
451 450
 	 * @param int|string $code
452 451
 	 */
@@ -693,7 +692,6 @@  discard block
 block discarded – undo
693 692
 	 * expected to be false. For example, assertQueryTrue('is_single', 'is_feed') means is_single()
694 693
 	 * and is_feed() must be true and everything else must be false to pass.
695 694
 	 *
696
-	 * @param string $prop,... Any number of WP_Query properties that are expected to be true for the current request.
697 695
 	 */
698 696
 	function assertQueryTrue(/* ... */) {
699 697
 		global $wp_query;
@@ -892,6 +890,7 @@  discard block
 block discarded – undo
892 890
 
893 891
 	/**
894 892
 	 * There's no way to change post_modified through WP functions.
893
+	 * @param string $date
895 894
 	 */
896 895
 	protected function update_post_modified( $post_id, $date ) {
897 896
 		global $wpdb;
Please login to merge, or discard this patch.
tests/phpunit/includes/utils.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -6,6 +6,9 @@  discard block
 block discarded – undo
6 6
 	return substr(md5(uniqid(rand())), 0, $len);
7 7
 }
8 8
 
9
+/**
10
+ * @param integer $length
11
+ */
9 12
 function rand_long_str( $length ) {
10 13
 	$chars = 'abcdefghijklmnopqrstuvwxyz';
11 14
 	$string = '';
@@ -187,6 +190,9 @@  discard block
 block discarded – undo
187 190
 	}
188 191
 }
189 192
 
193
+/**
194
+ * @param string $in
195
+ */
190 196
 function xml_to_array($in) {
191 197
 	$p = new testXMLParser($in);
192 198
 	return $p->data;
@@ -316,6 +322,9 @@  discard block
 block discarded – undo
316 322
 }
317 323
 
318 324
 // mask out any input fields matching the given name
325
+/**
326
+ * @param string $in
327
+ */
319 328
 function mask_input_value($in, $name='_wpnonce') {
320 329
 	return preg_replace('@<input([^>]*) name="'.preg_quote($name).'"([^>]*) value="[^>]*" />@', '<input$1 name="'.preg_quote($name).'"$2 value="***" />', $in);
321 330
 }
@@ -404,6 +413,8 @@  discard block
 block discarded – undo
404 413
 /**
405 414
  * Determine approximate backtrack count when running PCRE.
406 415
  *
416
+ * @param string $pattern
417
+ * @param string $strategy
407 418
  * @return int The backtrack count.
408 419
  */
409 420
 function benchmark_pcre_backtracking( $pattern, $subject, $strategy ) {
Please login to merge, or discard this patch.
tests/phpunit/tests/admin/includesPlugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@
 block discarded – undo
346 346
 	 * @param string $data     Optional. Data for the plugin file. Default is a dummy plugin header.
347 347
 	 * @param string $filename Optional. Filename for the plugin file. Default is a random string.
348 348
 	 * @param string $dir_path Optional. Path for directory where the plugin should live.
349
-	 * @return array Two-membered array of filename and full plugin path.
349
+	 * @return string[] Two-membered array of filename and full plugin path.
350 350
 	 */
351 351
 	private function _create_plugin( $data = "<?php\n/*\nPlugin Name: Test\n*/", $filename = false, $dir_path = false ) {
352 352
 		if ( false === $filename ) {
Please login to merge, or discard this patch.
tests/phpunit/tests/ajax/DeleteComment.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -55,6 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * Expects test to pass
56 56
 	 * @param mixed $comment Comment object
57 57
 	 * @param string action trash, untrash, etc.
58
+	 * @param string $action
58 59
 	 * @return void
59 60
 	 */
60 61
 	public function _test_as_admin( $comment, $action ) {
@@ -113,6 +114,7 @@  discard block
 block discarded – undo
113 114
 	 * Expects test to fail
114 115
 	 * @param mixed $comment Comment object
115 116
 	 * @param string action trash, untrash, etc.
117
+	 * @param string $action
116 118
 	 * @return void
117 119
 	 */
118 120
 	public function _test_as_subscriber( $comment, $action ) {
@@ -143,6 +145,7 @@  discard block
 block discarded – undo
143 145
 	 * Expects test to fail
144 146
 	 * @param mixed $comment Comment object
145 147
 	 * @param string action trash, untrash, etc.
148
+	 * @param string $action
146 149
 	 * @return void
147 150
 	 */
148 151
 	public function _test_with_bad_nonce( $comment, $action ) {
@@ -208,6 +211,7 @@  discard block
 block discarded – undo
208 211
 	 * Expects test to fail
209 212
 	 * @param mixed $comment Comment object
210 213
 	 * @param string action trash, untrash, etc.
214
+	 * @param string $action
211 215
 	 * @return void
212 216
 	 */
213 217
 	public function _test_double_action( $comment, $action ) {
Please login to merge, or discard this patch.
tests/phpunit/tests/basic.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@
 block discarded – undo
163 163
 		$this->assertEquals( 'match', $return );
164 164
 	}
165 165
 
166
+	/**
167
+	 * @param integer $var
168
+	 */
166 169
 	function _switch_order_helper( $var ) {
167 170
 		$return = 'no match';
168 171
 		switch ( $var ) {
Please login to merge, or discard this patch.
tests/phpunit/tests/customize/manager.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
 	 * Callback for customize_allowed_urls filter.
1374 1374
 	 *
1375 1375
 	 * @param array $urls URLs.
1376
-	 * @return array URLs.
1376
+	 * @return string[] URLs.
1377 1377
 	 */
1378 1378
 	function filter_customize_allowed_urls( $urls ) {
1379 1379
 		$urls[] = 'http://headless.example.com/';
@@ -2270,7 +2270,7 @@  discard block
 block discarded – undo
2270 2270
 	 * @param array                $components         Components.
2271 2271
 	 * @param WP_Customize_Manager $customize_manager  Manager.
2272 2272
 	 *
2273
-	 * @return array Components.
2273
+	 * @return string[] Components.
2274 2274
 	 */
2275 2275
 	function return_array_containing_widgets( $components, $customize_manager ) {
2276 2276
 		$this->assertInternalType( 'array', $components );
@@ -2287,7 +2287,7 @@  discard block
 block discarded – undo
2287 2287
 	 * @param array                $components         Components.
2288 2288
 	 * @param WP_Customize_Manager $customize_manager  Manager.
2289 2289
 	 *
2290
-	 * @return array Components.
2290
+	 * @return string[] Components.
2291 2291
 	 */
2292 2292
 	function return_array_containing_nav_menus( $components, $customize_manager ) {
2293 2293
 		$this->assertInternalType( 'array', $components );
@@ -2669,7 +2669,7 @@  discard block
 block discarded – undo
2669 2669
 	/**
2670 2670
 	 * Validates an input.
2671 2671
 	 *
2672
-	 * @param mixed $value Value to validate.
2672
+	 * @param string $value Value to validate.
2673 2673
 	 * @return true|WP_Error True if the input was validated, otherwise WP_Error.
2674 2674
 	 */
2675 2675
 	public function validate( $value ) {
Please login to merge, or discard this patch.
tests/phpunit/tests/file.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
 			$this->assertEquals( $expected[ $header ], $value, $header );
62 62
 	}
63 63
 
64
+	/**
65
+	 * @param string $filename
66
+	 */
64 67
 	function is_unique_writable_file($path, $filename) {
65 68
 		$fullpath = $path . DIRECTORY_SEPARATOR . $filename;
66 69
 
Please login to merge, or discard this patch.