@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * |
225 | 225 | * @param string $table Table name to validate. |
226 | 226 | * |
227 | - * @return mixed|string |
|
227 | + * @return string |
|
228 | 228 | * @throws Exception Throw an exception on validation failure. |
229 | 229 | */ |
230 | 230 | private function validate_table_name( $table ) { |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | * @param int|null $range_to The end of the range. |
483 | 483 | * @param int|null $limit How many values to return. |
484 | 484 | * |
485 | - * @return array|object|void |
|
485 | + * @return boolean |
|
486 | 486 | * @throws Exception Throws an exception if validation fails on the internal function calls. |
487 | 487 | */ |
488 | 488 | public function get_range_edges( $range_from = null, $range_to = null, $limit = null ) { |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Record an event. |
54 | 54 | * |
55 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
55 | + * @param Jetpack_Tracks_Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
56 | 56 | * Properties are included directly in the pixel query string after light validation. |
57 | 57 | * @return mixed True on success, WP_Error on failure |
58 | 58 | */ |
@@ -119,8 +119,8 @@ |
||
119 | 119 | /** |
120 | 120 | * Determines whether tracking should be enabled. |
121 | 121 | * |
122 | - * @param Automattic\Jetpack\Terms_Of_Service $terms_of_service A Terms_Of_Service object. |
|
123 | - * @param Automattic\Jetpack\Status $status A Status object. |
|
122 | + * @param Terms_Of_Service $terms_of_service A Terms_Of_Service object. |
|
123 | + * @param Status $status A Status object. |
|
124 | 124 | * |
125 | 125 | * @return boolean True if tracking should be enabled, else false. |
126 | 126 | */ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @param array $allowed_post_types Allowed post types. |
47 | 47 | * |
48 | - * @return array |
|
48 | + * @return string[] |
|
49 | 49 | */ |
50 | 50 | public function allow_bbpress_post_types( $allowed_post_types ) { |
51 | 51 | $allowed_post_types[] = 'forum'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @param array $allowed_meta_keys Allowed meta keys. |
61 | 61 | * |
62 | - * @return array |
|
62 | + * @return string[] |
|
63 | 63 | */ |
64 | 64 | public function allow_bbpress_public_metadata( $allowed_meta_keys ) { |
65 | 65 | $allowed_meta_keys[] = '_bbp_forum_id'; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param string $url_orig Original URL. |
19 | 19 | * @param array $url_info Pieces of original URL. |
20 | 20 | * |
21 | - * @return bool |
|
21 | + * @return false|string |
|
22 | 22 | */ |
23 | 23 | function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) { |
24 | 24 | if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) { |
@@ -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 | */ |
@@ -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 | } |