@@ -129,6 +129,9 @@ |
||
129 | 129 | echo '<p>' . sprintf( _x( 'Learn more about the %s', 'the Internet Defense League', 'jetpack' ), '<a href="https://www.internetdefenseleague.org/">Internet Defense League</a>' ) . '</p>'; |
130 | 130 | } |
131 | 131 | |
132 | + /** |
|
133 | + * @param string $field_name |
|
134 | + */ |
|
132 | 135 | public function select( $field_name, $options, $default = null ) { |
133 | 136 | echo '<select class="widefat" name="' . $this->get_field_name( $field_name ) . '">'; |
134 | 137 | foreach ( $options as $option_slug => $option_name ) { |
@@ -595,7 +595,7 @@ |
||
595 | 595 | * |
596 | 596 | * @param array $dirty Unsantized data for the widget. |
597 | 597 | * |
598 | - * @return array Santized data. |
|
598 | + * @return integer Santized data. |
|
599 | 599 | */ |
600 | 600 | public function sanitize_instance( $dirty ) { |
601 | 601 | $now = (int) current_time( 'timestamp' ); // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Return an associative array of default values |
63 | 63 | * These values are used in new widgets as well as when sanitizing input. |
64 | 64 | * |
65 | - * @return array Array of default values for the Widget's options |
|
65 | + * @return string Array of default values for the Widget's options |
|
66 | 66 | */ |
67 | 67 | function defaults() { |
68 | 68 | return array( |
@@ -172,6 +172,9 @@ discard block |
||
172 | 172 | echo '</select></label></p></div>'; |
173 | 173 | } |
174 | 174 | |
175 | + /** |
|
176 | + * @param string $type |
|
177 | + */ |
|
175 | 178 | function _rss_link( $type, $args ) { |
176 | 179 | if ( 'posts' == $type ) { |
177 | 180 | $type_text = __( 'Posts', 'jetpack' ); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * Returns the number of decimal places on string representing a price. |
277 | 277 | * |
278 | 278 | * @param string $number Price to check. |
279 | - * @return number number of decimal places. |
|
279 | + * @return null|integer number of decimal places. |
|
280 | 280 | */ |
281 | 281 | private function get_decimal_places( $number ) { |
282 | 282 | $parts = explode( '.', $number ); |
@@ -377,8 +377,7 @@ discard block |
||
377 | 377 | /** |
378 | 378 | * Gets the latests field value from either the old instance or the new instance. |
379 | 379 | * |
380 | - * @param array $mixed Array of values for the new form instance. |
|
381 | - * @param array $mixed Array of values for the old form instance. |
|
380 | + * @param string $field |
|
382 | 381 | * @return mixed $mixed Field value. |
383 | 382 | */ |
384 | 383 | private function get_latest_field_value( $new_instance, $old_instance, $field ) { |
@@ -392,6 +391,7 @@ discard block |
||
392 | 391 | * it returns the default values. |
393 | 392 | * |
394 | 393 | * @param int Product Post ID. |
394 | + * @param integer $product_post_id |
|
395 | 395 | * @return array $fields Product Fields from the Product Post. |
396 | 396 | */ |
397 | 397 | private function get_product_from_post( $product_post_id ) { |
@@ -310,7 +310,7 @@ |
||
310 | 310 | /** |
311 | 311 | * Get the current user id |
312 | 312 | * |
313 | - * @return int |
|
313 | + * @return string |
|
314 | 314 | */ |
315 | 315 | public function get_user_id() { |
316 | 316 | if ( is_user_logged_in() ) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * Convenience function for grabbing options from params->options |
119 | 119 | * |
120 | 120 | * @param string $option the option to grab. |
121 | - * @param mixed $default (optional). |
|
121 | + * @param boolean $default (optional). |
|
122 | 122 | * @return option or $default if not set |
123 | 123 | * |
124 | 124 | * @since 4.5.0 |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | /** |
711 | 711 | * Check the reasons to bail before we attempt to insert ads. |
712 | 712 | * |
713 | - * @return true if we should bail (don't insert ads) |
|
713 | + * @return boolean if we should bail (don't insert ads) |
|
714 | 714 | * |
715 | 715 | * @since 4.5.0 |
716 | 716 | */ |
@@ -47,7 +47,7 @@ |
||
47 | 47 | * @param array $args Widget args. |
48 | 48 | * @param array $instance The Widget instance. |
49 | 49 | * |
50 | - * @return bool|void |
|
50 | + * @return false|null |
|
51 | 51 | */ |
52 | 52 | public function widget( $args, $instance ) { |
53 | 53 | global $wordads; |
@@ -30,6 +30,7 @@ discard block |
||
30 | 30 | * Used to construct meta links in API responses |
31 | 31 | * |
32 | 32 | * @param mixed ...$args Optional arguments to be appended to URL |
33 | + * @param string $args |
|
33 | 34 | * @return string Endpoint URL |
34 | 35 | **/ |
35 | 36 | function get_link( ...$args ) { |
@@ -128,7 +129,7 @@ discard block |
||
128 | 129 | * This method is used in get_link() to construct meta links for API responses. |
129 | 130 | * |
130 | 131 | * @param $template_path string The generic endpoint path, e.g. /sites/%s |
131 | - * @param $path string The current endpoint path, relative to the version, e.g. /sites/12345 |
|
132 | + * @param string $path string The current endpoint path, relative to the version, e.g. /sites/12345 |
|
132 | 133 | * @param $request_method string Request method used to access the endpoint path |
133 | 134 | * @return string The current version, or otherwise the maximum version available |
134 | 135 | */ |
@@ -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 ) { |