@@ -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 ); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * NOTE: If you want IMAGES, call extract( $blog_id, $post_id, ...) which will give you more/better image extraction |
75 | 75 | * This method will give you an error if you ask for IMAGES. |
76 | 76 | * |
77 | - * @param $content The HTML post_content of a post |
|
77 | + * @param string $content The HTML post_content of a post |
|
78 | 78 | * @param $what_to_extract (int) A mask of things to extract, e.g. Jetpack_Media_Meta_Extractor::IMAGES | Jetpack_Media_Meta_Extractor::MENTIONS |
79 | 79 | * @param $already_extracted (array) Previously extracted things, e.g. images from extract(), which can be used for x-referencing here |
80 | 80 | * @returns a structure containing metadata about the embedded things, or empty array if nothing found, or WP_Error on error |
@@ -23,6 +23,9 @@ |
||
23 | 23 | public $blog_id; |
24 | 24 | public $platform; |
25 | 25 | |
26 | + /** |
|
27 | + * @param WPORG_Platform $platform |
|
28 | + */ |
|
26 | 29 | public function __construct( $blog_id, $platform ) { |
27 | 30 | $this->blog_id = $blog_id; |
28 | 31 | $this->platform = $platform; |
@@ -16,6 +16,9 @@ discard block |
||
16 | 16 | public $context; |
17 | 17 | public $site; |
18 | 18 | |
19 | + /** |
|
20 | + * @param Jetpack_Site $site |
|
21 | + */ |
|
19 | 22 | function __construct( $site, $post, $context ) { |
20 | 23 | $this->post = $post; |
21 | 24 | $this->context = $context; |
@@ -508,6 +511,9 @@ discard block |
||
508 | 511 | return $suggestions; |
509 | 512 | } |
510 | 513 | |
514 | + /** |
|
515 | + * @param string $context |
|
516 | + */ |
|
511 | 517 | private function format_taxonomy( $taxonomy, $taxonomy_type, $context ) { |
512 | 518 | // Permissions |
513 | 519 | switch ( $context ) { |
@@ -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(); |
@@ -420,6 +420,10 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | // functions |
423 | + |
|
424 | + /** |
|
425 | + * @param string $name |
|
426 | + */ |
|
423 | 427 | public function get_callable( $name ) { |
424 | 428 | $value = get_option( 'jetpack_' . $name ); |
425 | 429 | |
@@ -688,6 +692,9 @@ discard block |
||
688 | 692 | return $histogram; |
689 | 693 | } |
690 | 694 | |
695 | + /** |
|
696 | + * @param string|null $id_column |
|
697 | + */ |
|
691 | 698 | private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null, $strip_non_ascii = true ) { |
692 | 699 | global $wpdb; |
693 | 700 | |
@@ -725,6 +732,9 @@ discard block |
||
725 | 732 | |
726 | 733 | } |
727 | 734 | |
735 | + /** |
|
736 | + * @param string $where_sql |
|
737 | + */ |
|
728 | 738 | private function meta_count( $table, $where_sql, $min_id, $max_id ) { |
729 | 739 | global $wpdb; |
730 | 740 |
@@ -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 | } |
@@ -164,6 +164,9 @@ |
||
164 | 164 | $queue->add_all( $data_to_enqueue ); |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param Jetpack_Sync_Queue $queue |
|
169 | + */ |
|
167 | 170 | function enqueue_action( $current_filter, $args, $queue ) { |
168 | 171 | // don't enqueue an action during the outbound http request - this prevents recursion |
169 | 172 | if ( Jetpack_Sync_Settings::is_sending() ) { |
@@ -246,6 +246,9 @@ discard block |
||
246 | 246 | return true; |
247 | 247 | } |
248 | 248 | |
249 | + /** |
|
250 | + * @param Jetpack_Sync_Queue_Buffer $buffer |
|
251 | + */ |
|
249 | 252 | function close( $buffer, $ids_to_remove = null ) { |
250 | 253 | $is_valid = $this->validate_checkout( $buffer ); |
251 | 254 | |
@@ -339,6 +342,9 @@ discard block |
||
339 | 342 | return false; |
340 | 343 | } |
341 | 344 | |
345 | + /** |
|
346 | + * @param string $checkout_id |
|
347 | + */ |
|
342 | 348 | private function set_checkout_id( $checkout_id ) { |
343 | 349 | global $wpdb; |
344 | 350 |