WPThemeReview/Sniffs/PluginTerritory/AdminBarRemovalSniff.php
protected function process_css_style( $stackPtr ) {
		if ( ! isset( $this->target_css_properties[ $this->tokens[ $stackPtr ]['content'] ] ) ) {
			// Not one of the CSS properties we're interested in.
			return;
		}

		$css_property = $this->target_css_properties[ $this->tokens[ $stackPtr ]['content'] ];

		// Check if the CSS selector matches.
		$opener = $this->phpcsFile->findPrevious( \T_OPEN_CURLY_BRACKET, $stackPtr );
		if ( false !== $opener ) {
			for ( $i = ( $opener - 1 ); $i >= 0; $i-- ) {
				if ( isset( Tokens::$commentTokens[ $this->tokens[ $i ]['code'] ] )
					|| \T_CLOSE_CURLY_BRACKET === $this->tokens[ $i ]['code']
				) {
					break;
				}
			}
			$start    = ( $i + 1 );
			$selector = trim( $this->phpcsFile->getTokensAsString( $start, ( $opener - $start ) ) );
			unset( $i );

			foreach ( $this->target_css_selectors as $target_selector ) {
				if ( false !== strpos( $selector, $target_selector ) ) {
					$error = true;

					if ( true === $this->remove_only ) {
						// Check the value of the CSS property.
						$valuePtr = $this->phpcsFile->findNext( array( \T_COLON, \T_WHITESPACE ), ( $stackPtr + 1 ), null, true );
						$value    = $this->tokens[ $valuePtr ]['content'];
						$valid    = $this->validate_css_property_value( $value, $css_property['type'], $css_property['value'] );
						if ( true === $valid ) {
							$error = false;
						}
					}

					if ( true === $error ) {
						$this->phpcsFile->addError( 'Hiding of the admin bar is not allowed.', $stackPtr, 'HidingDetected' );
					}
				}
			}
		}
	}
protected function process_css_style( $stackPtr ) {
		if ( ! isset( $this->target_css_properties[ $this->tokens[ $stackPtr ]['content'] ] ) ) {
			// Not one of the CSS properties we're interested in.
			return;
		}

		$css_property = $this->target_css_properties[ $this->tokens[ $stackPtr ]['content'] ];

		// Check if the CSS selector matches.
		$opener = $this->phpcsFile->findPrevious( \T_OPEN_CURLY_BRACKET, $stackPtr );
		if ( false !== $opener ) {
			for ( $i = ( $opener - 1 ); $i >= 0; $i-- ) {
				if ( isset( Tokens::$commentTokens[ $this->tokens[ $i ]['code'] ] )
					|| \T_CLOSE_CURLY_BRACKET === $this->tokens[ $i ]['code']
				) {
					break;
				}
			}
			$start    = ( $i + 1 );
			$selector = trim( $this->phpcsFile->getTokensAsString( $start, ( $opener - $start ) ) );
			unset( $i );

			foreach ( $this->target_css_selectors as $target_selector ) {
				if ( false !== strpos( $selector, $target_selector ) ) {
					$error = true;

					if ( true === $this->remove_only ) {
						// Check the value of the CSS property.
						$valuePtr = $this->phpcsFile->findNext( array( \T_COLON, \T_WHITESPACE ), ( $stackPtr + 1 ), null, true );
						$value    = $this->tokens[ $valuePtr ]['content'];
						$valid    = $this->validate_css_property_value( $value, $css_property['type'], $css_property['value'] );
						if ( true === $valid ) {
							$error = false;
						}
					}

					if ( true === $error ) {
						$this->phpcsFile->addError( 'Hiding of the admin bar is not allowed.', $stackPtr, 'HidingDetected' );
					}
				}
			}
		}
	}
Processes this test for T_STYLE tokens in CSS files.

@since WPCS 0.11.0

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

@return void