@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | * Get Stats Options. |
| 291 | 291 | * |
| 292 | 292 | * @access public |
| 293 | - * @param mixed $option Option. |
|
| 293 | + * @param string $option Option. |
|
| 294 | 294 | * @return mixed|null. |
| 295 | 295 | */ |
| 296 | 296 | function stats_get_option( $option ) { |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | * Stats Convert Chart URLs. |
| 745 | 745 | * |
| 746 | 746 | * @access public |
| 747 | - * @param mixed $html HTML. |
|
| 747 | + * @param string $html HTML. |
|
| 748 | 748 | * @return string |
| 749 | 749 | */ |
| 750 | 750 | function stats_convert_chart_urls( $html ) { |
@@ -1414,7 +1414,7 @@ discard block |
||
| 1414 | 1414 | * |
| 1415 | 1415 | * @access public |
| 1416 | 1416 | * @param mixed $get Get. |
| 1417 | - * @param mixed $url URL. |
|
| 1417 | + * @param string $url URL. |
|
| 1418 | 1418 | * @return void |
| 1419 | 1419 | */ |
| 1420 | 1420 | function stats_print_wp_remote_error( $get, $url ) { |
@@ -1556,7 +1556,7 @@ discard block |
||
| 1556 | 1556 | * Stats get remote CSV. |
| 1557 | 1557 | * |
| 1558 | 1558 | * @access public |
| 1559 | - * @param mixed $url URL. |
|
| 1559 | + * @param string $url URL. |
|
| 1560 | 1560 | * @return array |
| 1561 | 1561 | */ |
| 1562 | 1562 | function stats_get_remote_csv( $url ) { |
@@ -557,7 +557,7 @@ |
||
| 557 | 557 | /** |
| 558 | 558 | * The default args for rendering a subscription form. |
| 559 | 559 | * |
| 560 | - * @return array |
|
| 560 | + * @return string |
|
| 561 | 561 | */ |
| 562 | 562 | static function defaults() { |
| 563 | 563 | $defaults = array( |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @param string $object_type Type of the sync object. |
| 69 | 69 | * @param int $id ID of the sync object. |
| 70 | - * @return mixed Object, or false if the object is invalid. |
|
| 70 | + * @return boolean Object, or false if the object is invalid. |
|
| 71 | 71 | */ |
| 72 | 72 | public function get_object_by_id( $object_type, $id ) { |
| 73 | 73 | return false; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @access public |
| 126 | 126 | * |
| 127 | - * @param array $config Full sync configuration for this sync module. |
|
| 127 | + * @param boolean $config Full sync configuration for this sync module. |
|
| 128 | 128 | * @param int $max_items_to_enqueue Maximum number of items to enqueue. |
| 129 | 129 | * @param boolean $state True if full sync has finished enqueueing this module, false otherwise. |
| 130 | 130 | * @return array Number of actions enqueued, and next module state. |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | * @access protected |
| 167 | 167 | * |
| 168 | 168 | * @param array $action_names Action names we're interested in. |
| 169 | - * @param array $actions_to_count Unfiltered list of actions we want to count. |
|
| 170 | - * @return array Number of actions that we're interested in. |
|
| 169 | + * @param string[] $actions_to_count Unfiltered list of actions we want to count. |
|
| 170 | + * @return integer Number of actions that we're interested in. |
|
| 171 | 171 | */ |
| 172 | 172 | protected function count_actions( $action_names, $actions_to_count ) { |
| 173 | 173 | return count( array_intersect( $action_names, $actions_to_count ) ); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | /** |
| 286 | 286 | * Given the Module Full Sync Configuration and Status return the next chunk of items to send. |
| 287 | 287 | * |
| 288 | - * @param array $config This module Full Sync configuration. |
|
| 288 | + * @param string $config This module Full Sync configuration. |
|
| 289 | 289 | * @param array $status This module Full Sync status. |
| 290 | 290 | * @param int $chunk_size Chunk size. |
| 291 | 291 | * |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 957 | 957 | * |
| 958 | 958 | * @param $domains |
| 959 | - * @return array |
|
| 959 | + * @return string[] |
|
| 960 | 960 | */ |
| 961 | 961 | function allow_wpcom_domain( $domains ) { |
| 962 | 962 | if ( empty( $domains ) ) { |
@@ -1324,7 +1324,7 @@ discard block |
||
| 1324 | 1324 | /** |
| 1325 | 1325 | * Does the network allow admins to add new users. |
| 1326 | 1326 | * |
| 1327 | - * @return boolian |
|
| 1327 | + * @return boolean |
|
| 1328 | 1328 | */ |
| 1329 | 1329 | static function network_add_new_users( $option = null ) { |
| 1330 | 1330 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1434,7 +1434,7 @@ discard block |
||
| 1434 | 1434 | * |
| 1435 | 1435 | * @param bool $option |
| 1436 | 1436 | * |
| 1437 | - * @return boolean |
|
| 1437 | + * @return string |
|
| 1438 | 1438 | */ |
| 1439 | 1439 | public function is_main_network_option( $option ) { |
| 1440 | 1440 | // return '1' or '' |
@@ -1445,7 +1445,7 @@ discard block |
||
| 1445 | 1445 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1446 | 1446 | * |
| 1447 | 1447 | * @param string $option |
| 1448 | - * @return boolean |
|
| 1448 | + * @return string |
|
| 1449 | 1449 | */ |
| 1450 | 1450 | public function is_multisite( $option ) { |
| 1451 | 1451 | return (string) (bool) is_multisite(); |
@@ -1508,7 +1508,7 @@ discard block |
||
| 1508 | 1508 | /** |
| 1509 | 1509 | * Returns true if the site has file write access false otherwise. |
| 1510 | 1510 | * |
| 1511 | - * @return string ( '1' | '0' ) |
|
| 1511 | + * @return integer ( '1' | '0' ) |
|
| 1512 | 1512 | **/ |
| 1513 | 1513 | public static function file_system_write_access() { |
| 1514 | 1514 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2237,7 +2237,7 @@ discard block |
||
| 2237 | 2237 | * @param int $user_id The user id. |
| 2238 | 2238 | * @param string $token The user token. |
| 2239 | 2239 | * @param bool $is_master_user Whether the user is the master user. |
| 2240 | - * @return bool |
|
| 2240 | + * @return boolean|null |
|
| 2241 | 2241 | */ |
| 2242 | 2242 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2243 | 2243 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2681,7 +2681,7 @@ discard block |
||
| 2681 | 2681 | * |
| 2682 | 2682 | * @param string $tag Tag as it appears in each module heading. |
| 2683 | 2683 | * |
| 2684 | - * @return mixed |
|
| 2684 | + * @return string |
|
| 2685 | 2685 | */ |
| 2686 | 2686 | public static function translate_module_tag( $tag ) { |
| 2687 | 2687 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2796,8 +2796,8 @@ discard block |
||
| 2796 | 2796 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2797 | 2797 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2798 | 2798 | * |
| 2799 | - * @param $string |
|
| 2800 | - * @return mixed |
|
| 2799 | + * @param string $string |
|
| 2800 | + * @return string|null |
|
| 2801 | 2801 | */ |
| 2802 | 2802 | public static function alias_directories( $string ) { |
| 2803 | 2803 | // ABSPATH has a trailing slash. |
@@ -2808,6 +2808,10 @@ discard block |
||
| 2808 | 2808 | return $string; |
| 2809 | 2809 | } |
| 2810 | 2810 | |
| 2811 | + /** |
|
| 2812 | + * @param boolean $redirect |
|
| 2813 | + * @param boolean $send_state_messages |
|
| 2814 | + */ |
|
| 2811 | 2815 | public static function activate_default_modules( |
| 2812 | 2816 | $min_version = false, |
| 2813 | 2817 | $max_version = false, |
@@ -3091,6 +3095,9 @@ discard block |
||
| 3091 | 3095 | return self::update_active_modules( $new ); |
| 3092 | 3096 | } |
| 3093 | 3097 | |
| 3098 | + /** |
|
| 3099 | + * @param string $module |
|
| 3100 | + */ |
|
| 3094 | 3101 | public static function enable_module_configurable( $module ) { |
| 3095 | 3102 | $module = self::get_module_slug( $module ); |
| 3096 | 3103 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3119,6 +3126,10 @@ discard block |
||
| 3119 | 3126 | } |
| 3120 | 3127 | |
| 3121 | 3128 | /* Installation */ |
| 3129 | + |
|
| 3130 | + /** |
|
| 3131 | + * @param string $message |
|
| 3132 | + */ |
|
| 3122 | 3133 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3123 | 3134 | ?> |
| 3124 | 3135 | <!doctype html> |
@@ -3164,6 +3175,7 @@ discard block |
||
| 3164 | 3175 | * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() |
| 3165 | 3176 | * |
| 3166 | 3177 | * @static |
| 3178 | + * @param boolean $network_wide |
|
| 3167 | 3179 | */ |
| 3168 | 3180 | public static function plugin_activation( $network_wide ) { |
| 3169 | 3181 | Jetpack_Options::update_option( 'activated', 1 ); |
@@ -3884,7 +3896,7 @@ discard block |
||
| 3884 | 3896 | * Add help to the Jetpack page |
| 3885 | 3897 | * |
| 3886 | 3898 | * @since Jetpack (1.2.3) |
| 3887 | - * @return false if not the Jetpack page |
|
| 3899 | + * @return false|null if not the Jetpack page |
|
| 3888 | 3900 | */ |
| 3889 | 3901 | function admin_help() { |
| 3890 | 3902 | $current_screen = get_current_screen(); |
@@ -4588,6 +4600,7 @@ discard block |
||
| 4588 | 4600 | |
| 4589 | 4601 | /** |
| 4590 | 4602 | * Record a stat for later output. This will only currently output in the admin_footer. |
| 4603 | + * @param string $group |
|
| 4591 | 4604 | */ |
| 4592 | 4605 | function stat( $group, $detail ) { |
| 4593 | 4606 | $this->initialize_stats(); |
@@ -5001,6 +5014,9 @@ discard block |
||
| 5001 | 5014 | return $url; |
| 5002 | 5015 | } |
| 5003 | 5016 | |
| 5017 | + /** |
|
| 5018 | + * @param string $actionurl |
|
| 5019 | + */ |
|
| 5004 | 5020 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 5005 | 5021 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 5006 | 5022 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5291,12 +5307,15 @@ discard block |
||
| 5291 | 5307 | * @param String $action The action name. |
| 5292 | 5308 | * @param Integer $user_id The user identifier. |
| 5293 | 5309 | * @param Integer $exp Expiration time in seconds. |
| 5294 | - * @return array |
|
| 5310 | + * @return boolean |
|
| 5295 | 5311 | */ |
| 5296 | 5312 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5297 | 5313 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
| 5298 | 5314 | } |
| 5299 | 5315 | |
| 5316 | + /** |
|
| 5317 | + * @param string $action |
|
| 5318 | + */ |
|
| 5300 | 5319 | public static function get_secrets( $action, $user_id ) { |
| 5301 | 5320 | $secrets = self::connection()->get_secrets( $action, $user_id ); |
| 5302 | 5321 | |
@@ -5547,7 +5566,6 @@ discard block |
||
| 5547 | 5566 | * @deprecated since 8.9.0 |
| 5548 | 5567 | * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors() |
| 5549 | 5568 | * |
| 5550 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5551 | 5569 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5552 | 5570 | */ |
| 5553 | 5571 | public function wp_rest_authentication_errors( $value ) { |
@@ -5640,6 +5658,7 @@ discard block |
||
| 5640 | 5658 | * @param string $key |
| 5641 | 5659 | * @param string $value |
| 5642 | 5660 | * @param bool $restate private |
| 5661 | + * @return string |
|
| 5643 | 5662 | */ |
| 5644 | 5663 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5645 | 5664 | static $state = array(); |
@@ -5721,6 +5740,9 @@ discard block |
||
| 5721 | 5740 | return true; |
| 5722 | 5741 | } |
| 5723 | 5742 | |
| 5743 | + /** |
|
| 5744 | + * @param string $file |
|
| 5745 | + */ |
|
| 5724 | 5746 | public static function check_privacy( $file ) { |
| 5725 | 5747 | static $is_site_publicly_accessible = null; |
| 5726 | 5748 | |
@@ -6293,9 +6315,7 @@ discard block |
||
| 6293 | 6315 | * |
| 6294 | 6316 | * Attached to `style_loader_src` filter. |
| 6295 | 6317 | * |
| 6296 | - * @param string $tag The tag that would link to the external asset. |
|
| 6297 | 6318 | * @param string $handle The registered handle of the script in question. |
| 6298 | - * @param string $href The url of the asset in question. |
|
| 6299 | 6319 | */ |
| 6300 | 6320 | public static function set_suffix_on_min( $src, $handle ) { |
| 6301 | 6321 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6671,8 +6691,8 @@ discard block |
||
| 6671 | 6691 | * - Absolute URLs `http://domain.com/feh.png` |
| 6672 | 6692 | * - Domain root relative URLs `/feh.png` |
| 6673 | 6693 | * |
| 6674 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6675 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6694 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6695 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6676 | 6696 | * |
| 6677 | 6697 | * @return mixed|string |
| 6678 | 6698 | */ |
@@ -6971,7 +6991,6 @@ discard block |
||
| 6971 | 6991 | } |
| 6972 | 6992 | |
| 6973 | 6993 | /** |
| 6974 | - * @param mixed $result Value for the user's option |
|
| 6975 | 6994 | * @return mixed |
| 6976 | 6995 | */ |
| 6977 | 6996 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -388,6 +388,9 @@ discard block |
||
| 388 | 388 | do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) ); |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | + /** |
|
| 392 | + * @param string $name |
|
| 393 | + */ |
|
| 391 | 394 | public function js_dialog( $name, $params = array() ) { |
| 392 | 395 | if ( true !== $this->open_link_in_new ) { |
| 393 | 396 | return; |
@@ -1039,6 +1042,9 @@ discard block |
||
| 1039 | 1042 | public $icon = '\f204'; |
| 1040 | 1043 | private $share_type = 'default'; |
| 1041 | 1044 | |
| 1045 | + /** |
|
| 1046 | + * @param string $id |
|
| 1047 | + */ |
|
| 1042 | 1048 | public function __construct( $id, array $settings ) { |
| 1043 | 1049 | parent::__construct( $id, $settings ); |
| 1044 | 1050 | |
@@ -1186,6 +1192,10 @@ discard block |
||
| 1186 | 1192 | class Share_Print extends Sharing_Source { |
| 1187 | 1193 | public $shortname = 'print'; |
| 1188 | 1194 | public $icon = '\f469'; |
| 1195 | + |
|
| 1196 | + /** |
|
| 1197 | + * @param string $id |
|
| 1198 | + */ |
|
| 1189 | 1199 | public function __construct( $id, array $settings ) { |
| 1190 | 1200 | parent::__construct( $id, $settings ); |
| 1191 | 1201 | |
@@ -1585,6 +1595,9 @@ discard block |
||
| 1585 | 1595 | return __( 'Pinterest', 'jetpack' ); |
| 1586 | 1596 | } |
| 1587 | 1597 | |
| 1598 | + /** |
|
| 1599 | + * @return string |
|
| 1600 | + */ |
|
| 1588 | 1601 | public function get_image( $post ) { |
| 1589 | 1602 | if ( class_exists( 'Jetpack_PostImages' ) ) { |
| 1590 | 1603 | $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); |
@@ -1724,6 +1737,9 @@ discard block |
||
| 1724 | 1737 | public $shortname = 'pocket'; |
| 1725 | 1738 | public $icon = '\f224'; |
| 1726 | 1739 | |
| 1740 | + /** |
|
| 1741 | + * @param string $id |
|
| 1742 | + */ |
|
| 1727 | 1743 | public function __construct( $id, array $settings ) { |
| 1728 | 1744 | parent::__construct( $id, $settings ); |
| 1729 | 1745 | |
@@ -1839,6 +1855,9 @@ discard block |
||
| 1839 | 1855 | class Jetpack_Share_WhatsApp extends Sharing_Source { |
| 1840 | 1856 | public $shortname = 'jetpack-whatsapp'; |
| 1841 | 1857 | |
| 1858 | + /** |
|
| 1859 | + * @param string $id |
|
| 1860 | + */ |
|
| 1842 | 1861 | public function __construct( $id, array $settings ) { |
| 1843 | 1862 | parent::__construct( $id, $settings ); |
| 1844 | 1863 | } |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | /** |
| 150 | 150 | * Get the token stored in the auth cookie. |
| 151 | 151 | * |
| 152 | - * @return ?string |
|
| 152 | + * @return string |
|
| 153 | 153 | */ |
| 154 | 154 | private function token_from_cookie() { |
| 155 | 155 | if ( isset( $_COOKIE[ self::JWT_AUTH_TOKEN_COOKIE_NAME ] ) ) { |
@@ -22,6 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Scan every PHP in the root |
| 25 | + * @param string $root |
|
| 25 | 26 | */ |
| 26 | 27 | public function scan( $root, $exclude = array() ) { |
| 27 | 28 | if ( is_dir( $root ) ) { |
@@ -33,6 +34,9 @@ discard block |
||
| 33 | 34 | } |
| 34 | 35 | } |
| 35 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $root |
|
| 39 | + */ |
|
| 36 | 40 | public function scan_dir( $root, $exclude = array() ) { |
| 37 | 41 | |
| 38 | 42 | if ( is_null( $exclude ) || ! is_array( $exclude ) ) { |
@@ -639,6 +639,7 @@ discard block |
||
| 639 | 639 | * Fetch latest Jetpack version. |
| 640 | 640 | * |
| 641 | 641 | * @param bool $is_dev_version - If JP Dev version is being queried. |
| 642 | + * @return string |
|
| 642 | 643 | */ |
| 643 | 644 | public static function get_new_jetpack_version( $is_dev_version = false ) { |
| 644 | 645 | $manifest = self::get_beta_manifest(); |
@@ -714,6 +715,7 @@ discard block |
||
| 714 | 715 | * |
| 715 | 716 | * @param string $branch - Branch. |
| 716 | 717 | * @param string $section - Section. |
| 718 | + * @return string |
|
| 717 | 719 | */ |
| 718 | 720 | public static function get_install_url( $branch = null, $section = null ) { |
| 719 | 721 | if ( is_null( $section ) ) { |
@@ -769,7 +771,7 @@ discard block |
||
| 769 | 771 | /** |
| 770 | 772 | * Get JP plugin data. |
| 771 | 773 | * |
| 772 | - * @param mixed $plugin_file - JP or JP Dev plugin path. |
|
| 774 | + * @param string $plugin_file - JP or JP Dev plugin path. |
|
| 773 | 775 | */ |
| 774 | 776 | public static function get_jetpack_plugin_info( $plugin_file = null ) { |
| 775 | 777 | |
@@ -1418,7 +1420,7 @@ discard block |
||
| 1418 | 1420 | /** |
| 1419 | 1421 | * Checks if a dir is empty. |
| 1420 | 1422 | * |
| 1421 | - * @param [type] $dir The absolute directory path to check. |
|
| 1423 | + * @param string $dir The absolute directory path to check. |
|
| 1422 | 1424 | * @return boolean |
| 1423 | 1425 | */ |
| 1424 | 1426 | public static function is_dir_empty( $dir ) { |
@@ -729,6 +729,7 @@ |
||
| 729 | 729 | * |
| 730 | 730 | * @param string $branch - Branch that's ready for update. |
| 731 | 731 | * @param string $section - What kind of branch we're updated (master, rc, pr). |
| 732 | + * @return string |
|
| 732 | 733 | */ |
| 733 | 734 | public static function update_action_url( $branch, $section ) { |
| 734 | 735 | $query = array( |