Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | <?php |
||
10 | class Factory extends AbstractDeclarationBasedFactory |
||
11 | { |
||
12 | /** |
||
13 | * @param string $key |
||
14 | * @return \Aoe\Asdis\Domain\Model\DistributionAlgorithm\DistributionAlgorithmInterface |
||
15 | */ |
||
16 | 1 | public function buildDistributionAlgorithmFromKey($key) |
|
17 | { |
||
18 | 1 | $this->initialize(); |
|
19 | 1 | return $this->buildObjectFromKey($key); |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * @return void |
||
24 | */ |
||
25 | 1 | private function initialize() |
|
26 | { |
||
27 | 1 | $this->setDeclarations($this->getDeclarations()); |
|
28 | 1 | $this->setFallbackKey('hashBasedGroups'); |
|
29 | 1 | $this->setClassImplements(['Aoe\Asdis\Domain\Model\DistributionAlgorithm\DistributionAlgorithmInterface']); |
|
30 | 1 | } |
|
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | protected function getDeclarations() |
||
38 | } |
||
39 | } |