Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function addAlgorithm(HashAlgorithmInterface $algorithm): AggregateHashAlgorithm |
||
26 | { |
||
27 | if (array_key_exists($algorithm->getName(), $this->algorithms)) |
||
28 | { |
||
29 | throw new \InvalidArgumentException("Trying to re-add hash algorithm named '{$algorithm->getName()}'"); |
||
30 | } |
||
31 | |||
32 | $this->algorithms[$algorithm->getName()] = $algorithm; |
||
33 | |||
34 | return $this; |
||
35 | } |
||
36 | |||
70 |