Passed
Pull Request — develop (#5)
by ANTHONIUS
04:08
created

RemoteCoverage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
eloc 7
dl 0
loc 29
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 6 1
A __construct() 0 4 1
A onCoverageStarted() 0 2 1
A onCoverageStopped() 0 2 1
A onCoverageRefresh() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-coverage-extension 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\Bridge\CodeCoverage;
15
16
use Doyo\Behat\Coverage\Event\CoverageEvent;
17
use Doyo\Behat\Coverage\Remote\CoverageRepository;
18
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
19
20
class RemoteCoverage implements EventSubscriberInterface
21
{
22
    private $repository;
23
24 1
    public function __construct(
25
        CoverageRepository $repository
26
    ) {
27 1
        $this->repository = $repository;
28
    }
29
30 1
    public static function getSubscribedEvents()
31
    {
32
        return [
33 1
            CoverageEvent::START   => 'onCoverageStarted',
34
            CoverageEvent::STOP    => ['onCoverageStopped', 999],
35
            CoverageEvent::REFRESH => 'onCoverageRefresh',
36
        ];
37
    }
38
39
    public function onCoverageStarted()
40
    {
41
    }
42
43
    public function onCoverageStopped()
44
    {
45
    }
46
47
    public function onCoverageRefresh()
48
    {
49
    }
50
}
51