Skip to content

Commit 7f4c63d

Browse files
authored
Merge pull request #868 from Automattic/feature/security-underscorejs-use-utils-1.1.0
2 parents 45bf583 + 75113e0 commit 7f4c63d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WordPressVIPMinimum/Sniffs/Security/UnderscorejsSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace WordPressVIPMinimum\Sniffs\Security;
1111

1212
use PHP_CodeSniffer\Util\Tokens;
13+
use PHPCSUtils\Utils\FilePath;
1314
use PHPCSUtils\Utils\TextStrings;
1415
use WordPressVIPMinimum\Sniffs\Sniff;
1516

@@ -72,7 +73,7 @@ public function process_token( $stackPtr ) {
7273
/*
7374
* Ignore Gruntfile.js files as they are configuration, not code.
7475
*/
75-
$file_name = TextStrings::stripQuotes( $this->phpcsFile->getFileName() );
76+
$file_name = FilePath::getName( $this->phpcsFile );
7677
$file_name = strtolower( basename( $file_name ) );
7778

7879
if ( $file_name === 'gruntfile.js' ) {

0 commit comments

Comments
 (0)