From 7206a7fdfffbd340588de0f80725cbd839cb8c66 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 a7f2d8b919..eedf1107fc 100644 --- a/WordPress-Core/ruleset.xml +++ b/WordPress-Core/ruleset.xml @@ -516,6 +516,9 @@ + + +