WPThemeReview/Sniffs/ThouShallNotUse/ForbiddenIframeSniff.php
public function process( File $phpcsFile, $stackPtr ) {

		$tokens = $phpcsFile->getTokens();

		if ( preg_match( self::IFRAME_REGEX, $tokens[ $stackPtr ]['content'], $matches ) > 0 ) {
			$phpcsFile->addError(
				'Usage of the iframe HTML element is prohibited. Found: %s',
				$stackPtr,
				'Found',
				array( $matches[1] )
			);
		}
	}
public function process( File $phpcsFile, $stackPtr ) {

		$tokens = $phpcsFile->getTokens();

		if ( preg_match( self::IFRAME_REGEX, $tokens[ $stackPtr ]['content'], $matches ) > 0 ) {
			$phpcsFile->addError(
				'Usage of the iframe HTML element is prohibited. Found: %s',
				$stackPtr,
				'Found',
				array( $matches[1] )
			);
		}
	}
Processes this test, when one of its tokens is encountered.

@param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the
token was found.
@param int                         $stackPtr  The position of the current token
in the stack.

@return void