Browse Source

fix method name

main
ghost 1 year ago
parent
commit
43f53f0967
  1. 7
      cli/yggo.php
  2. 12
      library/cli.php

7
cli/yggo.php

@ -332,7 +332,7 @@ CLI::default(' \ / / __/ / __/ __ \/ /' ); @@ -332,7 +332,7 @@ CLI::default(' \ / / __/ / __/ __ \/ /' );
CLI::default(' / / /_/ / /_/ / /_/ /_/' );
CLI::default('/_/\____/\____/\____(_)' );
CLI::brake();
CLI::break();
CLI::default('available options:');
CLI::default(' help - this message');
@ -342,6 +342,9 @@ CLI::default(' snap reindex [purge] - sync DB/FS relations. optiona @@ -342,6 +342,9 @@ CLI::default(' snap reindex [purge] - sync DB/FS relations. optiona
CLI::default(' hostPage rank reindex - generate rank indexes in hostPage table');
CLI::default(' hostPageDom generate [selectors] - make hostPageDom index based on related hostPage.data field');
CLI::default(' hostPageDom truncate - flush hostPageDom table');
CLI::brake();
CLI::break();
CLI::default('get support: https://github.com/YGGverse/YGGo/issues');
CLI::break();
CLI::break();

12
library/cli.php

@ -2,33 +2,33 @@ @@ -2,33 +2,33 @@
class CLI {
public static function brake() {
public static function break() {
echo PHP_EOL;
}
public static function default(string $string) {
echo sprintf("%s", $string) . self::brake();
echo sprintf("%s", $string) . self::break();
}
public static function notice(string $string) {
echo sprintf("\033[36m%s\033[0m", $string) . self::brake();
echo sprintf("\033[36m%s\033[0m", $string) . self::break();
}
public static function warning(string $string) {
echo sprintf("\033[33m%s\033[0m", $string) . self::brake();
echo sprintf("\033[33m%s\033[0m", $string) . self::break();
}
public static function danger(string $string) {
echo sprintf("\033[31m%s\033[0m", $string) . self::brake();
echo sprintf("\033[31m%s\033[0m", $string) . self::break();
}
public static function success(string $string) {
echo sprintf("\033[32m%s\033[0m", $string) . self::brake();
echo sprintf("\033[32m%s\033[0m", $string) . self::break();
}
}
Loading…
Cancel
Save