Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function add(string $alias, AlgorithmInterface $algorithm): AlgorithmManagerFactory |
||
33 | { |
||
34 | if (array_key_exists($alias, $this->algorithms)) { |
||
35 | throw new \InvalidArgumentException(sprintf('The alias "%s" already exists.', $alias)); |
||
36 | } |
||
37 | $this->algorithms[$alias] = $algorithm; |
||
38 | |||
39 | return $this; |
||
40 | } |
||
41 | |||
69 |