public function setUseColor($useColor)
{
if (null === $useColor) {
$useColor = $this->featureDetector->isSupported('stdout.ansi');
}
if ($useColor) {
$this->reset = "[0m";
$this->bold = "[1m";
$this->faint = "[2m";
$this->passStart = "[32m";
$this->failStart = "[31m";
$this->pass = $this->passStart . self::PASS . $this->reset;
$this->fail = $this->failStart . self::FAIL . $this->reset;
$this->addStart = "[33m[2m{+[0m[33m";
$this->addEnd = "[2m+}[0m";
$this->removeStart = "[36m[2m[-[0m[36m";
$this->removeEnd = "[2m-][0m";
} else {
$this->reset = '';
$this->bold = '';
$this->faint = '';
$this->passStart = '';
$this->failStart = '';
$this->pass = self::PASS;
$this->fail = self::FAIL;
$this->addStart = '{+';
$this->addEnd = '+}';
$this->removeStart = '[-';
$this->removeEnd = '-]';
}
}