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

PresetLoader::getPreset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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