Code Modernization: Rename parameters that use reserved keywords in phpunit/tests/media.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 `$match` parameter to `$matches` in shortcode image tests.

Note: This is enforced by WPCS 3.0.0.

Follow-up to [56693].

See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2023-09-26 00:23:25 +00:00
parent 6560f46a0f
commit b011e827cf
+2 -2
View File
@@ -5162,8 +5162,8 @@ EOF;
array( '', '<img fetchpriority="high" ' ),
preg_replace_callback(
'/gallery-(\d+)/',
static function ( $match ) {
return 'gallery-' . ( (int) $match[1] + 1 );
static function ( $matches ) {
return 'gallery-' . ( (int) $matches[1] + 1 );
},
do_shortcode( '[gallery ids="' . self::$large_id . '" size="large" id="' . $post_id . '"]' )
)