@@ -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 ); |
@@ -328,6 +328,9 @@ |
||
| 328 | 328 | return build_query( array( 'value' => urlencode($post[$column]), 'id' => $post['ID'] ) ); |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | + /** |
|
| 332 | + * @param string $column |
|
| 333 | + */ |
|
| 331 | 334 | function _build_date_range_query( $column, $range, $where ) { |
| 332 | 335 | global $wpdb; |
| 333 | 336 | |
@@ -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 |
@@ -1341,6 +1341,7 @@ discard block |
||
| 1341 | 1341 | * timezone set in the options table for the blog or the GMT offset. |
| 1342 | 1342 | * |
| 1343 | 1343 | * @param datetime string |
| 1344 | + * @param string $date_string |
|
| 1344 | 1345 | * |
| 1345 | 1346 | * @return array( $local_time_string, $gmt_time_string ) |
| 1346 | 1347 | */ |
@@ -1458,6 +1459,10 @@ discard block |
||
| 1458 | 1459 | do_action( 'restapi_theme_init' ); |
| 1459 | 1460 | } |
| 1460 | 1461 | |
| 1462 | + /** |
|
| 1463 | + * @param string $from_hook |
|
| 1464 | + * @param string $to_hook |
|
| 1465 | + */ |
|
| 1461 | 1466 | function copy_hooks( $from_hook, $to_hook, $base_paths ) { |
| 1462 | 1467 | global $wp_filter; |
| 1463 | 1468 | foreach ( $wp_filter as $hook => $actions ) { |
@@ -69,11 +69,17 @@ |
||
| 69 | 69 | return $args; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param string $taxonomy |
|
| 74 | + */ |
|
| 72 | 75 | function get_found( $taxonomy, $args ) { |
| 73 | 76 | unset( $args['offset'] ); |
| 74 | 77 | return wp_count_terms( $taxonomy, $args ); |
| 75 | 78 | } |
| 76 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $taxonomy |
|
| 82 | + */ |
|
| 77 | 83 | function get_formatted_terms( $taxonomy, $args ) { |
| 78 | 84 | $terms = get_terms( $taxonomy, $args ); |
| 79 | 85 | |
@@ -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(); |
@@ -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 | } |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | /** |
| 164 | 164 | * Iterates through expected items ( plugins or themes ) and compares them to actual results. |
| 165 | 165 | * |
| 166 | - * @param $items 'plugin' or 'theme' |
|
| 166 | + * @param string $items 'plugin' or 'theme' |
|
| 167 | 167 | */ |
| 168 | 168 | private function log_items( $items ) { |
| 169 | 169 | if ( ! isset( $this->expected[ $items ] ) ) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html |
| 79 | 79 | * |
| 80 | - * @param $function string name of the function |
|
| 80 | + * @param string $function string name of the function |
|
| 81 | 81 | * @param $params array functions parameters |
| 82 | 82 | * |
| 83 | 83 | * @return void |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @see https://www.elastic.co/guide/en/elasticsearch/guide/current/decay-functions.html |
| 96 | 96 | * |
| 97 | - * @param $function string name of the decay function - linear, exp, or gauss |
|
| 97 | + * @param string $function string name of the decay function - linear, exp, or gauss |
|
| 98 | 98 | * @param $params array The decay functions parameters, passed to ES directly |
| 99 | 99 | * |
| 100 | 100 | * @return void |
@@ -124,6 +124,9 @@ discard block |
||
| 124 | 124 | $this->query_bool_boost = $boost; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | + /** |
|
| 128 | + * @param string $aggs_name |
|
| 129 | + */ |
|
| 127 | 130 | public function add_aggs( $aggs_name, $aggs ) { |
| 128 | 131 | $this->aggs_query = true; |
| 129 | 132 | $this->aggs[$aggs_name] = $aggs; |