Skip to content

Commit b977416

Browse files
committed
Sniff::get_function_call_parameter(): PHPCSUtils
1 parent 0be82b9 commit b977416

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
namespace WordPressVIPMinimum\Sniffs\Constants;
1010

11-
use WordPressVIPMinimum\Sniffs\Sniff;
1211
use PHP_CodeSniffer\Util\Tokens;
12+
use PHPCSUtils\Utils\PassedParameters;
13+
use WordPressVIPMinimum\Sniffs\Sniff;
1314

1415
/**
1516
* Sniff for properly using constant name when checking whether a constant is defined.
@@ -55,7 +56,7 @@ public function process_token( $stackPtr ) {
5556
return;
5657
}
5758

58-
$param = $this->get_function_call_parameter( $stackPtr, 1 );
59+
$param = PassedParameters::getParameter( $this->phpcsFile, $stackPtr, 1, 'constant_name' );
5960
if ( $param === false ) {
6061
// Target parameter not found.
6162
return;

0 commit comments

Comments
 (0)