@@ -15,6 +15,10 @@ |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | class Jetpack_Google_Analytics_Options { |
18 | + |
|
19 | + /** |
|
20 | + * @param string $option_name |
|
21 | + */ |
|
18 | 22 | public static function get_option( $option_name, $default = false ) { |
19 | 23 | $o = get_option( 'jetpack_wga' ); |
20 | 24 | return isset( $o[ $option_name ] ) ? $o[ $option_name ] : $default; |
@@ -326,6 +326,9 @@ |
||
326 | 326 | return $contents; |
327 | 327 | } |
328 | 328 | |
329 | + /** |
|
330 | + * @param string $message |
|
331 | + */ |
|
329 | 332 | function display_page( $title, $message, $back_button = false, $recovery_form = false ) { |
330 | 333 | |
331 | 334 | if ( ! headers_sent() ) { |
@@ -87,6 +87,9 @@ |
||
87 | 87 | echo $args['after_widget']; |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $user_id |
|
92 | + */ |
|
90 | 93 | function goodreads_user_id_exists( $user_id ) { |
91 | 94 | $url = "https://www.goodreads.com/user/show/$user_id/"; |
92 | 95 | $response = wp_remote_head( $url, array( 'httpversion' => '1.1', 'timeout' => 3, 'redirection' => 2 ) ); |
@@ -94,6 +94,9 @@ |
||
94 | 94 | return $user; |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param WP_User|null $user |
|
99 | + */ |
|
97 | 100 | public function expand_user( $user ) { |
98 | 101 | if ( ! is_object( $user ) ) { |
99 | 102 | return null; |
@@ -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 |
@@ -116,6 +116,9 @@ discard block |
||
116 | 116 | $this->functions_score_mode = $mode; |
117 | 117 | } |
118 | 118 | |
119 | + /** |
|
120 | + * @param integer $boost |
|
121 | + */ |
|
119 | 122 | public function add_max_boost_to_functions( $boost ) { |
120 | 123 | $this->functions_max_boost = $boost; |
121 | 124 | } |
@@ -124,6 +127,9 @@ discard block |
||
124 | 127 | $this->query_bool_boost = $boost; |
125 | 128 | } |
126 | 129 | |
130 | + /** |
|
131 | + * @param string $aggs_name |
|
132 | + */ |
|
127 | 133 | public function add_aggs( $aggs_name, $aggs ) { |
128 | 134 | $this->aggs_query = true; |
129 | 135 | $this->aggs[$aggs_name] = $aggs; |