/**
* Class constructor
*
* @param boolean $noColors Defines non-colored mode on construct
*
* @since 4.0.0
*/
public function __construct($noColors = null)
{
if ($noColors === null) {
/*
* By default windows cmd.exe and PowerShell does not support ANSI-colored output
* if the variable is not set explicitly colors should be disabled on Windows
*/
$noColors = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
}
$this->noColors = $noColors;
$this->addPredefinedStyles();
}