Skip to content

Commit 4fdb103

Browse files
committed
UserExperience/AdminBarRemoval: use PHPCSUtils for retrieving tokens as string
1 parent 8e4c149 commit 4fdb103

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WordPressVIPMinimum/Sniffs/UserExperience/AdminBarRemovalSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace WordPressVIPMinimum\Sniffs\UserExperience;
1111

12+
use PHPCSUtils\Utils\GetTokensAsString;
1213
use PHPCSUtils\Utils\TextStrings;
1314
use WordPressCS\WordPress\AbstractFunctionParameterSniff;
1415
use PHP_CodeSniffer\Util\Tokens;
@@ -344,7 +345,7 @@ protected function process_css_style( $stackPtr ) {
344345
}
345346
}
346347
$start = ( $i + 1 );
347-
$selector = trim( $this->phpcsFile->getTokensAsString( $start, $opener - $start ) );
348+
$selector = trim( GetTokensAsString::normal( $this->phpcsFile, $start, ( $opener - 1 ) ) );
348349
unset( $i );
349350

350351
foreach ( $this->target_css_selectors as $target_selector ) {

0 commit comments

Comments
 (0)