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

		// Check to see if a source ($src) is specified.
		if ( ! isset( $parameters[2] ) ) {
			return;
		}

		/*
		 * Version Check: Check to make sure the version is set explicitly.
		 */

		if ( ! isset( $parameters[4] ) || 'null' === $parameters[4]['raw'] ) {
			$type = 'script';
			if ( strpos( $matched_content, '_style' ) !== false ) {
				$type = 'style';
			}

			$this->phpcsFile->addError(
				'Resource version not set in call to %s(). This means new versions of the %s will not always be loaded due to browser caching.',
				$stackPtr,
				'MissingVersion',
				array( $matched_content, $type )
			);
		} else {
			// The version argument should have a non-false value.
			if ( $this->is_falsy( $parameters[4]['start'], $parameters[4]['end'] ) ) {
				$this->phpcsFile->addError(
					'Version parameter is not explicitly set or has been set to an equivalent of "false" for %s; ' .
					'This means that the WordPress core version will be used which is not recommended for plugin or theme development.',
					$stackPtr,
					'NoExplicitVersion',
					array( $matched_content )
				);
			}
		}

		/*
		 * In footer Check
		 *
		 * Check to make sure that $in_footer is set to true.
		 * It will warn the user to make sure it is intended.
		 *
		 * Only wp_register_script and wp_enqueue_script need this check,
		 * as this parameter is not available to wp_register_style and wp_enqueue_style.
		 */
		if ( 'wp_register_script' !== $matched_content && 'wp_enqueue_script' !== $matched_content ) {
			return;
		}

		if ( ! isset( $parameters[5] ) ) {
			// If in footer is not set, throw a warning about the default.
			$this->phpcsFile->addWarning(
				'In footer ($in_footer) is not set explicitly %s; ' .
				'It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.',
				$stackPtr,
				'NotInFooter',
				array( $matched_content )
			);
		}
	}
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {

		// Check to see if a source ($src) is specified.
		if ( ! isset( $parameters[2] ) ) {
			return;
		}

		/*
		 * Version Check: Check to make sure the version is set explicitly.
		 */

		if ( ! isset( $parameters[4] ) || 'null' === $parameters[4]['raw'] ) {
			$type = 'script';
			if ( strpos( $matched_content, '_style' ) !== false ) {
				$type = 'style';
			}

			$this->phpcsFile->addError(
				'Resource version not set in call to %s(). This means new versions of the %s will not always be loaded due to browser caching.',
				$stackPtr,
				'MissingVersion',
				array( $matched_content, $type )
			);
		} else {
			// The version argument should have a non-false value.
			if ( $this->is_falsy( $parameters[4]['start'], $parameters[4]['end'] ) ) {
				$this->phpcsFile->addError(
					'Version parameter is not explicitly set or has been set to an equivalent of "false" for %s; ' .
					'This means that the WordPress core version will be used which is not recommended for plugin or theme development.',
					$stackPtr,
					'NoExplicitVersion',
					array( $matched_content )
				);
			}
		}

		/*
		 * In footer Check
		 *
		 * Check to make sure that $in_footer is set to true.
		 * It will warn the user to make sure it is intended.
		 *
		 * Only wp_register_script and wp_enqueue_script need this check,
		 * as this parameter is not available to wp_register_style and wp_enqueue_style.
		 */
		if ( 'wp_register_script' !== $matched_content && 'wp_enqueue_script' !== $matched_content ) {
			return;
		}

		if ( ! isset( $parameters[5] ) ) {
			// If in footer is not set, throw a warning about the default.
			$this->phpcsFile->addWarning(
				'In footer ($in_footer) is not set explicitly %s; ' .
				'It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.',
				$stackPtr,
				'NotInFooter',
				array( $matched_content )
			);
		}
	}
Process the parameters of a matched function.

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