@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @param string $type The type of option to return. Defaults to 'compact'. |
20 | 20 | * |
21 | - * @return array |
|
21 | + * @return string[] |
|
22 | 22 | */ |
23 | 23 | public static function get_option_names( $type = 'compact' ) { |
24 | 24 | switch ( $type ) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * This does _not_ adjust the prefix in any way (does not prefix jetpack_%) |
188 | 188 | * |
189 | 189 | * @param string $name Option name |
190 | - * @param mixed $default (optional) |
|
190 | + * @param string $default (optional) |
|
191 | 191 | * |
192 | 192 | * @return mixed |
193 | 193 | */ |
@@ -211,6 +211,9 @@ discard block |
||
211 | 211 | return $value; |
212 | 212 | } |
213 | 213 | |
214 | + /** |
|
215 | + * @param string $name |
|
216 | + */ |
|
214 | 217 | private static function update_grouped_option( $group, $name, $value ) { |
215 | 218 | $options = get_option( self::$grouped_options[ $group ] ); |
216 | 219 | if ( ! is_array( $options ) ) { |
@@ -312,6 +315,9 @@ discard block |
||
312 | 315 | return $result; |
313 | 316 | } |
314 | 317 | |
318 | + /** |
|
319 | + * @param string $name |
|
320 | + */ |
|
315 | 321 | private static function get_grouped_option( $group, $name, $default ) { |
316 | 322 | $options = get_option( self::$grouped_options[ $group ] ); |
317 | 323 | if ( is_array( $options ) && isset( $options[ $name ] ) ) { |
@@ -440,7 +446,7 @@ discard block |
||
440 | 446 | * This function checks for a constant that, if present, will disable direct DB queries Jetpack uses to manage certain options and force Jetpack to always use Options API instead. |
441 | 447 | * Options can be selectively managed via a blacklist by filtering option names via the jetpack_disabled_raw_option filter. |
442 | 448 | * |
443 | - * @param $name Option name |
|
449 | + * @param string $name Option name |
|
444 | 450 | * |
445 | 451 | * @return bool |
446 | 452 | */ |
@@ -466,7 +472,7 @@ discard block |
||
466 | 472 | * @since 5.4.0 |
467 | 473 | * |
468 | 474 | * @param boolean $strip_unsafe_options If true, and by default, will strip out options necessary for the connection to WordPress.com. |
469 | - * @return array An array of all options managed via the Jetpack_Options class. |
|
475 | + * @return string[] An array of all options managed via the Jetpack_Options class. |
|
470 | 476 | */ |
471 | 477 | static function get_all_jetpack_options( $strip_unsafe_options = true ) { |
472 | 478 | $jetpack_options = self::get_option_names(); |
@@ -509,7 +515,7 @@ discard block |
||
509 | 515 | * |
510 | 516 | * @since 5.4.0 |
511 | 517 | * |
512 | - * @return array |
|
518 | + * @return string[] |
|
513 | 519 | */ |
514 | 520 | static function get_all_wp_options() { |
515 | 521 | // A manual build of the wp options |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | /** |
49 | 49 | * record_event |
50 | - * @param mixed $event Event object to send to Tracks. An array will be cast to object. Required. |
|
50 | + * @param Event $event Event object to send to Tracks. An array will be cast to object. Required. |
|
51 | 51 | * Properties are included directly in the pixel query string after light validation. |
52 | 52 | * @return mixed True on success, WP_Error on failure |
53 | 53 | */ |
@@ -74,6 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | /** |
76 | 76 | * Synchronously request the pixel |
77 | + * @param string $pixel |
|
77 | 78 | */ |
78 | 79 | static function record_pixel( $pixel ) { |
79 | 80 | // Add the Request Timestamp and URL terminator just before the HTTP request. |
@@ -143,6 +143,10 @@ discard block |
||
143 | 143 | * @param int $user_id The user id of the local user |
144 | 144 | * @return array $identity |
145 | 145 | */ |
146 | + |
|
147 | + /** |
|
148 | + * @param Connection\Manager $connection_manager |
|
149 | + */ |
|
146 | 150 | static function jetpack_tracks_get_identity( $user_id, $connection_manager ) { |
147 | 151 | |
148 | 152 | // Meta is set, and user is still connected. Use WPCOM ID |
@@ -186,7 +190,6 @@ discard block |
||
186 | 190 | /** |
187 | 191 | * Record an event in Tracks - this is the preferred way to record events from PHP. |
188 | 192 | * |
189 | - * @param mixed $identity username, user_id, or WP_user object |
|
190 | 193 | * @param string $event_name The name of the event |
191 | 194 | * @param array $properties Custom properties to send with the event |
192 | 195 | * @param int $event_timestamp_millis The time in millis since 1970-01-01 00:00:00 when the event occurred |