Eloquent\Phony\Assertion\AssertionRenderer::setUseColor PHP Method

setUseColor() public method

Pass null to detect automatically.
public setUseColor ( boolean | null $useColor )
$useColor boolean | null True to use color.
    public function setUseColor($useColor)
    {
        if (null === $useColor) {
            $useColor = $this->featureDetector->isSupported('stdout.ansi');
        }
        if ($useColor) {
            $this->reset = "";
            $this->bold = "";
            $this->faint = "";
            $this->passStart = "";
            $this->failStart = "";
            $this->pass = $this->passStart . self::PASS . $this->reset;
            $this->fail = $this->failStart . self::FAIL . $this->reset;
            $this->addStart = "{+";
            $this->addEnd = "+}";
            $this->removeStart = "[-";
            $this->removeEnd = "-]";
        } 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 = '-]';
        }
    }