Color::isSupported()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 8
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
namespace Watchmaker\lib;
4
5
use JakubOnderka\PhpConsoleColor\ConsoleColor;
6
use Watchmaker\Watchmaker;
7
8
class Color extends ConsoleColor
9
{
10
    public function isSupported()
11
    {
12
        $config = Watchmaker::getConfig();
13
        if ($config->ansi === true) {
14
            return true;
15
        }
16
17
        return parent::isSupported();
18
    }
19
}
20