SingleSourceCollector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A collect() 0 3 1
1
<?php
2
3
namespace Lamoda\Metric\Collector;
4
5
use Lamoda\Metric\Common\MetricSourceInterface;
6
7
final class SingleSourceCollector implements MetricCollectorInterface
8
{
9
    /** @var MetricSourceInterface */
10
    private $source;
11
12
    /**
13
     * @param MetricSourceInterface $source
14
     */
15 1
    public function __construct(MetricSourceInterface $source)
16
    {
17 1
        $this->source = $source;
18 1
    }
19
20
    /** {@inheritdoc} */
21 1
    public function collect(): MetricSourceInterface
22
    {
23 1
        return $this->source;
24
    }
25
}
26