Coding Standards: Include one space after function keyword for closures.

Note: This is enforced by WPCS 3.0.0.

Reference: [https://github.com/WordPress/WordPress-Coding-Standards/pull/2328 WPCS: PR #2328 Core: properly check formatting of function declaration statements].

Props jrf.
See #59161, #58831.
Built from https://develop.svn.wordpress.org/trunk@56559


git-svn-id: http://core.svn.wordpress.org/trunk@56071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2023-09-12 15:23:18 +00:00
parent 251a9c7653
commit e5490118af
32 changed files with 45 additions and 45 deletions

View File

@@ -483,7 +483,7 @@ class WP_Community_Events {
$future_wordcamps = array_filter(
$future_events,
static function( $wordcamp ) {
static function ( $wordcamp ) {
return 'wordcamp' === $wordcamp['type'];
}
);

View File

@@ -42,7 +42,7 @@ class WP_Site_Health_Auto_Updates {
$tests = array_filter( $tests );
$tests = array_map(
static function( $test ) {
static function ( $test ) {
$test = (object) $test;
if ( empty( $test->severity ) ) {

View File

@@ -2726,7 +2726,7 @@ function wp_opcache_invalidate_directory( $dir ) {
* with sub-directories represented as nested arrays.
* @param string $path Absolute path to the directory.
*/
$invalidate_directory = static function( $dirlist, $path ) use ( &$invalidate_directory ) {
$invalidate_directory = static function ( $dirlist, $path ) use ( &$invalidate_directory ) {
$path = trailingslashit( $path );
foreach ( $dirlist as $name => $details ) {

View File

@@ -1805,7 +1805,7 @@ function _upgrade_422_find_genericons_files_in_folder( $directory ) {
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
$dirs = array_filter(
$dirs,
static function( $dir ) {
static function ( $dir ) {
/*
* Skip any node_modules directories.
*