Passed
Push — master ( ff4791...e25d55 )
by Sébastien
07:48
created

PresetLoader   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 18
ccs 5
cts 7
cp 0.7143
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 2
    public function __construct(PresetLocator $locator)
13
    {
14 2
        $this->locator = $locator;
15 2
    }
16
17
    public function getPreset(string $presetName): PresetInterface
18
    {
19
        return $this->locator->getPreset($presetName);
20
    }
21
22 2
    public function getLocator(): PresetLocator
23
    {
24 2
        return $this->locator;
25
    }
26
}
27