Code Modernization: Rename parameters that use reserved keywords in `wp-admin/includes/class-wp-importer.php`.

While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$string` parameter to `$text` in `WP_Importer::min_whitespace()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@53029


git-svn-id: http://core.svn.wordpress.org/trunk@52618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-03-30 10:45:06 +00:00
parent e2b654efe6
commit f99c38efd5
2 changed files with 5 additions and 5 deletions

View File

@ -238,13 +238,13 @@ class WP_Importer {
}
/**
* Replace newlines, tabs, and multiple spaces with a single space
* Replace newlines, tabs, and multiple spaces with a single space.
*
* @param string $string
* @param string $text
* @return string
*/
public function min_whitespace( $string ) {
return preg_replace( '|[\r\n\t ]+|', ' ', $string );
public function min_whitespace( $text ) {
return preg_replace( '|[\r\n\t ]+|', ' ', $text );
}
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-53028';
$wp_version = '6.0-alpha-53029';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.