@@ -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( |
@@ -229,7 +229,7 @@ |
||
229 | 229 | * |
230 | 230 | * @param string $notify_moderator The value of the moderation_notify option OR if the comment is awaiting moderation. |
231 | 231 | * @param int $comment_id Comment ID. |
232 | - * @return boolean Returns false to shortcircuit the execution of wp_notify_moderator |
|
232 | + * @return string|false Returns false to shortcircuit the execution of wp_notify_moderator |
|
233 | 233 | */ |
234 | 234 | function jetpack_notify_moderator( $notify_moderator, $comment_id ) { |
235 | 235 | /* |
@@ -168,7 +168,7 @@ |
||
168 | 168 | /** |
169 | 169 | * Checks to see whether or not the root package is the one that required the autoloader. |
170 | 170 | * |
171 | - * @return bool |
|
171 | + * @return null|boolean |
|
172 | 172 | */ |
173 | 173 | private function isRequiredByRoot() { |
174 | 174 | $package = $this->composer->getPackage(); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * @param array $post_types - other post types. |
194 | 194 | * |
195 | 195 | * @see hook 'rest_api_allowed_post_types' |
196 | - * @return array |
|
196 | + * @return string[] |
|
197 | 197 | */ |
198 | 198 | public function allow_rest_api_types( $post_types ) { |
199 | 199 | $post_types[] = self::$post_type_plan; |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | * (because it requires a plan upgrade or Stripe connection), and the |
255 | 255 | * button is a child of a Premium Content block. |
256 | 256 | * |
257 | - * @param WP_Block $block Recurring Payments block instance. |
|
257 | + * @param WP_Block|null $block Recurring Payments block instance. |
|
258 | 258 | * |
259 | 259 | * @return boolean |
260 | 260 | */ |
@@ -246,7 +246,7 @@ |
||
246 | 246 | * @param int $user_id The user id. |
247 | 247 | * @param string $token The user token. |
248 | 248 | * @param bool $is_master_user Whether the user is the master user. |
249 | - * @return bool |
|
249 | + * @return boolean|null |
|
250 | 250 | */ |
251 | 251 | public function update_user_token( $user_id, $token, $is_master_user ) { |
252 | 252 | // Not designed for concurrent updates. |
@@ -35,6 +35,7 @@ |
||
35 | 35 | * @param String $action The action name. |
36 | 36 | * @param Integer $user_id The user identifier. |
37 | 37 | * @param Integer $exp Expiration time in seconds. |
38 | + * @return string|boolean |
|
38 | 39 | */ |
39 | 40 | public function generate( $action, $user_id = false, $exp = 600 ) { |
40 | 41 | if ( false === $user_id ) { |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | /** |
294 | 294 | * Verifies the signature of the current request. |
295 | 295 | * |
296 | - * @return false|array |
|
296 | + * @return boolean |
|
297 | 297 | */ |
298 | 298 | public function verify_xml_rpc_signature() { |
299 | 299 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1461,7 +1461,7 @@ discard block |
||
1461 | 1461 | /** |
1462 | 1462 | * Obtains the auth token. |
1463 | 1463 | * |
1464 | - * @param array $data The request data. |
|
1464 | + * @param string $data The request data. |
|
1465 | 1465 | * @return object|\WP_Error Returns the auth token on success. |
1466 | 1466 | * Returns a \WP_Error on failure. |
1467 | 1467 | */ |
@@ -2088,7 +2088,7 @@ discard block |
||
2088 | 2088 | * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead. |
2089 | 2089 | * |
2090 | 2090 | * @param object $token the token. |
2091 | - * @return WP_Error|string a signed token |
|
2091 | + * @return string a signed token |
|
2092 | 2092 | */ |
2093 | 2093 | public function get_signed_token( $token ) { |
2094 | 2094 | _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' ); |