CLI_Command::get_update_type_str()
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() 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; }