Completed
Push — master ( 9b8114...2ed294 )
by Nils
02:31
created

WarmUpLiveReporter::processResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace whm\Smoke\Extensions\SmokeReporter\Reporter;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
class WarmUpLiveReporter implements Reporter
8
{
9
    private $output;
10
    private $urlCount = 0;
11
12
    public function init(OutputInterface $_output)
13
    {
14
        $this->output = $_output;
15
    }
16
17
    public function processResults($results)
18
    {
19
        ++$this->urlCount;
20
        $this->output->writeln('   ' . array_pop($result)->getUrl());
21
        $this->output->writeln('');
22
    }
23
24
    public function finish()
25
    {
26
        $this->output->writeln('   <comment>Warm up finished. ' . $this->urlCount . ' urls visited.</comment>');
27
        $this->output->writeln('');
28
    }
29
}
30