Update PHPDOC colors

This commit is contained in:
Maarten 2019-12-24 02:25:59 +01:00
parent f56bc7952a
commit 032d8ff101

View file

@ -48,22 +48,22 @@ trait Colors {
/** /**
* @param $string * @param $string
* @param null $foreground_color * @param null $foreground
* @param null $background_color * @param null $background
* @return string * @return string
*/ */
public function printColor($string, $foreground_color = null, $background_color = null) public function printColor($string, $foreground = null, $background = null)
{ {
$this->setColors(); $this->setColors();
$colored_string = ""; $colored_string = "";
if (isset($this->foreground_colors[$foreground_color])) { if (isset($this->foreground_colors[$foreground])) {
$colored_string .= "\033[" . $this->foreground_colors[$foreground_color] . "m"; $colored_string .= "\033[" . $this->foreground_colors[$foreground] . "m";
} }
if (isset($this->background_colors[$background_color])) { if (isset($this->background_colors[$background])) {
$colored_string .= "\033[" . $this->background_colors[$background_color] . "m"; $colored_string .= "\033[" . $this->background_colors[$background] . "m";
} }