From fd580cf059ff5ef92edc0c496cd1bcb0d598e9ce Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 19 Jun 2023 20:51:12 +0200 Subject: [PATCH 1/2] Core: add new sniff to check formatting of OO declaration statement See 2254 for a detailed discussion of all options considered. Fixes 2254 --- WordPress-Core/ruleset.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/WordPress-Core/ruleset.xml b/WordPress-Core/ruleset.xml index ee3be945eb..52ec1c2d32 100644 --- a/WordPress-Core/ruleset.xml +++ b/WordPress-Core/ruleset.xml @@ -778,6 +778,18 @@ + + + + + 0 + + + + 0 + + From 619173bcb13b1db1d939a73d75fbcc3f9c1f8e82 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 19 Jun 2023 20:56:25 +0200 Subject: [PATCH 2/2] CS: fix up own codebase to comply with class rules --- Tests/RulesetCheck/class-ruleset-test.inc | 1 - WordPress/AbstractArrayAssignmentRestrictionsSniff.php | 1 - WordPress/AbstractFunctionRestrictionsSniff.php | 1 - WordPress/Helpers/IsUnitTestTrait.php | 1 - WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php | 1 - WordPress/Sniffs/Arrays/ArrayIndentationSniff.php | 1 - WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php | 1 - WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php | 1 - WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php | 1 - WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php | 1 - WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php | 1 - WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php | 1 - WordPress/Sniffs/DB/PreparedSQLSniff.php | 1 - WordPress/Sniffs/DB/RestrictedClassesSniff.php | 1 - WordPress/Sniffs/DB/RestrictedFunctionsSniff.php | 1 - WordPress/Sniffs/DB/SlowDBQuerySniff.php | 1 - WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php | 1 - WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php | 1 - WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php | 1 - WordPress/Sniffs/PHP/DontExtractSniff.php | 1 - WordPress/Sniffs/PHP/POSIXFunctionsSniff.php | 1 - WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php | 1 - WordPress/Sniffs/PHP/TypeCastsSniff.php | 1 - WordPress/Sniffs/PHP/YodaConditionsSniff.php | 1 - WordPress/Sniffs/Security/NonceVerificationSniff.php | 1 - WordPress/Sniffs/Security/PluginMenuSlugSniff.php | 1 - WordPress/Sniffs/Security/SafeRedirectSniff.php | 1 - WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php | 1 - WordPress/Sniffs/WP/CapabilitiesSniff.php | 1 - WordPress/Sniffs/WP/CapitalPDangitSniff.php | 1 - WordPress/Sniffs/WP/CronIntervalSniff.php | 1 - WordPress/Sniffs/WP/DeprecatedClassesSniff.php | 1 - WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php | 1 - WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php | 1 - WordPress/Sniffs/WP/DiscouragedConstantsSniff.php | 1 - WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php | 1 - WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php | 1 - WordPress/Sniffs/WP/PostsPerPageSniff.php | 1 - WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php | 1 - WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php | 1 - WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php | 1 - WordPress/Tests/Arrays/ArrayDeclarationSpacingUnitTest.php | 1 - WordPress/Tests/Arrays/ArrayIndentationUnitTest.php | 1 - WordPress/Tests/Arrays/ArrayKeySpacingRestrictionsUnitTest.php | 1 - WordPress/Tests/Arrays/CommaAfterArrayItemUnitTest.php | 1 - WordPress/Tests/Arrays/MultipleStatementAlignmentUnitTest.php | 1 - WordPress/Tests/CodeAnalysis/EscapedNotTranslatedUnitTest.php | 1 - WordPress/Tests/DB/PreparedSQLPlaceholdersUnitTest.php | 1 - WordPress/Tests/DB/RestrictedClassesUnitTest.php | 1 - WordPress/Tests/DB/RestrictedFunctionsUnitTest.php | 1 - WordPress/Tests/DB/SlowDBQueryUnitTest.php | 1 - WordPress/Tests/DateTime/RestrictedFunctionsUnitTest.php | 1 - WordPress/Tests/Files/FileNameUnitTest.php | 1 - WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.php | 1 - WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php | 1 - WordPress/Tests/PHP/DevelopmentFunctionsUnitTest.php | 1 - WordPress/Tests/PHP/DiscouragedPHPFunctionsUnitTest.php | 1 - WordPress/Tests/PHP/DontExtractUnitTest.php | 1 - WordPress/Tests/PHP/POSIXFunctionsUnitTest.php | 1 - WordPress/Tests/PHP/RestrictedPHPFunctionsUnitTest.php | 1 - WordPress/Tests/PHP/YodaConditionsUnitTest.php | 1 - WordPress/Tests/Security/EscapeOutputUnitTest.php | 1 - WordPress/Tests/Security/SafeRedirectUnitTest.php | 1 - WordPress/Tests/Security/ValidatedSanitizedInputUnitTest.php | 1 - WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php | 1 - WordPress/Tests/WP/DeprecatedClassesUnitTest.php | 1 - WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php | 1 - WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.php | 1 - WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.php | 1 - WordPress/Tests/WP/I18nUnitTest.php | 1 - WordPress/Tests/WP/PostsPerPageUnitTest.php | 1 - WordPress/Tests/WhiteSpace/CastStructureSpacingUnitTest.php | 1 - WordPress/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php | 1 - WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.php | 1 - 74 files changed, 74 deletions(-) diff --git a/Tests/RulesetCheck/class-ruleset-test.inc b/Tests/RulesetCheck/class-ruleset-test.inc index 42af57dd25..86cc3770cc 100644 --- a/Tests/RulesetCheck/class-ruleset-test.inc +++ b/Tests/RulesetCheck/class-ruleset-test.inc @@ -110,5 +110,4 @@ class Ruleset_Test { end: echo 'This is a goto - it needs to be here to prevent parse errors'; } - } diff --git a/WordPress/AbstractArrayAssignmentRestrictionsSniff.php b/WordPress/AbstractArrayAssignmentRestrictionsSniff.php index 82e5238db3..223b5e1bfa 100644 --- a/WordPress/AbstractArrayAssignmentRestrictionsSniff.php +++ b/WordPress/AbstractArrayAssignmentRestrictionsSniff.php @@ -240,5 +240,4 @@ public function process_token( $stackPtr ) { * with custom error message passed to ->process(). */ abstract public function callback( $key, $val, $line, $group ); - } diff --git a/WordPress/AbstractFunctionRestrictionsSniff.php b/WordPress/AbstractFunctionRestrictionsSniff.php index 0746e7078d..d9f1c1774e 100644 --- a/WordPress/AbstractFunctionRestrictionsSniff.php +++ b/WordPress/AbstractFunctionRestrictionsSniff.php @@ -356,5 +356,4 @@ protected function prepare_name_for_regex( $function_name ) { return $function_name; } - } diff --git a/WordPress/Helpers/IsUnitTestTrait.php b/WordPress/Helpers/IsUnitTestTrait.php index a0636d7b26..e4a0869b92 100644 --- a/WordPress/Helpers/IsUnitTestTrait.php +++ b/WordPress/Helpers/IsUnitTestTrait.php @@ -178,5 +178,4 @@ protected function is_test_class( File $phpcsFile, $stackPtr ) { return false; } - } diff --git a/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php b/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php index 6cab1ae48b..f6d2fb873b 100644 --- a/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php +++ b/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php @@ -466,5 +466,4 @@ protected function process_multi_line_array( $stackPtr, $opener, $closer ) { $end_of_last_item = $end_of_this_item; } } - } diff --git a/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php b/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php index 0661baa627..2fc990c44a 100644 --- a/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php +++ b/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php @@ -545,5 +545,4 @@ protected function fix_alignment_error( $ptr, $new_indent ) { $this->phpcsFile->fixer->replaceToken( ( $ptr - 1 ), $new_indent ); } } - } diff --git a/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php b/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php index 04035457ef..6e4170d8aa 100644 --- a/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php +++ b/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php @@ -173,5 +173,4 @@ public function process_token( $stackPtr ) { } } } - } diff --git a/WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php b/WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php index 24e619cccc..c1376b3df0 100644 --- a/WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php +++ b/WordPress/Sniffs/Arrays/CommaAfterArrayItemSniff.php @@ -309,5 +309,4 @@ public function process_token( $stackPtr ) { } } } - } diff --git a/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php b/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php index d3a86894f1..482889ff01 100644 --- a/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php +++ b/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php @@ -580,5 +580,4 @@ protected function validate_align_multiline_items() { // Reset to the default if an invalid value was received. $this->alignMultilineItems = 'always'; } - } diff --git a/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php b/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php index 00cd83b68c..cca0a8c50d 100644 --- a/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +++ b/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php @@ -87,5 +87,4 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p $data ); } - } diff --git a/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php b/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php index c7ce36980b..eb92cd565f 100644 --- a/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php +++ b/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php @@ -297,5 +297,4 @@ protected function mergeFunctionLists() { $this->addedCustomFunctions['cachedelete'] = $this->customCacheDeleteFunctions; } } - } diff --git a/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php b/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php index 7d5e0f2235..eff3a2b643 100644 --- a/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php +++ b/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php @@ -654,5 +654,4 @@ protected function analyse_implode( $implode_token ) { return (bool) preg_match( '`^(["\'])%[dfFs]\1$`', $array_fill_params[3]['raw'] ); } - } diff --git a/WordPress/Sniffs/DB/PreparedSQLSniff.php b/WordPress/Sniffs/DB/PreparedSQLSniff.php index 582cd9cc81..194953584e 100644 --- a/WordPress/Sniffs/DB/PreparedSQLSniff.php +++ b/WordPress/Sniffs/DB/PreparedSQLSniff.php @@ -241,5 +241,4 @@ function ( $symbol ) { return $this->end; } - } diff --git a/WordPress/Sniffs/DB/RestrictedClassesSniff.php b/WordPress/Sniffs/DB/RestrictedClassesSniff.php index 2c4dd33426..c82fda81db 100644 --- a/WordPress/Sniffs/DB/RestrictedClassesSniff.php +++ b/WordPress/Sniffs/DB/RestrictedClassesSniff.php @@ -56,5 +56,4 @@ public function getGroups() { ); } - } diff --git a/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php b/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php index 7bdaa0e520..de46d596d6 100644 --- a/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php +++ b/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php @@ -62,5 +62,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/DB/SlowDBQuerySniff.php b/WordPress/Sniffs/DB/SlowDBQuerySniff.php index 6f4c0c2af2..e57409eb1d 100644 --- a/WordPress/Sniffs/DB/SlowDBQuerySniff.php +++ b/WordPress/Sniffs/DB/SlowDBQuerySniff.php @@ -58,5 +58,4 @@ public function getGroups() { public function callback( $key, $val, $line, $group ) { return true; } - } diff --git a/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php b/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php index b09fed969a..4a31a4bbd6 100644 --- a/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php +++ b/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php @@ -58,5 +58,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php b/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php index 5239078245..a41ca2d168 100644 --- a/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php +++ b/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php @@ -62,5 +62,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php b/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php index 8f224880e8..e32e28709c 100644 --- a/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php +++ b/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php @@ -99,5 +99,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/PHP/DontExtractSniff.php b/WordPress/Sniffs/PHP/DontExtractSniff.php index 63fdf37f8c..33ca9b48c3 100644 --- a/WordPress/Sniffs/PHP/DontExtractSniff.php +++ b/WordPress/Sniffs/PHP/DontExtractSniff.php @@ -51,5 +51,4 @@ public function getGroups() { ); } - } diff --git a/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php b/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php index d998fe12c4..71957f210f 100644 --- a/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php +++ b/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php @@ -72,5 +72,4 @@ public function getGroups() { ); } - } diff --git a/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php b/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php index 52c76398f8..c3296a1661 100644 --- a/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php +++ b/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php @@ -44,5 +44,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/PHP/TypeCastsSniff.php b/WordPress/Sniffs/PHP/TypeCastsSniff.php index 74bf70ae8f..7c29af2e79 100644 --- a/WordPress/Sniffs/PHP/TypeCastsSniff.php +++ b/WordPress/Sniffs/PHP/TypeCastsSniff.php @@ -89,5 +89,4 @@ public function process_token( $stackPtr ) { break; } } - } diff --git a/WordPress/Sniffs/PHP/YodaConditionsSniff.php b/WordPress/Sniffs/PHP/YodaConditionsSniff.php index 821a68d1d2..81cf7e7fba 100644 --- a/WordPress/Sniffs/PHP/YodaConditionsSniff.php +++ b/WordPress/Sniffs/PHP/YodaConditionsSniff.php @@ -123,5 +123,4 @@ public function process_token( $stackPtr ) { $this->phpcsFile->addError( 'Use Yoda Condition checks, you must.', $stackPtr, 'NotYoda' ); } - } diff --git a/WordPress/Sniffs/Security/NonceVerificationSniff.php b/WordPress/Sniffs/Security/NonceVerificationSniff.php index ef33fb3fb6..f714f46c07 100644 --- a/WordPress/Sniffs/Security/NonceVerificationSniff.php +++ b/WordPress/Sniffs/Security/NonceVerificationSniff.php @@ -324,5 +324,4 @@ protected function mergeFunctionLists() { $this->addedCustomFunctions['unslashsanitize'] = $this->customUnslashingSanitizingFunctions; } } - } diff --git a/WordPress/Sniffs/Security/PluginMenuSlugSniff.php b/WordPress/Sniffs/Security/PluginMenuSlugSniff.php index b816b4c951..7f9fdacfe9 100644 --- a/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +++ b/WordPress/Sniffs/Security/PluginMenuSlugSniff.php @@ -124,5 +124,4 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p } } } - } diff --git a/WordPress/Sniffs/Security/SafeRedirectSniff.php b/WordPress/Sniffs/Security/SafeRedirectSniff.php index ac0ab9fc33..7aa8b9778e 100644 --- a/WordPress/Sniffs/Security/SafeRedirectSniff.php +++ b/WordPress/Sniffs/Security/SafeRedirectSniff.php @@ -44,5 +44,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php b/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php index f6994bb7e4..1132f3c278 100644 --- a/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php +++ b/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php @@ -231,5 +231,4 @@ protected function mergeFunctionLists() { $this->addedCustomFunctions['unslashsanitize'] = $this->customUnslashingSanitizingFunctions; } } - } diff --git a/WordPress/Sniffs/WP/CapabilitiesSniff.php b/WordPress/Sniffs/WP/CapabilitiesSniff.php index 01e750d0e2..583a9e5160 100644 --- a/WordPress/Sniffs/WP/CapabilitiesSniff.php +++ b/WordPress/Sniffs/WP/CapabilitiesSniff.php @@ -477,5 +477,4 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p ) ); } - } diff --git a/WordPress/Sniffs/WP/CapitalPDangitSniff.php b/WordPress/Sniffs/WP/CapitalPDangitSniff.php index 678ea7dfcd..80938639dd 100644 --- a/WordPress/Sniffs/WP/CapitalPDangitSniff.php +++ b/WordPress/Sniffs/WP/CapitalPDangitSniff.php @@ -309,5 +309,4 @@ protected function retrieve_misspellings( $match_stack ) { return $misspelled; } - } diff --git a/WordPress/Sniffs/WP/CronIntervalSniff.php b/WordPress/Sniffs/WP/CronIntervalSniff.php index 055eccf02a..b67b9e7bf6 100644 --- a/WordPress/Sniffs/WP/CronIntervalSniff.php +++ b/WordPress/Sniffs/WP/CronIntervalSniff.php @@ -318,5 +318,4 @@ public function confused( $stackPtr ) { 'ChangeDetected' ); } - } diff --git a/WordPress/Sniffs/WP/DeprecatedClassesSniff.php b/WordPress/Sniffs/WP/DeprecatedClassesSniff.php index 072b77a4fe..b79ac75e1d 100644 --- a/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedClassesSniff.php @@ -121,5 +121,4 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content $data ); } - } diff --git a/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php b/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php index 1243fb40b2..c58390b665 100644 --- a/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php @@ -1550,5 +1550,4 @@ public function process_matched_token( $stackPtr, $group_name, $matched_content $data ); } - } diff --git a/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php b/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php index 8c37254247..fbe0d8a376 100644 --- a/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +++ b/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php @@ -288,5 +288,4 @@ protected function process_parameter( $matched_content, $parameter, $parameter_a $data ); } - } diff --git a/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php b/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php index 4d6bb403a1..40a0ad14bb 100644 --- a/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +++ b/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php @@ -237,5 +237,4 @@ public function process_parameters( $stackPtr, $group_name, $matched_content, $p ); } } - } diff --git a/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php b/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php index a8cc1ca0b1..18d338173f 100644 --- a/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php +++ b/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php @@ -53,5 +53,4 @@ public function getGroups() { ), ); } - } diff --git a/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php b/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php index 408a0ebf4c..c0a13b6f44 100644 --- a/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php +++ b/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php @@ -435,5 +435,4 @@ protected function add_error( $stackPtr, $data = array() ) { $data ); } - } diff --git a/WordPress/Sniffs/WP/PostsPerPageSniff.php b/WordPress/Sniffs/WP/PostsPerPageSniff.php index 942c65b835..30a4ec3104 100644 --- a/WordPress/Sniffs/WP/PostsPerPageSniff.php +++ b/WordPress/Sniffs/WP/PostsPerPageSniff.php @@ -74,5 +74,4 @@ public function callback( $key, $val, $line, $group ) { return false; } - } diff --git a/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php b/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php index b0e0c285f5..bf381c23a7 100755 --- a/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php +++ b/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php @@ -58,5 +58,4 @@ public function process_token( $stackPtr ) { } } } - } diff --git a/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php b/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php index 82822be62d..c95dc859fc 100644 --- a/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +++ b/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php @@ -575,5 +575,4 @@ public function process_token( $stackPtr ) { } } } - } diff --git a/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php b/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php index f7125bc0c0..b6d9c65709 100644 --- a/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php +++ b/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php @@ -59,5 +59,4 @@ public function register() { return $tokens; } - } diff --git a/WordPress/Tests/Arrays/ArrayDeclarationSpacingUnitTest.php b/WordPress/Tests/Arrays/ArrayDeclarationSpacingUnitTest.php index ea45ae434e..f613e70fae 100644 --- a/WordPress/Tests/Arrays/ArrayDeclarationSpacingUnitTest.php +++ b/WordPress/Tests/Arrays/ArrayDeclarationSpacingUnitTest.php @@ -111,5 +111,4 @@ public function getErrorList( $testFile = '' ) { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Arrays/ArrayIndentationUnitTest.php b/WordPress/Tests/Arrays/ArrayIndentationUnitTest.php index 950c4b2506..40f093ff25 100644 --- a/WordPress/Tests/Arrays/ArrayIndentationUnitTest.php +++ b/WordPress/Tests/Arrays/ArrayIndentationUnitTest.php @@ -161,5 +161,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Arrays/ArrayKeySpacingRestrictionsUnitTest.php b/WordPress/Tests/Arrays/ArrayKeySpacingRestrictionsUnitTest.php index 2f871ad3db..5e9046ef9e 100644 --- a/WordPress/Tests/Arrays/ArrayKeySpacingRestrictionsUnitTest.php +++ b/WordPress/Tests/Arrays/ArrayKeySpacingRestrictionsUnitTest.php @@ -72,5 +72,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Arrays/CommaAfterArrayItemUnitTest.php b/WordPress/Tests/Arrays/CommaAfterArrayItemUnitTest.php index dd80994f62..33d99a69a6 100644 --- a/WordPress/Tests/Arrays/CommaAfterArrayItemUnitTest.php +++ b/WordPress/Tests/Arrays/CommaAfterArrayItemUnitTest.php @@ -88,5 +88,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Arrays/MultipleStatementAlignmentUnitTest.php b/WordPress/Tests/Arrays/MultipleStatementAlignmentUnitTest.php index 075df264a2..f00dd19969 100644 --- a/WordPress/Tests/Arrays/MultipleStatementAlignmentUnitTest.php +++ b/WordPress/Tests/Arrays/MultipleStatementAlignmentUnitTest.php @@ -170,5 +170,4 @@ public function getWarningList() { 570 => 1, ); } - } diff --git a/WordPress/Tests/CodeAnalysis/EscapedNotTranslatedUnitTest.php b/WordPress/Tests/CodeAnalysis/EscapedNotTranslatedUnitTest.php index 245ae7f17e..22a98a9613 100644 --- a/WordPress/Tests/CodeAnalysis/EscapedNotTranslatedUnitTest.php +++ b/WordPress/Tests/CodeAnalysis/EscapedNotTranslatedUnitTest.php @@ -43,5 +43,4 @@ public function getWarningList() { 8 => 1, ); } - } diff --git a/WordPress/Tests/DB/PreparedSQLPlaceholdersUnitTest.php b/WordPress/Tests/DB/PreparedSQLPlaceholdersUnitTest.php index 7c133a554a..a8d39416d1 100644 --- a/WordPress/Tests/DB/PreparedSQLPlaceholdersUnitTest.php +++ b/WordPress/Tests/DB/PreparedSQLPlaceholdersUnitTest.php @@ -97,5 +97,4 @@ public function getWarningList() { 177 => 1, ); } - } diff --git a/WordPress/Tests/DB/RestrictedClassesUnitTest.php b/WordPress/Tests/DB/RestrictedClassesUnitTest.php index 40fc100654..f062b9e31f 100644 --- a/WordPress/Tests/DB/RestrictedClassesUnitTest.php +++ b/WordPress/Tests/DB/RestrictedClassesUnitTest.php @@ -162,5 +162,4 @@ public function getErrorList( $testFile = '' ) { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/DB/RestrictedFunctionsUnitTest.php b/WordPress/Tests/DB/RestrictedFunctionsUnitTest.php index 6d1d2a9e0f..43e68f8012 100644 --- a/WordPress/Tests/DB/RestrictedFunctionsUnitTest.php +++ b/WordPress/Tests/DB/RestrictedFunctionsUnitTest.php @@ -125,5 +125,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/DB/SlowDBQueryUnitTest.php b/WordPress/Tests/DB/SlowDBQueryUnitTest.php index 94aa230564..78112fd45a 100644 --- a/WordPress/Tests/DB/SlowDBQueryUnitTest.php +++ b/WordPress/Tests/DB/SlowDBQueryUnitTest.php @@ -48,5 +48,4 @@ public function getWarningList() { 19 => 2, ); } - } diff --git a/WordPress/Tests/DateTime/RestrictedFunctionsUnitTest.php b/WordPress/Tests/DateTime/RestrictedFunctionsUnitTest.php index 97a90bed48..f46d099aec 100644 --- a/WordPress/Tests/DateTime/RestrictedFunctionsUnitTest.php +++ b/WordPress/Tests/DateTime/RestrictedFunctionsUnitTest.php @@ -42,5 +42,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Files/FileNameUnitTest.php b/WordPress/Tests/Files/FileNameUnitTest.php index e29d57099a..13909316cf 100644 --- a/WordPress/Tests/Files/FileNameUnitTest.php +++ b/WordPress/Tests/Files/FileNameUnitTest.php @@ -158,5 +158,4 @@ public function getErrorList( $testFile = '' ) { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.php b/WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.php index 03408c53e1..444754d96d 100644 --- a/WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.php +++ b/WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.php @@ -166,5 +166,4 @@ public function getWarningList( $testFile = 'PrefixAllGlobalsUnitTest.1.inc' ) { return array(); } } - } diff --git a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php index e69b1dd8f5..467924b686 100644 --- a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php +++ b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -110,5 +110,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/PHP/DevelopmentFunctionsUnitTest.php b/WordPress/Tests/PHP/DevelopmentFunctionsUnitTest.php index efc4b9c919..4fe6a62f9a 100644 --- a/WordPress/Tests/PHP/DevelopmentFunctionsUnitTest.php +++ b/WordPress/Tests/PHP/DevelopmentFunctionsUnitTest.php @@ -56,5 +56,4 @@ public function getWarningList() { 34 => 1, ); } - } diff --git a/WordPress/Tests/PHP/DiscouragedPHPFunctionsUnitTest.php b/WordPress/Tests/PHP/DiscouragedPHPFunctionsUnitTest.php index 019996f116..639ff11f09 100644 --- a/WordPress/Tests/PHP/DiscouragedPHPFunctionsUnitTest.php +++ b/WordPress/Tests/PHP/DiscouragedPHPFunctionsUnitTest.php @@ -64,5 +64,4 @@ public function getWarningList() { 39 => 1, ); } - } diff --git a/WordPress/Tests/PHP/DontExtractUnitTest.php b/WordPress/Tests/PHP/DontExtractUnitTest.php index 45d63f6de0..7079ce6e73 100644 --- a/WordPress/Tests/PHP/DontExtractUnitTest.php +++ b/WordPress/Tests/PHP/DontExtractUnitTest.php @@ -43,5 +43,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/PHP/POSIXFunctionsUnitTest.php b/WordPress/Tests/PHP/POSIXFunctionsUnitTest.php index c24ceda461..738c85e7d7 100644 --- a/WordPress/Tests/PHP/POSIXFunctionsUnitTest.php +++ b/WordPress/Tests/PHP/POSIXFunctionsUnitTest.php @@ -48,5 +48,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/PHP/RestrictedPHPFunctionsUnitTest.php b/WordPress/Tests/PHP/RestrictedPHPFunctionsUnitTest.php index ea4aa098ce..cc3ac3e63e 100644 --- a/WordPress/Tests/PHP/RestrictedPHPFunctionsUnitTest.php +++ b/WordPress/Tests/PHP/RestrictedPHPFunctionsUnitTest.php @@ -41,5 +41,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/PHP/YodaConditionsUnitTest.php b/WordPress/Tests/PHP/YodaConditionsUnitTest.php index eac33f7a8a..98bd027f86 100644 --- a/WordPress/Tests/PHP/YodaConditionsUnitTest.php +++ b/WordPress/Tests/PHP/YodaConditionsUnitTest.php @@ -60,5 +60,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Security/EscapeOutputUnitTest.php b/WordPress/Tests/Security/EscapeOutputUnitTest.php index 187d0e7b92..86f553b7d0 100644 --- a/WordPress/Tests/Security/EscapeOutputUnitTest.php +++ b/WordPress/Tests/Security/EscapeOutputUnitTest.php @@ -106,5 +106,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Security/SafeRedirectUnitTest.php b/WordPress/Tests/Security/SafeRedirectUnitTest.php index 0cf00822e3..faac0d90aa 100644 --- a/WordPress/Tests/Security/SafeRedirectUnitTest.php +++ b/WordPress/Tests/Security/SafeRedirectUnitTest.php @@ -41,5 +41,4 @@ public function getWarningList() { 3 => 1, ); } - } diff --git a/WordPress/Tests/Security/ValidatedSanitizedInputUnitTest.php b/WordPress/Tests/Security/ValidatedSanitizedInputUnitTest.php index ab4574aff0..e3212bfbc8 100644 --- a/WordPress/Tests/Security/ValidatedSanitizedInputUnitTest.php +++ b/WordPress/Tests/Security/ValidatedSanitizedInputUnitTest.php @@ -97,5 +97,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php b/WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php index dd0c6dc488..4da81a10df 100644 --- a/WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php +++ b/WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php @@ -197,5 +197,4 @@ public function getWarningList( $testFile = '' ) { return array(); } } - } diff --git a/WordPress/Tests/WP/DeprecatedClassesUnitTest.php b/WordPress/Tests/WP/DeprecatedClassesUnitTest.php index c6da2e5634..f993d053a4 100644 --- a/WordPress/Tests/WP/DeprecatedClassesUnitTest.php +++ b/WordPress/Tests/WP/DeprecatedClassesUnitTest.php @@ -47,5 +47,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php b/WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php index 700fb821fe..3baf2a909d 100644 --- a/WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php +++ b/WordPress/Tests/WP/DeprecatedFunctionsUnitTest.php @@ -105,5 +105,4 @@ public function getWarningList() { return $warnings; } - } diff --git a/WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.php b/WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.php index 8866c29979..2685e41a49 100644 --- a/WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.php +++ b/WordPress/Tests/WP/DeprecatedParameterValuesUnitTest.php @@ -65,5 +65,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.php b/WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.php index f063f11c13..f7f62834fd 100644 --- a/WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.php +++ b/WordPress/Tests/WP/GlobalVariablesOverrideUnitTest.php @@ -104,5 +104,4 @@ public function getErrorList( $testFile = '' ) { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/WP/I18nUnitTest.php b/WordPress/Tests/WP/I18nUnitTest.php index 99c214afd9..925eae6d93 100644 --- a/WordPress/Tests/WP/I18nUnitTest.php +++ b/WordPress/Tests/WP/I18nUnitTest.php @@ -235,5 +235,4 @@ public function getWarningList( $testFile = '' ) { return array(); } } - } diff --git a/WordPress/Tests/WP/PostsPerPageUnitTest.php b/WordPress/Tests/WP/PostsPerPageUnitTest.php index 42ea579a78..442ae259cd 100644 --- a/WordPress/Tests/WP/PostsPerPageUnitTest.php +++ b/WordPress/Tests/WP/PostsPerPageUnitTest.php @@ -53,5 +53,4 @@ public function getWarningList() { 29 => 1, ); } - } diff --git a/WordPress/Tests/WhiteSpace/CastStructureSpacingUnitTest.php b/WordPress/Tests/WhiteSpace/CastStructureSpacingUnitTest.php index 90ca0000dd..1b80f7e0aa 100644 --- a/WordPress/Tests/WhiteSpace/CastStructureSpacingUnitTest.php +++ b/WordPress/Tests/WhiteSpace/CastStructureSpacingUnitTest.php @@ -48,5 +48,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php b/WordPress/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php index 1cd2bde66c..58e7cf7265 100644 --- a/WordPress/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php +++ b/WordPress/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php @@ -96,5 +96,4 @@ public function getErrorList( $testFile = '' ) { public function getWarningList() { return array(); } - } diff --git a/WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.php b/WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.php index aa60ee4cd6..8fa8dddd3c 100644 --- a/WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.php +++ b/WordPress/Tests/WhiteSpace/OperatorSpacingUnitTest.php @@ -55,5 +55,4 @@ public function getErrorList() { public function getWarningList() { return array(); } - }