public function is_targetted_token( $stackPtr ) {

		// Exclude function definitions, class methods, and namespaced calls.
		if ( \T_STRING === $this->tokens[ $stackPtr ]['code'] ) {
			if ( $this->is_class_object_call( $stackPtr ) === true ) {
				return false;
			}

			if ( $this->is_token_namespaced( $stackPtr ) === true ) {
				return false;
			}

			$prev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, ( $stackPtr - 1 ), null, true );

			if ( false !== $prev ) {
				// Skip sniffing if calling a same-named method, or on function definitions.
				$skipped = array(
					\T_FUNCTION        => \T_FUNCTION,
					\T_CLASS           => \T_CLASS,
					\T_AS              => \T_AS, // Use declaration alias.
				);

				if ( isset( $skipped[ $this->tokens[ $prev ]['code'] ] ) ) {
					return false;
				}
			}

			return true;
		}

		return false;
	}
public function is_targetted_token( $stackPtr ) {

		// Exclude function definitions, class methods, and namespaced calls.
		if ( \T_STRING === $this->tokens[ $stackPtr ]['code'] ) {
			if ( $this->is_class_object_call( $stackPtr ) === true ) {
				return false;
			}

			if ( $this->is_token_namespaced( $stackPtr ) === true ) {
				return false;
			}

			$prev = $this->phpcsFile->findPrevious( Tokens::$emptyTokens, ( $stackPtr - 1 ), null, true );

			if ( false !== $prev ) {
				// Skip sniffing if calling a same-named method, or on function definitions.
				$skipped = array(
					\T_FUNCTION        => \T_FUNCTION,
					\T_CLASS           => \T_CLASS,
					\T_AS              => \T_AS, // Use declaration alias.
				);

				if ( isset( $skipped[ $this->tokens[ $prev ]['code'] ] ) ) {
					return false;
				}
			}

			return true;
		}

		return false;
	}
public function is_targetted_token ( $ stackPtr ) { // Exclude function definitions, class methods, and namespaced calls. if ( \ T_STRING === $ this -> tokens [ $ stackPtr ] [ 'code' ] ) { if ( $ this -> is_class_object_call ( $ stackPtr ) === true ) { return false ; } if ( $ this -> is_token_namespaced ( $ stackPtr ) === true ) { return false ; } $ prev = $ this -> phpcsFile -> findPrevious ( Tokens :: $ emptyTokens , ( $ stackPtr - 1 ) , null , true ) ; if ( false !== $ prev ) { // Skip sniffing if calling a same-named method, or on function definitions. $ skipped = array ( \ T_FUNCTION => \ T_FUNCTION , \ T_CLASS => \ T_CLASS , \ T_AS => \ T_AS , // Use declaration alias. ) ; if ( isset ( $ skipped [ $ this -> tokens [ $ prev ] [ 'code' ] ] ) ) { return false ; } } return true ; } return false ; }
Verify is the current token is a function call.

@since 0.11.0 Split out from the `process()` method.

@param int $stackPtr The position of the current token in the stack.

@return bool
Verify is the current token is a function call .