Failed Conditions
Push — master ( 438024...09a02f )
by Sébastien
03:04
created

PresetLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 20
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 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
    /**
10
     * @var PresetLocator
11
     */
12
    private $locator;
13
14
    public function __construct(PresetLocator $locator)
15
    {
16
        $this->locator = $locator;
17
    }
18
19
    /**
20
     * @param string $presetName
21
     *
22
     * @return PresetInterface
23
     */
24
    public function getPreset(string $presetName): PresetInterface
25
    {
26
        return $this->locator->getPreset($presetName);
27
    }
28
}
29