From de9bf84ac94cf89c8374209d2e0265982b1c7a34 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Fri, 22 Jul 2022 16:38:20 +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 Loosely related to #1101 --- .phpcs.xml.dist | 2 -- WordPress-Core/ruleset.xml | 3 +++ 2 files changed, 3 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 22c7033993..7a87b27326 100644 --- a/WordPress-Core/ruleset.xml +++ b/WordPress-Core/ruleset.xml @@ -560,6 +560,9 @@ + + +