@@ -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; |
@@ -278,7 +281,7 @@ discard block |
||
278 | 281 | * Get HSV values for color |
279 | 282 | * (integer values from 0-255, fast but less accurate) |
280 | 283 | * |
281 | - * @return int |
|
284 | + * @return string |
|
282 | 285 | */ |
283 | 286 | public function toHsvInt() |
284 | 287 | { |
@@ -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 | { |
@@ -682,6 +685,9 @@ discard block |
||
682 | 685 | return $this->incrementLightness( $amount ); |
683 | 686 | } |
684 | 687 | |
688 | + /** |
|
689 | + * @param integer $amount |
|
690 | + */ |
|
685 | 691 | public function incrementLightness( $amount ) { |
686 | 692 | $hsl = $this->toHsl(); |
687 | 693 | extract( $hsl ); |
@@ -699,6 +705,9 @@ discard block |
||
699 | 705 | return $this->incrementSaturation( - $amount ); |
700 | 706 | } |
701 | 707 | |
708 | + /** |
|
709 | + * @param integer $amount |
|
710 | + */ |
|
702 | 711 | public function incrementSaturation( $amount ) { |
703 | 712 | $hsl = $this->toHsl(); |
704 | 713 | extract( $hsl ); |
@@ -739,6 +748,9 @@ discard block |
||
739 | 748 | return $this->incrementHue( $incr ); |
740 | 749 | } |
741 | 750 | |
751 | + /** |
|
752 | + * @param integer $amount |
|
753 | + */ |
|
742 | 754 | public function incrementHue( $amount ) { |
743 | 755 | $hsl = $this->toHsl(); |
744 | 756 | extract( $hsl ); |
@@ -93,14 +93,24 @@ |
||
93 | 93 | * So that we can test. |
94 | 94 | */ |
95 | 95 | |
96 | + /** |
|
97 | + * @param string $class |
|
98 | + * @param string $method |
|
99 | + */ |
|
96 | 100 | public function method_exists( $class, $method ) { |
97 | 101 | return method_exists( $class, $method ); |
98 | 102 | } |
99 | 103 | |
104 | + /** |
|
105 | + * @param string $class |
|
106 | + */ |
|
100 | 107 | public function class_exists( $class ) { |
101 | 108 | return class_exists( $class ); |
102 | 109 | } |
103 | 110 | |
111 | + /** |
|
112 | + * @param string $function |
|
113 | + */ |
|
104 | 114 | public function function_exists( $function ) { |
105 | 115 | return function_exists( $function ); |
106 | 116 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @param string $url_orig Original URL. |
9 | 9 | * @param array $url_info Pieces of original URL. |
10 | 10 | * |
11 | - * @return bool |
|
11 | + * @return false|string |
|
12 | 12 | */ |
13 | 13 | function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) { |
14 | 14 | if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) { |
@@ -598,7 +598,6 @@ discard block |
||
598 | 598 | * @uses Jetpack::disconnect(); |
599 | 599 | * @since 4.3.0 |
600 | 600 | * |
601 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
602 | 601 | * |
603 | 602 | * @return string|WP_Error A raw URL if the connection URL could be built; error message otherwise. |
604 | 603 | */ |
@@ -618,7 +617,6 @@ discard block |
||
618 | 617 | * |
619 | 618 | * @since 4.3.0 |
620 | 619 | * |
621 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
622 | 620 | * |
623 | 621 | * @return object |
624 | 622 | */ |
@@ -58,6 +58,10 @@ |
||
58 | 58 | return $query->is_main_query() && $query->is_search(); |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param double $duration |
|
63 | + * @param boolean $was_jetpack_search |
|
64 | + */ |
|
61 | 65 | private function record_query_time( $duration, $was_jetpack_search ) { |
62 | 66 | $this->stats[] = array( $was_jetpack_search, intval( $duration * 1000 ) ); |
63 | 67 | } |
@@ -249,6 +249,9 @@ |
||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | + /** |
|
253 | + * @param string $access_token |
|
254 | + */ |
|
252 | 255 | private static function verify_token( $access_token ) { |
253 | 256 | $request = array( |
254 | 257 | 'headers' => array( |
@@ -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', |