Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:21:02 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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

Note: This is enforced by WPCS 3.0.0.

Reference: ​WPCS: PR #2328 Core: properly check formatting of function declaration statements.

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/cron.php

    r56548 r56559  
    911911         */
    912912        public function test_schedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() {
    913                 $return_error = function( $pre, $event, $wp_error ) {
     913                $return_error = function ( $pre, $event, $wp_error ) {
    914914                        $this->assertFalse( $wp_error );
    915915
    … …  
    943943         */
    944944        public function test_schedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() {
    945                 $return_error = function( $pre, $event, $wp_error ) {
     945                $return_error = function ( $pre, $event, $wp_error ) {
    946946                        $this->assertTrue( $wp_error );
    947947
    … …  
    10301030         */
    10311031        public function test_deprecated_argument_usage_of_wp_clear_scheduled_hook() {
    1032                 $return_pre = function( $pre, $hook, $args, $wp_error ) {
     1032                $return_pre = function ( $pre, $hook, $args, $wp_error ) {
    10331033                        $this->assertSame( array( 1, 2, 3 ), $args );
    10341034                        $this->assertFalse( $wp_error );
    … …  
    10731073         */
    10741074        public function test_clear_scheduled_hook_returns_custom_pre_filter_error_when_wp_error_is_set_to_true() {
    1075                 $return_error = function( $pre, $timestamp, $hook, $args, $wp_error ) {
     1075                $return_error = function ( $pre, $timestamp, $hook, $args, $wp_error ) {
    10761076                        $this->assertTrue( $wp_error );
    10771077
    … …  
    11081108         */
    11091109        public function test_unschedule_short_circuit_with_error_returns_false_when_wp_error_is_set_to_false() {
    1110                 $return_error = function( $pre, $hook, $wp_error ) {
     1110                $return_error = function ( $pre, $hook, $wp_error ) {
    11111111                        $this->assertFalse( $wp_error );
    11121112
    … …  
    11331133         */
    11341134        public function test_unschedule_short_circuit_with_error_returns_error_when_wp_error_is_set_to_true() {
    1135                 $return_error = function( $pre, $hook, $wp_error ) {
     1135                $return_error = function ( $pre, $hook, $wp_error ) {
    11361136                        $this->assertTrue( $wp_error );
    11371137
    … …  
    11951195                add_filter(
    11961196                        'pre_update_option_cron',
    1197                         static function() {
     1197                        static function () {
    11981198                                return get_option( 'cron' );
    11991199                        }
    … …  
    12171217                add_filter(
    12181218                        'pre_update_option_cron',
    1219                         static function() {
     1219                        static function () {
    12201220                                return get_option( 'cron' );
    12211221                        }
    … …  
    12421242                add_filter(
    12431243                        'pre_update_option_cron',
    1244                         static function() {
     1244                        static function () {
    12451245                                return get_option( 'cron' );
    12461246                        }
    … …  
    12681268                add_filter(
    12691269                        'pre_update_option_cron',
    1270                         static function() {
     1270                        static function () {
    12711271                                return get_option( 'cron' );
    12721272                        }
Note: See TracChangeset for help on using the changeset viewer.