WPThemeReview/Sniffs/PluginTerritory/AdminBarRemovalSniff.php
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
		$error = false;
		switch ( $matched_content ) {
			case 'show_admin_bar':
				$error = true;
				if ( true === $this->remove_only ) {
					if ( 'true' === $parameters[1]['raw'] ) {
						$error = false;
					}
				}
				break;

			case 'add_filter':
				$filter_name = $this->strip_quotes( $parameters[1]['raw'] );
				if ( 'show_admin_bar' !== $filter_name ) {
					break;
				}

				$error = true;
				if ( true === $this->remove_only && isset( $parameters[2]['raw'] ) ) {
					if ( '__return_true' === $this->strip_quotes( $parameters[2]['raw'] ) ) {
						$error = false;
					}
				}
				break;

			default:
				// Left empty on purpose.
				break;
		}

		if ( true === $error ) {
			$this->phpcsFile->addError( 'Removal of admin bar is prohibited.', $stackPtr, 'RemovalDetected' );
		}
	}
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
		$error = false;
		switch ( $matched_content ) {
			case 'show_admin_bar':
				$error = true;
				if ( true === $this->remove_only ) {
					if ( 'true' === $parameters[1]['raw'] ) {
						$error = false;
					}
				}
				break;

			case 'add_filter':
				$filter_name = $this->strip_quotes( $parameters[1]['raw'] );
				if ( 'show_admin_bar' !== $filter_name ) {
					break;
				}

				$error = true;
				if ( true === $this->remove_only && isset( $parameters[2]['raw'] ) ) {
					if ( '__return_true' === $this->strip_quotes( $parameters[2]['raw'] ) ) {
						$error = false;
					}
				}
				break;

			default:
				// Left empty on purpose.
				break;
		}

		if ( true === $error ) {
			$this->phpcsFile->addError( 'Removal of admin bar is prohibited.', $stackPtr, 'RemovalDetected' );
		}
	}
Process the parameters of a matched function.

@since WPCS 0.11.0

@param int    $stackPtr        The position of the current token in the stack.
@param array  $group_name      The name of the group which was matched.
@param string $matched_content The token content (function name) which was matched.
@param array  $parameters      Array with information about the parameters.

@return void