2023-07-29 14:04:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class CLI {
|
|
|
|
|
2023-07-29 14:22:25 +00:00
|
|
|
public static function brake() {
|
|
|
|
|
|
|
|
echo PHP_EOL;
|
|
|
|
}
|
|
|
|
|
2023-07-29 14:04:20 +00:00
|
|
|
public static function default(string $string) {
|
|
|
|
|
2023-07-29 14:22:25 +00:00
|
|
|
echo sprintf("%s", $string) . self::brake();
|
2023-07-29 14:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function notice(string $string) {
|
|
|
|
|
2023-07-29 14:31:53 +00:00
|
|
|
echo sprintf("\033[36m%s\033[0m", $string) . self::brake();
|
2023-07-29 14:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function warning(string $string) {
|
|
|
|
|
2023-07-29 14:22:25 +00:00
|
|
|
echo sprintf("\033[33m%s\033[0m", $string) . self::brake();
|
2023-07-29 14:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function danger(string $string) {
|
|
|
|
|
2023-07-29 14:22:25 +00:00
|
|
|
echo sprintf("\033[31m%s\033[31m", $string) . self::brake();
|
2023-07-29 14:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function success(string $string) {
|
|
|
|
|
2023-07-29 14:22:25 +00:00
|
|
|
echo sprintf("\033[32m%s\033[32m", $string) . self::brake();
|
2023-07-29 14:04:20 +00:00
|
|
|
}
|
|
|
|
}
|