Make WordPress Core


Ignore:
Timestamp:
09/12/2023 03:21:02 PM (17 months 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/blocks/wpBlock.php

    r56382 r56559  
    276276            'core/dynamic',
    277277            array(
    278                 'render_callback' => static function() {
     278                'render_callback' => static function () {
    279279                    return 'b';
    280280                },
     
    297297            'core/greeting',
    298298            array(
    299                 'render_callback' => static function( $attributes, $content, $block ) {
     299                'render_callback' => static function ( $attributes, $content, $block ) {
    300300                    return sprintf( 'Hello from %s', $block->name );
    301301                },
     
    367367                    ),
    368368                ),
    369                 'render_callback' => static function( $block_attributes ) {
     369                'render_callback' => static function ( $block_attributes ) {
    370370                    return sprintf(
    371371                        'Hello %s%s',
     
    392392            'core/outer',
    393393            array(
    394                 'render_callback' => static function( $block_attributes, $content ) {
     394                'render_callback' => static function ( $block_attributes, $content ) {
    395395                    return $content;
    396396                },
     
    400400            'core/inner',
    401401            array(
    402                 'render_callback' => static function() {
     402                'render_callback' => static function () {
    403403                    return 'b';
    404404                },
     
    602602        add_filter(
    603603            'query_loop_block_query_vars',
    604             static function( $query, $block, $page ) {
     604            static function ( $query, $block, $page ) {
    605605                $query['post_type'] = 'book';
    606606                return $query;
     
    769769            'core/outer',
    770770            array(
    771                 'render_callback' => static function( $block_attributes, $content ) {
     771                'render_callback' => static function ( $block_attributes, $content ) {
    772772                    return $content;
    773773                },
     
    778778            'core/inner',
    779779            array(
    780                 'render_callback' => static function() {
     780                'render_callback' => static function () {
    781781                    return 'b';
    782782                },
Note: See TracChangeset for help on using the changeset viewer.