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

Console   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A printResults() 0 10 2
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
}