Update PHPDOC colors
This commit is contained in:
parent
f56bc7952a
commit
032d8ff101
1 changed files with 7 additions and 7 deletions
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue