@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @param string $access_token The Instagram access token. |
| 20 | 20 | * @param int $count The number of Instagram posts to fetch. |
| 21 | - * @return mixed |
|
| 21 | + * @return integer|null |
|
| 22 | 22 | */ |
| 23 | 23 | public static function get_instagram_gallery( $access_token, $count ) { |
| 24 | 24 | $site_id = self::get_site_id(); |
@@ -149,6 +149,9 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | 151 | * Helper function for Jetpack_Color::fromHsl() |
| 152 | + * @param double $p |
|
| 153 | + * @param double $q |
|
| 154 | + * @param integer $t |
|
| 152 | 155 | */ |
| 153 | 156 | private function hue2rgb( $p, $q, $t ) { |
| 154 | 157 | if ( $t < 0 ) $t += 1; |
@@ -498,7 +501,7 @@ discard block |
||
| 498 | 501 | * |
| 499 | 502 | * @param Jetpack_Color $color |
| 500 | 503 | * |
| 501 | - * @return int |
|
| 504 | + * @return double |
|
| 502 | 505 | */ |
| 503 | 506 | public function getDistanceRgbFrom(Jetpack_Color $color) |
| 504 | 507 | { |
@@ -687,6 +690,9 @@ discard block |
||
| 687 | 690 | return $this->incrementLightness( $amount ); |
| 688 | 691 | } |
| 689 | 692 | |
| 693 | + /** |
|
| 694 | + * @param integer $amount |
|
| 695 | + */ |
|
| 690 | 696 | public function incrementLightness( $amount ) { |
| 691 | 697 | $hsl = $this->toHsl(); |
| 692 | 698 | extract( $hsl ); |
@@ -704,6 +710,9 @@ discard block |
||
| 704 | 710 | return $this->incrementSaturation( - $amount ); |
| 705 | 711 | } |
| 706 | 712 | |
| 713 | + /** |
|
| 714 | + * @param integer $amount |
|
| 715 | + */ |
|
| 707 | 716 | public function incrementSaturation( $amount ) { |
| 708 | 717 | $hsl = $this->toHsl(); |
| 709 | 718 | extract( $hsl ); |
@@ -744,6 +753,9 @@ discard block |
||
| 744 | 753 | return $this->incrementHue( $incr ); |
| 745 | 754 | } |
| 746 | 755 | |
| 756 | + /** |
|
| 757 | + * @param integer $amount |
|
| 758 | + */ |
|
| 747 | 759 | public function incrementHue( $amount ) { |
| 748 | 760 | $hsl = $this->toHsl(); |
| 749 | 761 | extract( $hsl ); |
@@ -1264,7 +1264,6 @@ |
||
| 1264 | 1264 | * |
| 1265 | 1265 | * @since 4.3.0 |
| 1266 | 1266 | * |
| 1267 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
| 1268 | 1267 | * |
| 1269 | 1268 | * @return object |
| 1270 | 1269 | */ |
@@ -100,6 +100,10 @@ discard block |
||
| 100 | 100 | ), menu_page_url( 'sharing', false ) ); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $service_name |
|
| 105 | + * @param string $for |
|
| 106 | + */ |
|
| 103 | 107 | static function refresh_url( $service_name, $for ) { |
| 104 | 108 | return add_query_arg( array( |
| 105 | 109 | 'action' => 'request', |
@@ -111,6 +115,10 @@ discard block |
||
| 111 | 115 | ), admin_url( 'options-general.php?page=sharing' ) ); |
| 112 | 116 | } |
| 113 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $service_name |
|
| 120 | + * @param string $id |
|
| 121 | + */ |
|
| 114 | 122 | static function disconnect_url( $service_name, $id ) { |
| 115 | 123 | return add_query_arg( array( |
| 116 | 124 | 'action' => 'delete', |
@@ -410,7 +410,7 @@ |
||
| 410 | 410 | * |
| 411 | 411 | * @param Mixed $needle the needle. |
| 412 | 412 | * @param array $haystack the haystack. |
| 413 | - * @return is the needle not in the haystack? |
|
| 413 | + * @return boolean the needle not in the haystack? |
|
| 414 | 414 | */ |
| 415 | 415 | protected function negative_in_array( $needle, $haystack ) { |
| 416 | 416 | if ( in_array( $needle, $haystack, true ) ) { |
@@ -62,6 +62,10 @@ |
||
| 62 | 62 | return $query->is_main_query() && $query->is_search(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | + /** |
|
| 66 | + * @param double $duration |
|
| 67 | + * @param boolean $was_jetpack_search |
|
| 68 | + */ |
|
| 65 | 69 | private function record_query_time( $duration, $was_jetpack_search ) { |
| 66 | 70 | $this->stats[] = array( $was_jetpack_search, (int) ( $duration * 1000 ) ); |
| 67 | 71 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * Return an array of allowed mime_type items used to upload a media file. |
| 86 | 86 | * |
| 87 | - * @return array mime_type array |
|
| 87 | + * @return string[] mime_type array |
|
| 88 | 88 | */ |
| 89 | 89 | static function get_allowed_mime_types( $default_mime_types ) { |
| 90 | 90 | return array_unique( array_merge( $default_mime_types, array( |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | * @param object $media_item - media post object |
| 253 | 253 | * @param file $file - file recently added |
| 254 | 254 | * @param bool $has_original_media - condition is the original media has been already added |
| 255 | - * @return bool `true` if the item has been added. Otherwise `false`. |
|
| 255 | + * @return false|null `true` if the item has been added. Otherwise `false`. |
|
| 256 | 256 | */ |
| 257 | 257 | public static function register_revision( $media_item, $file, $has_original_media ) { |
| 258 | 258 | if ( is_wp_error( $file ) || ! $has_original_media ) { |
@@ -280,6 +280,9 @@ discard block |
||
| 280 | 280 | return $original; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | + /** |
|
| 284 | + * @param string $pathname |
|
| 285 | + */ |
|
| 283 | 286 | public static function delete_file( $pathname ) { |
| 284 | 287 | if ( ! file_exists( $pathname ) || ! is_file( $pathname ) ) { |
| 285 | 288 | // let's touch a fake file to try to `really` remove the media file |
@@ -295,7 +298,7 @@ discard block |
||
| 295 | 298 | * |
| 296 | 299 | * @param number $media_id - media post ID |
| 297 | 300 | * @param string $filename - basename of the file ( name-of-file.ext ) |
| 298 | - * @return bool `true` is the file has been removed, `false` if not. |
|
| 301 | + * @return boolean|null `true` is the file has been removed, `false` if not. |
|
| 299 | 302 | */ |
| 300 | 303 | private static function delete_media_history_file( $media_id, $filename ) { |
| 301 | 304 | $attached_path = get_attached_file( $media_id ); |
@@ -365,6 +368,7 @@ discard block |
||
| 365 | 368 | * |
| 366 | 369 | * @param number $media_id - media post ID |
| 367 | 370 | * @param number [$limit] - maximun amount of items. 20 as default. |
| 371 | + * @param integer $limit |
|
| 368 | 372 | * @return array items removed from `revision_history` |
| 369 | 373 | */ |
| 370 | 374 | public static function limit_revision_history( $media_id, $limit = null) { |
@@ -199,7 +199,7 @@ |
||
| 199 | 199 | * @param string $type Test type, async or direct. Optional, direct all tests. |
| 200 | 200 | * @param string $group Testing group to check status of. Optional, default all tests. |
| 201 | 201 | * |
| 202 | - * @return true|array True if all tests pass. Array of failed tests. |
|
| 202 | + * @return boolean True if all tests pass. Array of failed tests. |
|
| 203 | 203 | */ |
| 204 | 204 | public function pass( $type = 'all', $group = 'all' ) { |
| 205 | 205 | $results = $this->raw_results( $type, $group ); |
@@ -699,8 +699,7 @@ discard block |
||
| 699 | 699 | * Render the events |
| 700 | 700 | * |
| 701 | 701 | * @param string $url (default: '') |
| 702 | - * @param string $context (default: 'widget') or 'shortcode' |
|
| 703 | - * @return mixed bool|string false on failure, rendered HTML string on success. |
|
| 702 | + * @return false|string bool|string false on failure, rendered HTML string on success. |
|
| 704 | 703 | */ |
| 705 | 704 | public function render( $url = '', $args = array() ) { |
| 706 | 705 | |
@@ -857,8 +856,7 @@ discard block |
||
| 857 | 856 | * Wrapper function for iCalendarReader->render() |
| 858 | 857 | * |
| 859 | 858 | * @param string $url (default: '') |
| 860 | - * @param string $context (default: 'widget') or 'shortcode' |
|
| 861 | - * @return mixed bool|string false on failure, rendered HTML string on success. |
|
| 859 | + * @return false|string bool|string false on failure, rendered HTML string on success. |
|
| 862 | 860 | */ |
| 863 | 861 | function icalendar_render_events( $url = '', $args = array() ) { |
| 864 | 862 | $ical = new iCalendarReader(); |