From ef948cbfd6eea30e2d2a61cfc442ac054ee24b80 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 3 Apr 2019 02:14:51 +0000 Subject: [PATCH] PHPCS: Fix WPCS violations in [45104]. See #46645. Built from https://develop.svn.wordpress.org/trunk@45106 git-svn-id: http://core.svn.wordpress.org/trunk@44915 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-debug-data.php | 11 ++++++----- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-wp-debug-data.php b/wp-admin/includes/class-wp-debug-data.php index bde398ea23..01a78c5f02 100644 --- a/wp-admin/includes/class-wp-debug-data.php +++ b/wp-admin/includes/class-wp-debug-data.php @@ -330,7 +330,7 @@ class WP_Debug_Data { // Here 20 seconds is a "sensible default" for how long to make the user wait for the directory size calculation. // When testing 20 seconds seem enough in nearly all cases. The remaining edge cases are likely testing or development sites // that have very large number of files, for example `node_modules` in plugins or themes, etc. - if ( $max_execution_time > 20 ) { + if ( $max_execution_time > 20 ) { $max_execution_time = 20; } elseif ( $max_execution_time > 2 ) { // If the max_execution_time is set to lower than 20 seconds, reduce it a bit to prevent @@ -357,9 +357,9 @@ class WP_Debug_Data { ), ); - $timeout = __( 'The directory size calculation has timed out. Usually caused by a very large number of sub-directories and files.' ); + $timeout = __( 'The directory size calculation has timed out. Usually caused by a very large number of sub-directories and files.' ); $inaccessible = __( 'The size cannot be calculated. The directory is not accessible. Usually caused by invalid permissions.' ); - $size_total = 0; + $size_total = 0; // Loop over all the directories we want to gather the sizes for. foreach ( $size_directories as $size => $attributes ) { @@ -371,15 +371,16 @@ class WP_Debug_Data { if ( $dir_size === false ) { // Error reading - $dir_size = $inaccessible; + $dir_size = $inaccessible; $size_total = null; } elseif ( $dir_size === null ) { // Timeout - $dir_size = $timeout; + $dir_size = $timeout; $size_total = null; } else { $is_subdir = ( strpos( $size_directories[ $size ]['path'], ABSPATH ) === 0 ); + // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled if ( $size_total !== null && ( $size === 'wordpress' || ! $is_subdir ) ) { $size_total += $dir_size; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 4ca20e873f..b5f8f09b81 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45105'; +$wp_version = '5.2-beta1-45106'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.