We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45bf583 + 75113e0 commit 7f4c63dCopy full SHA for 7f4c63d
WordPressVIPMinimum/Sniffs/Security/UnderscorejsSniff.php
@@ -10,6 +10,7 @@
10
namespace WordPressVIPMinimum\Sniffs\Security;
11
12
use PHP_CodeSniffer\Util\Tokens;
13
+use PHPCSUtils\Utils\FilePath;
14
use PHPCSUtils\Utils\TextStrings;
15
use WordPressVIPMinimum\Sniffs\Sniff;
16
@@ -72,7 +73,7 @@ public function process_token( $stackPtr ) {
72
73
/*
74
* Ignore Gruntfile.js files as they are configuration, not code.
75
*/
- $file_name = TextStrings::stripQuotes( $this->phpcsFile->getFileName() );
76
+ $file_name = FilePath::getName( $this->phpcsFile );
77
$file_name = strtolower( basename( $file_name ) );
78
79
if ( $file_name === 'gruntfile.js' ) {
0 commit comments