From e3d3b56dad3b4a147e112beb98224f501f5b5cda Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Mon, 5 Aug 2024 10:50:23 +0545 Subject: [PATCH] Update prefixes --- .../Sniffs/NamingConventions/PrefixAllGlobalsSniff.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php b/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php index dd3aec69f..84d80fc16 100644 --- a/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +++ b/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php @@ -490,13 +490,13 @@ public function process_token( $stackPtr ) { $this->prefixes = RulesetPropertyHelper::merge_custom_array( $this->prefixes, array(), false ); if ( empty( $this->prefixes ) ) { // No prefixes passed, nothing to do. - return; + // return; } $this->validate_prefixes(); if ( empty( $this->validated_prefixes ) ) { // No _valid_ prefixes passed, nothing to do. - return; + // return; } // Ignore test classes. @@ -578,6 +578,8 @@ public function process_token( $stackPtr ) { } } + var_dump( $namespace_name ); + // Still here ? In that case, we have a non-prefixed namespace name. $recorded = $this->phpcsFile->addError( self::ERROR_MSG, @@ -732,6 +734,8 @@ public function process_token( $stackPtr ) { return; } + var_dump( $item_name ); + $recorded = $this->phpcsFile->addError( self::ERROR_MSG, $stackPtr,