php/commands/src/CLI_Alias_Command.php
private function validate_input( $assoc_args, $grouping ) {
		// Check if valid arguments were passed.
		$arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );

		// Verify passed-arguments.
		if ( empty( $grouping ) && empty( $arg_match ) ) {
			WP_CLI::error( 'No valid arguments passed.' );
		}

		// Check whether passed arguments contain value or not.
		$assoc_arg_values = array_filter( array_intersect_key( $assoc_args, array_flip( $arg_match ) ) );

		if ( empty( $grouping ) && empty( $assoc_arg_values ) ) {
			WP_CLI::error( 'No value passed to arguments.' );
		}
	}
private function validate_input( $assoc_args, $grouping ) {
		// Check if valid arguments were passed.
		$arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );

		// Verify passed-arguments.
		if ( empty( $grouping ) && empty( $arg_match ) ) {
			WP_CLI::error( 'No valid arguments passed.' );
		}

		// Check whether passed arguments contain value or not.
		$assoc_arg_values = array_filter( array_intersect_key( $assoc_args, array_flip( $arg_match ) ) );

		if ( empty( $grouping ) && empty( $assoc_arg_values ) ) {
			WP_CLI::error( 'No value passed to arguments.' );
		}
	}
private function validate_input ( $ assoc_args , $ grouping ) { // Check if valid arguments were passed. $ arg_match = preg_grep ( '/^set-(\w+)/i' , array_keys ( $ assoc_args ) ) ; // Verify passed-arguments. if ( empty ( $ grouping ) && empty ( $ arg_match ) ) { WP_CLI :: error ( 'No valid arguments passed.' ) ; } // Check whether passed arguments contain value or not. $ assoc_arg_values = array_filter ( array_intersect_key ( $ assoc_args , array_flip ( $ arg_match ) ) ) ; if ( empty ( $ grouping ) && empty ( $ assoc_arg_values ) ) { WP_CLI :: error ( 'No value passed to arguments.' ) ; } }
Validate input of passed arguments.

@param array  $assoc_args Arguments array.
@param string $grouping   Grouping argument value.

@throws WP_CLI\ExitException
Validate input of passed arguments .