Runner   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 29
ccs 8
cts 10
cp 0.8
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addAdditionalReporter() 0 4 1
A useAdditionalReporters() 0 8 3
A getAdditionalReporters() 0 4 1
1
<?php
2
3
namespace Liip\MonitorBundle;
4
5
use Laminas\Diagnostics\Runner\Reporter\ReporterInterface;
6
use Laminas\Diagnostics\Runner\Runner as BaseRunner;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
class Runner extends BaseRunner
12
{
13
    private $additionalReporters = [];
14
15
    /**
16
     * @param string $alias
17
     */
18 1
    public function addAdditionalReporter($alias, ReporterInterface $reporter)
19
    {
20 1
        $this->additionalReporters[$alias] = $reporter;
21 1
    }
22
23 1
    public function useAdditionalReporters(array $aliases)
24
    {
25 1
        foreach ($this->additionalReporters as $alias => $reporter) {
26 1
            if (in_array($alias, $aliases)) {
27 1
                $this->addReporter($reporter);
28
            }
29
        }
30 1
    }
31
32
    /**
33
     * @return array
34
     */
35
    public function getAdditionalReporters()
36
    {
37
        return $this->additionalReporters;
38
    }
39
}
40