Passed
Push — master ( c03b7d...d95c98 )
by Sébastien
01:47
created

PresetLoader   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getLocator() 0 3 1
A getPreset() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\MediaTools\Preset;
6
7
class PresetLoader
8
{
9
    /** @var PresetLocator */
10
    private $locator;
11
12 3
    public function __construct(PresetLocator $locator)
13
    {
14 3
        $this->locator = $locator;
15 3
    }
16
17 1
    public function getPreset(string $presetName): PresetInterface
18
    {
19 1
        return $this->locator->getPreset($presetName);
20
    }
21
22 3
    public function getLocator(): PresetLocator
23
    {
24 3
        return $this->locator;
25
    }
26
}
27