Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 5 | public function getStrategy(string $queueName): DelayStrategyInterface |
|
36 | { |
||
37 | 5 | $strategyKey = $this->queuesConfiguration[$queueName] ?? self::DEFAULT_STRATEGY; |
|
38 | |||
39 | 5 | if (isset($this->handlers[$strategyKey])) { |
|
40 | 3 | return $this->handlers[$strategyKey]; |
|
41 | } |
||
42 | |||
43 | 2 | throw new UnknownStrategyKeyException(sprintf('Delay strategy with key: %s doesn\'t exist', $strategyKey)); |
|
44 | } |
||
45 | |||
51 |