From f98bce865615216579a183b0398d430547294b2b Mon Sep 17 00:00:00 2001 From: Rayan Lucas Date: Tue, 22 Mar 2022 15:54:24 +0100 Subject: [PATCH] minify --- spish.phar | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/spish.phar b/spish.phar index 176cc80..6a4c265 100644 --- a/spish.phar +++ b/spish.phar @@ -121,14 +121,10 @@ class script_object { } // Returns all foreground color names - public function getForegroundColors() { - return array_keys($this->foreground_colors); - } + public function getForegroundColors() { return array_keys($this->foreground_colors); } // Returns all background color names - public function getBackgroundColors() { - return array_keys($this->background_colors); - } + public function getBackgroundColors() { return array_keys($this->background_colors); } public function clear(){ echo "\n"; echo chr(27).chr(91).'H'.chr(27).chr(91).'J'; @@ -138,12 +134,8 @@ class script_object { echo "\n"; return $this; } - public function hideKey(){ - system('stty -echo'); - } - public function showKey(){ - system('stty echo'); - } + public function hideKey(){ system('stty -echo'); } + public function showKey(){ system('stty echo'); } public function inputbool($prompt = '') { $prompt && print $prompt." "; $this->printStyle("(y/n) ","green"); @@ -158,8 +150,7 @@ class script_object { } public function input($prompt = '') { $prompt && print $prompt; - $line=str_replace(" -","",fgets(STDIN)); + $line=fgets(STDIN); $line=trim($line); return $line; } @@ -195,7 +186,7 @@ class gitInfo extends script_object{ } } class command extends gitInfo{ -public function version(){ + public function version(){ $this->print("current version ")->printStyle(VERSION,"green","",true); return $this; }