WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php
protected function add_error( $stackPtr, $data = array() ) {
		if ( empty( $data ) ) {
			$data[] = $this->tokens[ $stackPtr ]['content'];
		}

		$this->phpcsFile->addError(
			'Overriding WordPress globals is prohibited. Found assignment to %s',
			$stackPtr,
			'Prohibited',
			$data
		);
	}
protected function add_error( $stackPtr, $data = array() ) {
		if ( empty( $data ) ) {
			$data[] = $this->tokens[ $stackPtr ]['content'];
		}

		$this->phpcsFile->addError(
			'Overriding WordPress globals is prohibited. Found assignment to %s',
			$stackPtr,
			'Prohibited',
			$data
		);
	}
Add the error.

@since 1.1.0

@param int   $stackPtr The position of the token to throw the error for.
@param array $data     Optional. Array containing one entry holding the
name of the variable being overruled.
Defaults to the 'content' of the $stackPtr token.

@return void