CLI_Command::get_update_type_str()privateWP-CLI 1.0

Get a string representing the type of update being checked for.

Method of the class: CLI_Command{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->get_update_type_str( $assoc_args );
$assoc_args (required)
-

CLI_Command::get_update_type_str() code WP-CLI 2.8.0-alpha

private function get_update_type_str( $assoc_args ) {
	$update_type = ' ';
	foreach ( [ 'major', 'minor', 'patch' ] as $type ) {
		if ( true === Utils\get_flag_value( $assoc_args, $type ) ) {
			$update_type = ' ' . $type . ' ';
			break;
		}
	}
	return $update_type;
}