Completed
Push — master ( ef2f42...16ba85 )
by David
01:03
created

Console::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Lloople\PHPUnitExtensions\Runners\SlowestTests;
4
5
class Console extends Channel
6
{
7
8
    public function __construct(?int $rows = 5)
9
    {
10
        parent::__construct($rows);
11
    }
12
    
13
    protected function printResults(): void
14
    {
15
        echo PHP_EOL . "Showing the top {$this->rows} slowest tests:" . PHP_EOL;
16
17
        foreach ($this->testsToPrint() as $test => $time) {
18
            echo str_pad($time, 5, ' ', STR_PAD_LEFT) . " ms: {$test}" . PHP_EOL;
19
        }
20
21
        echo PHP_EOL;
22
    }
23
}