Skip to content

Commit

Permalink
Sniff::get_function_call_parameter(): PHPCSUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones committed Jun 20, 2023
1 parent cd3ec9e commit 4ab9c84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WordPressVIPMinimum/Sniffs/Constants/ConstantStringSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

namespace WordPressVIPMinimum\Sniffs\Constants;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use PHPCSUtils\Utils\PassedParameters;
use WordPressVIPMinimum\Sniffs\Sniff;

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

$param = $this->get_function_call_parameter( $stackPtr, 1 );
$param = PassedParameters::getParameter( $this->phpcsFile, $stackPtr, 1, 'constant_name' );
if ( $param === false ) {
// Target parameter not found.
return;
Expand Down

0 comments on commit 4ab9c84

Please sign in to comment.