@@ -9,6 +9,9 @@ |
||
9 | 9 | |
10 | 10 | class Differences extends PersistentList { |
11 | 11 | |
12 | + /** |
|
13 | + * @param string $path |
|
14 | + */ |
|
12 | 15 | private function slashit( $path ) { |
13 | 16 | $path .= ( substr( $path, -1 ) == '/' ? '' : '/' ); |
14 | 17 | return $path; |
@@ -37,6 +37,9 @@ |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | + /** |
|
41 | + * @param string $root |
|
42 | + */ |
|
40 | 43 | public function scan_dir( $root, $exclude = array() ) { |
41 | 44 | $filter = function ( $file, $key, $iterator ) use ( $exclude ) { |
42 | 45 | if ( $iterator->hasChildren() && ! in_array( $file->getFilename(), $exclude ) ) { |
@@ -31,6 +31,7 @@ |
||
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Saves the items to a file and returns the file contents |
34 | + * @param string $file_path |
|
34 | 35 | */ |
35 | 36 | public function save( $file_path, $allow_empty = true ) { |
36 | 37 |
@@ -11,6 +11,9 @@ |
||
11 | 11 | private $declarations; |
12 | 12 | private $current_relative_path; |
13 | 13 | |
14 | + /** |
|
15 | + * @param $declarations |
|
16 | + */ |
|
14 | 17 | public function __construct( $current_relative_path, $declarations ) { |
15 | 18 | $this->current_relative_path = $current_relative_path; |
16 | 19 | $this->declarations = $declarations; |
@@ -9,6 +9,9 @@ |
||
9 | 9 | private $invocations; |
10 | 10 | private $file_path; |
11 | 11 | |
12 | + /** |
|
13 | + * @param $invocations |
|
14 | + */ |
|
12 | 15 | public function __construct( $file_path, $invocations ) { |
13 | 16 | $this->file_path = $file_path; |
14 | 17 | $this->invocations = $invocations; |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | /** |
314 | 314 | * Verifies the signature of the current request. |
315 | 315 | * |
316 | - * @return false|array |
|
316 | + * @return boolean |
|
317 | 317 | */ |
318 | 318 | public function verify_xml_rpc_signature() { |
319 | 319 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1286,6 +1286,7 @@ discard block |
||
1286 | 1286 | * @param String $action The action name. |
1287 | 1287 | * @param Integer $user_id The user identifier. |
1288 | 1288 | * @param Integer $exp Expiration time in seconds. |
1289 | + * @return string |
|
1289 | 1290 | */ |
1290 | 1291 | public function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
1291 | 1292 | if ( false === $user_id ) { |
@@ -2242,7 +2243,7 @@ discard block |
||
2242 | 2243 | * |
2243 | 2244 | * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. |
2244 | 2245 | * @param string|false $token_key If provided, check that the token matches the provided input. |
2245 | - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | + * @param boolean $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | 2247 | * |
2247 | 2248 | * @return object|false |
2248 | 2249 | */ |
@@ -2626,7 +2627,7 @@ discard block |
||
2626 | 2627 | * Fetches a signed token. |
2627 | 2628 | * |
2628 | 2629 | * @param object $token the token. |
2629 | - * @return WP_Error|string a signed token |
|
2630 | + * @return string a signed token |
|
2630 | 2631 | */ |
2631 | 2632 | public function get_signed_token( $token ) { |
2632 | 2633 | if ( ! isset( $token->secret ) || empty( $token->secret ) ) { |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | * @access public |
337 | 337 | * @static |
338 | 338 | * |
339 | - * @return bool|null False if sync is not allowed. |
|
339 | + * @return false|null False if sync is not allowed. |
|
340 | 340 | */ |
341 | 341 | public static function do_initial_sync() { |
342 | 342 | // Lets not sync if we are not suppose to. |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | * @static |
507 | 507 | * |
508 | 508 | * @param array $sync_modules The list of sync modules declared prior to this filter. |
509 | - * @return array A list of sync modules that now includes Woo's modules. |
|
509 | + * @return string[] A list of sync modules that now includes Woo's modules. |
|
510 | 510 | */ |
511 | 511 | public static function add_woocommerce_sync_module( $sync_modules ) { |
512 | 512 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce'; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | * @static |
534 | 534 | * |
535 | 535 | * @param array $sync_modules The list of sync modules declared prior to this filer. |
536 | - * @return array A list of sync modules that now includes WP Super Cache's modules. |
|
536 | + * @return string[] A list of sync modules that now includes WP Super Cache's modules. |
|
537 | 537 | */ |
538 | 538 | public static function add_wp_super_cache_sync_module( $sync_modules ) { |
539 | 539 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache'; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | /** |
182 | 182 | * Return a hosting provider using a set of known constants. |
183 | 183 | * |
184 | - * @return mixed A host identifier string or false. |
|
184 | + * @return string|false A host identifier string or false. |
|
185 | 185 | */ |
186 | 186 | public function get_hosting_provider_by_known_constant() { |
187 | 187 | $hosting_provider_constants = array( |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Return a hosting provider using a set of known classes. |
211 | 211 | * |
212 | - * @return mixed A host identifier string or false. |
|
212 | + * @return string|false A host identifier string or false. |
|
213 | 213 | */ |
214 | 214 | public function get_hosting_provider_by_known_class() { |
215 | 215 | $hosting_provider = false; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | /** |
227 | 227 | * Return a hosting provider using a set of known functions. |
228 | 228 | * |
229 | - * @return mixed A host identifier string or false. |
|
229 | + * @return string|false A host identifier string or false. |
|
230 | 230 | */ |
231 | 231 | public function get_hosting_provider_by_known_function() { |
232 | 232 | $hosting_provider = false; |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | * |
442 | 442 | * @param string $option Option value from the site. |
443 | 443 | * @param callable $url_function Function retrieving the URL to normalize. |
444 | - * @return mixed|string URL. |
|
444 | + * @return callable URL. |
|
445 | 445 | */ |
446 | 446 | public static function normalize_www_in_url( $option, $url_function ) { |
447 | 447 | $url = wp_parse_url( call_user_func( $url_function ) ); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * @access public |
223 | 223 | * |
224 | 224 | * @param array $config Full sync configuration for this sync module. |
225 | - * @return array Number of items yet to be enqueued. |
|
225 | + * @return integer Number of items yet to be enqueued. |
|
226 | 226 | */ |
227 | 227 | public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
228 | 228 | return 1; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * |
234 | 234 | * @access public |
235 | 235 | * |
236 | - * @return array Full sync actions of this module. |
|
236 | + * @return string[] Full sync actions of this module. |
|
237 | 237 | */ |
238 | 238 | public function get_full_sync_actions() { |
239 | 239 | return array( 'jetpack_full_sync_callables' ); |