TextCodeCoverageReporter::createCoverageReporter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Peridot\Reporter\CodeCoverage;
4
5
use SebastianBergmann\CodeCoverage\Report\Text;
6
7
/**
8
 * Class TextCodeCoverageReporter
9
 * @package Peridot\Reporter\CodeCoverage
10
 */
11
class TextCodeCoverageReporter extends AbstractCodeCoverageReporter
12
{
13
    /**
14
     * Handle the runner.end event.
15
     */
16
    public function onRunnerEnd()
17
    {
18
        $this->footer();
19
20
        $output = $this->getCoverageReporter()->process($this->coverage, true);
21
        $this->eventEmitter->emit('code-coverage.end', [$this]);
22
23
        $this->output->writeln($output);
24
    }
25
26
    /**
27
     * Create the desired code coverage reporter.
28
     *
29
     * @return Text
30
     */
31
    protected function createCoverageReporter()
32
    {
33
        return new Text(50, 90, true, false);
34
    }
35
}
36