WordPress/Sniffs/WP/DeprecatedParametersSniff.php
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {

		$this->get_wp_version_from_cl();

		$paramCount = \count( $parameters );
		foreach ( $this->target_functions[ $matched_content ] as $position => $parameter_args ) {

			// Check that number of parameters defined is not less than the position to check.
			if ( $position > $paramCount ) {
				break;
			}

			// The list will need to updated if the default value is not supported.
			switch ( $parameters[ $position ]['raw'] ) {
				case 'true':
					$matched_parameter = true;
					break;
				case 'false':
					$matched_parameter = false;
					break;
				case 'null':
					$matched_parameter = null;
					break;
				case 'array()':
				case '[]':
					$matched_parameter = array();
					break;
				default:
					$matched_parameter = $this->strip_quotes( $parameters[ $position ]['raw'] );
					break;
			}

			if ( $parameter_args['value'] === $matched_parameter ) {
				continue;
			}

			$message  = 'The parameter "%s" at position #%s of %s() has been deprecated since WordPress version %s.';
			$is_error = version_compare( $parameter_args['version'], $this->minimum_supported_version, '<' );
			$code     = $this->string_to_errorcode( ucfirst( $matched_content ) . 'Param' . $position . 'Found' );

			$data = array(
				$parameters[ $position ]['raw'],
				$position,
				$matched_content,
				$parameter_args['version'],
			);

			if ( isset( $parameter_args['value'] ) && $position < $paramCount ) {
				$message .= ' Use "%s" instead.';
				$data[]   = (string) $parameter_args['value'];
			} else {
				$message .= ' Instead do not pass the parameter.';
			}

			$this->addMessage( $message, $stackPtr, $is_error, $code, $data, 0 );
		}
	}
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {

		$this->get_wp_version_from_cl();

		$paramCount = \count( $parameters );
		foreach ( $this->target_functions[ $matched_content ] as $position => $parameter_args ) {

			// Check that number of parameters defined is not less than the position to check.
			if ( $position > $paramCount ) {
				break;
			}

			// The list will need to updated if the default value is not supported.
			switch ( $parameters[ $position ]['raw'] ) {
				case 'true':
					$matched_parameter = true;
					break;
				case 'false':
					$matched_parameter = false;
					break;
				case 'null':
					$matched_parameter = null;
					break;
				case 'array()':
				case '[]':
					$matched_parameter = array();
					break;
				default:
					$matched_parameter = $this->strip_quotes( $parameters[ $position ]['raw'] );
					break;
			}

			if ( $parameter_args['value'] === $matched_parameter ) {
				continue;
			}

			$message  = 'The parameter "%s" at position #%s of %s() has been deprecated since WordPress version %s.';
			$is_error = version_compare( $parameter_args['version'], $this->minimum_supported_version, '<' );
			$code     = $this->string_to_errorcode( ucfirst( $matched_content ) . 'Param' . $position . 'Found' );

			$data = array(
				$parameters[ $position ]['raw'],
				$position,
				$matched_content,
				$parameter_args['version'],
			);

			if ( isset( $parameter_args['value'] ) && $position < $paramCount ) {
				$message .= ' Use "%s" instead.';
				$data[]   = (string) $parameter_args['value'];
			} else {
				$message .= ' Instead do not pass the parameter.';
			}

			$this->addMessage( $message, $stackPtr, $is_error, $code, $data, 0 );
		}
	}
Process the parameters of a matched function.

@since 0.12.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