SilverStripeBuildTask::formatWithColor
Formats a buffer with a specified ANSI color sequence if colors are enabled. (Taken from PHPUnit)
eg. $this->formatWithColor("fg-white, bg-red", "ERROR") $this->formatWithColor("fg-black, bg-green", "SUCCESS");
Signature
protected function formatWithColor(string
$color,
string
$buffer )
Parameters
$color
— string$buffer
— string
Returns
- string