Completed
Push — phpcs/jetpack ( 47f0fe )
by
unknown
72:37 queued 62:26
created
projects/plugins/jetpack/class.jetpack.php 1 patch
Doc Comments   +34 added lines, -11 removed lines patch added patch discarded remove patch
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
901 901
 	 *
902 902
 	 * @param $domains
903
-	 * @return array
903
+	 * @return string[]
904 904
 	 */
905 905
 	function allow_wpcom_domain( $domains ) {
906 906
 		if ( empty( $domains ) ) {
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 	/**
1203 1203
 	 * Does the network allow admins to add new users.
1204 1204
 	 *
1205
-	 * @return boolian
1205
+	 * @return boolean
1206 1206
 	 */
1207 1207
 	static function network_add_new_users( $option = null ) {
1208 1208
 		return (bool) get_site_option( 'add_new_users' );
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 	 *
1313 1313
 	 * @param  bool $option
1314 1314
 	 *
1315
-	 * @return boolean
1315
+	 * @return string
1316 1316
 	 */
1317 1317
 	public function is_main_network_option( $option ) {
1318 1318
 		// return '1' or ''
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1324 1324
 	 *
1325 1325
 	 * @param  string $option
1326
-	 * @return boolean
1326
+	 * @return string
1327 1327
 	 */
1328 1328
 	public function is_multisite( $option ) {
1329 1329
 		return (string) (bool) is_multisite();
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
 	/**
1371 1371
 	 * Returns true if the site has file write access false otherwise.
1372 1372
 	 *
1373
-	 * @return string ( '1' | '0' )
1373
+	 * @return integer ( '1' | '0' )
1374 1374
 	 **/
1375 1375
 	public static function file_system_write_access() {
1376 1376
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2340,7 +2340,7 @@  discard block
 block discarded – undo
2340 2340
 	 *
2341 2341
 	 * @param string $tag Tag as it appears in each module heading.
2342 2342
 	 *
2343
-	 * @return mixed
2343
+	 * @return string
2344 2344
 	 */
2345 2345
 	public static function translate_module_tag( $tag ) {
2346 2346
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2455,8 +2455,8 @@  discard block
 block discarded – undo
2455 2455
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2456 2456
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2457 2457
 	 *
2458
-	 * @param $string
2459
-	 * @return mixed
2458
+	 * @param string $string
2459
+	 * @return string|null
2460 2460
 	 */
2461 2461
 	public static function alias_directories( $string ) {
2462 2462
 		// ABSPATH has a trailing slash.
@@ -2467,6 +2467,10 @@  discard block
 block discarded – undo
2467 2467
 		return $string;
2468 2468
 	}
2469 2469
 
2470
+	/**
2471
+	 * @param boolean $redirect
2472
+	 * @param boolean $send_state_messages
2473
+	 */
2470 2474
 	public static function activate_default_modules(
2471 2475
 		$min_version = false,
2472 2476
 		$max_version = false,
@@ -2746,6 +2750,9 @@  discard block
 block discarded – undo
2746 2750
 		return self::update_active_modules( $new );
2747 2751
 	}
2748 2752
 
2753
+	/**
2754
+	 * @param string $module
2755
+	 */
2749 2756
 	public static function enable_module_configurable( $module ) {
2750 2757
 		$module = self::get_module_slug( $module );
2751 2758
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -2774,6 +2781,10 @@  discard block
 block discarded – undo
2774 2781
 	}
2775 2782
 
2776 2783
 	/* Installation */
2784
+
2785
+	/**
2786
+	 * @param string $message
2787
+	 */
2777 2788
 	public static function bail_on_activation( $message, $deactivate = true ) {
2778 2789
 		?>
2779 2790
 <!doctype html>
@@ -2819,6 +2830,7 @@  discard block
 block discarded – undo
2819 2830
 	 * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
2820 2831
 	 *
2821 2832
 	 * @static
2833
+	 * @param boolean $network_wide
2822 2834
 	 */
2823 2835
 	public static function plugin_activation( $network_wide ) {
2824 2836
 		Jetpack_Options::update_option( 'activated', 1 );
@@ -3525,7 +3537,7 @@  discard block
 block discarded – undo
3525 3537
 	 * Add help to the Jetpack page
3526 3538
 	 *
3527 3539
 	 * @since Jetpack (1.2.3)
3528
-	 * @return false if not the Jetpack page
3540
+	 * @return false|null if not the Jetpack page
3529 3541
 	 */
3530 3542
 	function admin_help() {
3531 3543
 		$current_screen = get_current_screen();
@@ -4223,6 +4235,7 @@  discard block
 block discarded – undo
4223 4235
 
4224 4236
 	/**
4225 4237
 	 * Record a stat for later output.  This will only currently output in the admin_footer.
4238
+	 * @param string $group
4226 4239
 	 */
4227 4240
 	function stat( $group, $detail ) {
4228 4241
 		$this->initialize_stats();
@@ -4534,6 +4547,9 @@  discard block
 block discarded – undo
4534 4547
 		return $url;
4535 4548
 	}
4536 4549
 
4550
+	/**
4551
+	 * @param string $actionurl
4552
+	 */
4537 4553
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4538 4554
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4539 4555
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4790,12 +4806,15 @@  discard block
 block discarded – undo
4790 4806
 	 * @param String  $action  The action name.
4791 4807
 	 * @param Integer $user_id The user identifier.
4792 4808
 	 * @param Integer $exp     Expiration time in seconds.
4793
-	 * @return array
4809
+	 * @return boolean
4794 4810
 	 */
4795 4811
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
4796 4812
 		return self::connection()->generate_secrets( $action, $user_id, $exp );
4797 4813
 	}
4798 4814
 
4815
+	/**
4816
+	 * @param string $action
4817
+	 */
4799 4818
 	public static function get_secrets( $action, $user_id ) {
4800 4819
 		$secrets = self::connection()->get_secrets( $action, $user_id );
4801 4820
 
@@ -4931,6 +4950,7 @@  discard block
 block discarded – undo
4931 4950
 	 * @param string $key
4932 4951
 	 * @param string $value
4933 4952
 	 * @param bool   $restate private
4953
+	 * @return string
4934 4954
 	 */
4935 4955
 	public static function state( $key = null, $value = null, $restate = false ) {
4936 4956
 		static $state = array();
@@ -5012,6 +5032,9 @@  discard block
 block discarded – undo
5012 5032
 		return true;
5013 5033
 	}
5014 5034
 
5035
+	/**
5036
+	 * @param string $file
5037
+	 */
5015 5038
 	public static function check_privacy( $file ) {
5016 5039
 		static $is_site_publicly_accessible = null;
5017 5040
 
@@ -5941,7 +5964,7 @@  discard block
 block discarded – undo
5941 5964
 	 * @param string $css The raw CSS -- should be read in directly from the file.
5942 5965
 	 * @param string $css_file_url The URL that the file can be accessed at, for calculating paths from.
5943 5966
 	 *
5944
-	 * @return mixed|string
5967
+	 * @return string
5945 5968
 	 */
5946 5969
 	public static function absolutize_css_urls( $css, $css_file_url ) {
5947 5970
 		$pattern = '#url\((?P<path>[^)]*)\)#i';
Please login to merge, or discard this patch.