Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class ResultPrinter extends DefaultResultPrinter |
||
13 | { |
||
14 | private bool $isStdout; |
||
15 | |||
16 | public function __construct( |
||
17 | $out = null, |
||
18 | $verbose = false, |
||
19 | $colors = \PHPUnit\TextUI\ResultPrinter::COLOR_DEFAULT, |
||
20 | $debug = false, |
||
21 | $numberOfColumns = 80, |
||
22 | $reverse = false |
||
23 | ) { |
||
24 | if ($out === null) { |
||
25 | $out = STDOUT; |
||
26 | } |
||
27 | |||
28 | $this->isStdout = $out === STDOUT; |
||
29 | |||
30 | parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns, $reverse); |
||
31 | } |
||
32 | |||
33 | public function flush(): void |
||
34 | { |
||
35 | if ($this->isStdout) { |
||
36 | parent::flush(); |
||
37 | } |
||
40 |