WordPress.org

Make WordPress Core

Ticket #53359: 53359-2-CS-tabs-should-only-be-used-for-indentation.patch

File 53359-2-CS-tabs-should-only-be-used-for-indentation.patch, 1.8 KB (added by jrf, 2 months ago)
  • src/wp-includes/script-loader.php

    From 4bbdc91149220be24d58068817fd89b99ce9e036 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Tue, 20 Jul 2021 15:02:47 +0200
    Subject: [PATCH] CS: tabs should only be used for indentation
    
    ... nowhere else.
    ---
     src/wp-includes/script-loader.php      | 6 +++---
     tests/phpunit/includes/wp-profiler.php | 6 +++---
     2 files changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index a1392d469d..f2e604be2b 100644
    a b function wp_default_packages_scripts( $scripts ) { 
    221221        $suffix = wp_scripts_get_suffix();
    222222
    223223        // Expects multidimensional array like:
    224         //      'a11y.js' => array('dependencies' => array(...), 'version' => '...'),
    225         //      'annotations.js' => array('dependencies' => array(...), 'version' => '...'),
    226         //      'api-fetch.js' => array(...
     224        //  'a11y.js' => array('dependencies' => array(...), 'version' => '...'),
     225        //  'annotations.js' => array('dependencies' => array(...), 'version' => '...'),
     226        //  'api-fetch.js' => array(...
    227227        $assets = include ABSPATH . WPINC . '/assets/script-loader-packages.php';
    228228
    229229        foreach ( $assets as $package_name => $package_data ) {
  • tests/phpunit/includes/wp-profiler.php

    diff --git a/tests/phpunit/includes/wp-profiler.php b/tests/phpunit/includes/wp-profiler.php
    index 2cc27a8e57..684f10466e 100644
    a b  
    88 * start() and stop() must be called in pairs, for example:
    99 *
    1010 * function something_to_profile() {
    11  *      wppf_start(__FUNCTION__);
    12  *      do_stuff();
    13  *      wppf_stop();
     11 *     wppf_start(__FUNCTION__);
     12 *     do_stuff();
     13 *     wppf_stop();
    1414 * }
    1515 *
    1616 * Multiple profile blocks are permitted, and they may be nested.