@@ -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 |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * Mock a set of constants. |
313 | 313 | * |
314 | 314 | * @param array $constants Array of sets with constants and their respective values. |
315 | - * @return phpmock\Mock The mock object. |
|
315 | + * @return phpmock\Mock[] The mock object. |
|
316 | 316 | */ |
317 | 317 | protected function mock_constants( $constants = array() ) { |
318 | 318 | $prepare_constant = function ( $constant ) { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | /** |
329 | 329 | * Mock $wpdb->get_var() and make it return a certain value. |
330 | 330 | * |
331 | - * @param mixed $return_value Return value of the function. |
|
331 | + * @param integer $return_value Return value of the function. |
|
332 | 332 | * |
333 | 333 | * PHPUnit\Framework\MockObject\MockObject The mock object. |
334 | 334 | */ |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | * This is ported over from the manage module, which has been deprecated and baked in here. |
905 | 905 | * |
906 | 906 | * @param $domains |
907 | - * @return array |
|
907 | + * @return string[] |
|
908 | 908 | */ |
909 | 909 | function allow_wpcom_domain( $domains ) { |
910 | 910 | if ( empty( $domains ) ) { |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | /** |
1207 | 1207 | * Does the network allow admins to add new users. |
1208 | 1208 | * |
1209 | - * @return boolian |
|
1209 | + * @return boolean |
|
1210 | 1210 | */ |
1211 | 1211 | static function network_add_new_users( $option = null ) { |
1212 | 1212 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1316,7 +1316,7 @@ discard block |
||
1316 | 1316 | * |
1317 | 1317 | * @param bool $option |
1318 | 1318 | * |
1319 | - * @return boolean |
|
1319 | + * @return string |
|
1320 | 1320 | */ |
1321 | 1321 | public function is_main_network_option( $option ) { |
1322 | 1322 | // return '1' or '' |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1328 | 1328 | * |
1329 | 1329 | * @param string $option |
1330 | - * @return boolean |
|
1330 | + * @return string |
|
1331 | 1331 | */ |
1332 | 1332 | public function is_multisite( $option ) { |
1333 | 1333 | return (string) (bool) is_multisite(); |
@@ -1374,7 +1374,7 @@ discard block |
||
1374 | 1374 | /** |
1375 | 1375 | * Returns true if the site has file write access false otherwise. |
1376 | 1376 | * |
1377 | - * @return string ( '1' | '0' ) |
|
1377 | + * @return integer ( '1' | '0' ) |
|
1378 | 1378 | **/ |
1379 | 1379 | public static function file_system_write_access() { |
1380 | 1380 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2380,7 +2380,7 @@ discard block |
||
2380 | 2380 | * |
2381 | 2381 | * @param string $tag Tag as it appears in each module heading. |
2382 | 2382 | * |
2383 | - * @return mixed |
|
2383 | + * @return string |
|
2384 | 2384 | */ |
2385 | 2385 | public static function translate_module_tag( $tag ) { |
2386 | 2386 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2495,8 +2495,8 @@ discard block |
||
2495 | 2495 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2496 | 2496 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2497 | 2497 | * |
2498 | - * @param $string |
|
2499 | - * @return mixed |
|
2498 | + * @param string $string |
|
2499 | + * @return string|null |
|
2500 | 2500 | */ |
2501 | 2501 | public static function alias_directories( $string ) { |
2502 | 2502 | // ABSPATH has a trailing slash. |
@@ -2507,6 +2507,10 @@ discard block |
||
2507 | 2507 | return $string; |
2508 | 2508 | } |
2509 | 2509 | |
2510 | + /** |
|
2511 | + * @param boolean $redirect |
|
2512 | + * @param boolean $send_state_messages |
|
2513 | + */ |
|
2510 | 2514 | public static function activate_default_modules( |
2511 | 2515 | $min_version = false, |
2512 | 2516 | $max_version = false, |
@@ -2786,6 +2790,9 @@ discard block |
||
2786 | 2790 | return self::update_active_modules( $new ); |
2787 | 2791 | } |
2788 | 2792 | |
2793 | + /** |
|
2794 | + * @param string $module |
|
2795 | + */ |
|
2789 | 2796 | public static function enable_module_configurable( $module ) { |
2790 | 2797 | $module = self::get_module_slug( $module ); |
2791 | 2798 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2814,6 +2821,10 @@ discard block |
||
2814 | 2821 | } |
2815 | 2822 | |
2816 | 2823 | /* Installation */ |
2824 | + |
|
2825 | + /** |
|
2826 | + * @param string $message |
|
2827 | + */ |
|
2817 | 2828 | public static function bail_on_activation( $message, $deactivate = true ) { |
2818 | 2829 | ?> |
2819 | 2830 | <!doctype html> |
@@ -3565,7 +3576,7 @@ discard block |
||
3565 | 3576 | * Add help to the Jetpack page |
3566 | 3577 | * |
3567 | 3578 | * @since Jetpack (1.2.3) |
3568 | - * @return false if not the Jetpack page |
|
3579 | + * @return false|null if not the Jetpack page |
|
3569 | 3580 | */ |
3570 | 3581 | function admin_help() { |
3571 | 3582 | $current_screen = get_current_screen(); |
@@ -4269,6 +4280,7 @@ discard block |
||
4269 | 4280 | |
4270 | 4281 | /** |
4271 | 4282 | * Record a stat for later output. This will only currently output in the admin_footer. |
4283 | + * @param string $group |
|
4272 | 4284 | */ |
4273 | 4285 | function stat( $group, $detail ) { |
4274 | 4286 | $this->initialize_stats(); |
@@ -4581,6 +4593,9 @@ discard block |
||
4581 | 4593 | return $url; |
4582 | 4594 | } |
4583 | 4595 | |
4596 | + /** |
|
4597 | + * @param string $actionurl |
|
4598 | + */ |
|
4584 | 4599 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4585 | 4600 | $actionurl = str_replace( '&', '&', $actionurl ); |
4586 | 4601 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4837,7 +4852,7 @@ discard block |
||
4837 | 4852 | * @param String $action The action name. |
4838 | 4853 | * @param Integer $user_id The user identifier. |
4839 | 4854 | * @param Integer $exp Expiration time in seconds. |
4840 | - * @return array |
|
4855 | + * @return boolean |
|
4841 | 4856 | */ |
4842 | 4857 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
4843 | 4858 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5004,7 +5019,6 @@ discard block |
||
5004 | 5019 | * @deprecated since 8.9.0 |
5005 | 5020 | * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors() |
5006 | 5021 | * |
5007 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5008 | 5022 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5009 | 5023 | */ |
5010 | 5024 | public function wp_rest_authentication_errors( $value ) { |
@@ -5020,6 +5034,7 @@ discard block |
||
5020 | 5034 | * @param string $key |
5021 | 5035 | * @param string $value |
5022 | 5036 | * @param bool $restate private |
5037 | + * @return string |
|
5023 | 5038 | */ |
5024 | 5039 | public static function state( $key = null, $value = null, $restate = false ) { |
5025 | 5040 | static $state = array(); |
@@ -5101,6 +5116,9 @@ discard block |
||
5101 | 5116 | return true; |
5102 | 5117 | } |
5103 | 5118 | |
5119 | + /** |
|
5120 | + * @param string $file |
|
5121 | + */ |
|
5104 | 5122 | public static function check_privacy( $file ) { |
5105 | 5123 | static $is_site_publicly_accessible = null; |
5106 | 5124 | |
@@ -5187,6 +5205,9 @@ discard block |
||
5187 | 5205 | } |
5188 | 5206 | } |
5189 | 5207 | |
5208 | + /** |
|
5209 | + * @param string $url |
|
5210 | + */ |
|
5190 | 5211 | public static function staticize_subdomain( $url ) { |
5191 | 5212 | |
5192 | 5213 | // Extract hostname from URL |
@@ -5698,9 +5719,7 @@ discard block |
||
5698 | 5719 | * |
5699 | 5720 | * Attached to `style_loader_src` filter. |
5700 | 5721 | * |
5701 | - * @param string $tag The tag that would link to the external asset. |
|
5702 | 5722 | * @param string $handle The registered handle of the script in question. |
5703 | - * @param string $href The url of the asset in question. |
|
5704 | 5723 | */ |
5705 | 5724 | public static function set_suffix_on_min( $src, $handle ) { |
5706 | 5725 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -5948,8 +5967,8 @@ discard block |
||
5948 | 5967 | * - Absolute URLs `http://domain.com/feh.png` |
5949 | 5968 | * - Domain root relative URLs `/feh.png` |
5950 | 5969 | * |
5951 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5952 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5970 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5971 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5953 | 5972 | * |
5954 | 5973 | * @return mixed|string |
5955 | 5974 | */ |
@@ -6249,7 +6268,6 @@ discard block |
||
6249 | 6268 | } |
6250 | 6269 | |
6251 | 6270 | /** |
6252 | - * @param mixed $result Value for the user's option |
|
6253 | 6271 | * @return mixed |
6254 | 6272 | */ |
6255 | 6273 | function get_user_option_meta_box_order_dashboard( $sorted ) { |