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

Console::printResults()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
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
}