@@ -383,7 +383,7 @@ |
||
| 383 | 383 | * @param string $filename File name. |
| 384 | 384 | * @param string $dir Temp directory. Dafault empty. |
| 385 | 385 | * |
| 386 | - * @return string|string[]|null |
|
| 386 | + * @return string |
|
| 387 | 387 | */ |
| 388 | 388 | public function get_temp_name( $filename, $dir = '' ) { |
| 389 | 389 | if ( empty( $dir ) ) { |
@@ -161,6 +161,9 @@ |
||
| 161 | 161 | return 'direct'; |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | + /** |
|
| 165 | + * @param string $dir |
|
| 166 | + */ |
|
| 164 | 167 | function rmdir( $dir ) { |
| 165 | 168 | foreach ( scandir( $dir ) as $file ) { |
| 166 | 169 | if ( is_dir( $file ) ) |
@@ -199,6 +199,9 @@ |
||
| 199 | 199 | $this->assertEquals( $image_list, $images_extracted ); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | + /** |
|
| 203 | + * @return integer |
|
| 204 | + */ |
|
| 202 | 205 | private function add_test_post() { |
| 203 | 206 | $post_id = $this->factory->post->create( array( |
| 204 | 207 | 'post_author' => '1046316', |
@@ -410,7 +410,7 @@ |
||
| 410 | 410 | * |
| 411 | 411 | * @since 9.1.0 |
| 412 | 412 | * |
| 413 | - * @param array $story_media A representative array of the media in the story. Each is one of 'image', 'video', or 'videopress'. |
|
| 413 | + * @param string[] $story_media A representative array of the media in the story. Each is one of 'image', 'video', or 'videopress'. |
|
| 414 | 414 | * @param bool $wpcom_mode If true, handles VideoPress videos the way WP.com does. Defaults to false. |
| 415 | 415 | * @return array $post_info { |
| 416 | 416 | * An array of information about our post. |
@@ -139,6 +139,9 @@ |
||
| 139 | 139 | unregister_post_type( 'foo' ); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | + /** |
|
| 143 | + * @param boolean $should_have_publicized |
|
| 144 | + */ |
|
| 142 | 145 | function assertPublicized( $should_have_publicized, $post ) { |
| 143 | 146 | if ( $should_have_publicized ) { |
| 144 | 147 | $this->assertEquals( $post->ID, $this->publicized_post_id, 'Is not the same post ID' ); |
@@ -50,6 +50,9 @@ discard block |
||
| 50 | 50 | 'filter' => 'raw', |
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | + /** |
|
| 54 | + * @param integer $id |
|
| 55 | + */ |
|
| 53 | 56 | function post( $id, $props = array() ) { |
| 54 | 57 | |
| 55 | 58 | $now = current_time( 'mysql' ); |
@@ -70,6 +73,9 @@ discard block |
||
| 70 | 73 | return new WP_Post( $post ); |
| 71 | 74 | } |
| 72 | 75 | |
| 76 | + /** |
|
| 77 | + * @param integer $id |
|
| 78 | + */ |
|
| 73 | 79 | function comment( $id, $post_id, $props = array() ) { |
| 74 | 80 | $now = current_time( 'mysql' ); |
| 75 | 81 | $now_gmt = get_gmt_from_date( $now ); |
@@ -88,6 +94,10 @@ discard block |
||
| 88 | 94 | return new WP_Comment( $comment ); |
| 89 | 95 | } |
| 90 | 96 | |
| 97 | + /** |
|
| 98 | + * @param integer $id |
|
| 99 | + * @param string $username |
|
| 100 | + */ |
|
| 91 | 101 | function user( $id, $username, $props = array() ) { |
| 92 | 102 | $now = current_time( 'mysql' ); |
| 93 | 103 | |
@@ -140,6 +150,9 @@ discard block |
||
| 140 | 150 | ); |
| 141 | 151 | } |
| 142 | 152 | |
| 153 | + /** |
|
| 154 | + * @param integer $id |
|
| 155 | + */ |
|
| 143 | 156 | function term( $id, $props = array() ) { |
| 144 | 157 | $term = (object) array_merge( |
| 145 | 158 | self::$default_term_props, |
@@ -706,6 +706,11 @@ |
||
| 706 | 706 | return $post; |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | + /** |
|
| 710 | + * @param string $id_field |
|
| 711 | + * @param integer $min_id |
|
| 712 | + * @param integer $max_id |
|
| 713 | + */ |
|
| 709 | 714 | private function calculate_checksum( $array, $id_field = null, $min_id = null, $max_id = null, $fields = null ) { |
| 710 | 715 | $this->checksum_fields[ get_current_blog_id() ] = $fields; |
| 711 | 716 | |
@@ -102,6 +102,10 @@ |
||
| 102 | 102 | // asserts that two objects are the same if they're both "objectified", |
| 103 | 103 | // i.e. json_encoded and then json_decoded |
| 104 | 104 | // this is useful because we json encode everything sent to the server |
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * @param string $message |
|
| 108 | + */ |
|
| 105 | 109 | protected function assertEqualsObject( $object_1, $object_2, $message = null ) { |
| 106 | 110 | $this->assertEquals( $this->objectify( $object_1 ), $this->objectify( $object_2 ), $message ); |
| 107 | 111 | } |
@@ -149,6 +149,9 @@ discard block |
||
| 149 | 149 | return array( 'test' ); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | + /** |
|
| 153 | + * @param string $name |
|
| 154 | + */ |
|
| 152 | 155 | function assertCallableIsSynced( $name, $value ) { |
| 153 | 156 | $this->assertEqualsObject( $value, $this->server_replica_storage->get_callable( $name ), 'Function ' . $name . ' didn\'t have the expected value of ' . json_encode( $value ) ); |
| 154 | 157 | } |
@@ -635,6 +638,9 @@ discard block |
||
| 635 | 638 | $this->assert_sanitized_post_type_default( $sanitized, $label ); |
| 636 | 639 | } |
| 637 | 640 | |
| 641 | + /** |
|
| 642 | + * @param string $label |
|
| 643 | + */ |
|
| 638 | 644 | function assert_sanitized_post_type_default( $sanitized, $label ) { |
| 639 | 645 | $this->assertEquals( $label, $sanitized->name ); |
| 640 | 646 | $this->assertEquals( 'Posts', $sanitized->label ); |
@@ -1201,7 +1207,7 @@ discard block |
||
| 1201 | 1207 | /** |
| 1202 | 1208 | * Test getting a hosting provider by a known function |
| 1203 | 1209 | * |
| 1204 | - * @return bool |
|
| 1210 | + * @return boolean|null |
|
| 1205 | 1211 | */ |
| 1206 | 1212 | public function test_get_hosting_provider_by_known_function() { |
| 1207 | 1213 | |
@@ -1310,7 +1316,7 @@ discard block |
||
| 1310 | 1316 | /** |
| 1311 | 1317 | * Create a recursive object. |
| 1312 | 1318 | * |
| 1313 | - * @return object |
|
| 1319 | + * @return stdClass |
|
| 1314 | 1320 | */ |
| 1315 | 1321 | function jetpack_recursive_banana() { |
| 1316 | 1322 | $banana = new stdClass(); |