ReportEvent::getConsoleIO()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-code-coverage project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Behat\Coverage\Event;
15
16
use Doyo\Behat\Coverage\Console\ConsoleIO;
17
use Doyo\Bridge\CodeCoverage\ProcessorInterface;
18
use Doyo\Symfony\Bridge\EventDispatcher\Event;
19
20
class ReportEvent extends Event
21
{
22
    const BEFORE_PROCESS = 'doyo.coverage.report_pre';
23
    const PROCESS        = 'doyo.coverage.report_process';
24
    const AFTER_PROCESS  = 'doyo.coverage.report_post';
25
26
    /**
27
     * @var ProcessorInterface
28
     */
29
    private $processor;
30
31
    /**
32
     * @var ConsoleIO
33
     */
34
    private $consoleIO;
35
36 6
    public function __construct(ProcessorInterface $processor, ConsoleIO $consoleIO)
37
    {
38 6
        $this->processor = $processor;
39 6
        $this->consoleIO = $consoleIO;
40
    }
41
42
    /**
43
     * @return ProcessorInterface
44
     */
45 4
    public function getProcessor()
46
    {
47 4
        return $this->processor;
48
    }
49
50
    /**
51
     * @return ConsoleIO
52
     */
53 4
    public function getConsoleIO(): ConsoleIO
54
    {
55 4
        return $this->consoleIO;
56
    }
57
}
58