Passed
Push — main ( 2bf89b...450136 )
by mikhail
03:21
created

BaselineManager::filterComments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SavinMikhail\CommentsDensity\Baseline;
6
7
use SavinMikhail\CommentsDensity\Baseline\Storage\BaselineStorageInterface;
8
9
final class BaselineManager
10
{
11
    private BaselineStorageInterface $storage;
12
13
    public function __construct(BaselineStorageInterface $storage)
14
    {
15
        $this->storage = $storage;
16
    }
17
18
    public function init(string $path): self
19
    {
20
        $this->storage->init($path);
21
        return $this;
22
    }
23
24
    public function setComments(array $comments): void
25
    {
26
        $this->storage->setComments($comments);
27
    }
28
29
    public function filterComments(array $comments): array
30
    {
31
        return $this->storage->filterComments($comments);
32
    }
33
}
34