From bf049fd9dbbec52b27c2bceb938b592a03de906d Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 22 Jul 2022 14:46:07 +0200 Subject: [PATCH] Core: add sniffs to check there is no blank line before a function close brace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > 1. There should be no blank line between the content of a function and the function’s closing brace. Includes removing this rule from the WPCS native ruleset in which we already enforced it (as it will now be inherited from the `WordPress` ruleset). Refs: * https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/ - Function closing brace section * https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#remove-trailing-spaces * https://github.com/WordPress/wpcs-docs/pull/110 Loosely related to #1101 --- .phpcs.xml.dist | 2 -- WordPress-Core/ruleset.xml | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 6a4fba088f..08c86032b1 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -30,8 +30,6 @@ - - diff --git a/WordPress-Core/ruleset.xml b/WordPress-Core/ruleset.xml index 50aa707511..c567d7b975 100644 --- a/WordPress-Core/ruleset.xml +++ b/WordPress-Core/ruleset.xml @@ -294,6 +294,10 @@ + + + +