| Conditions | 4 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 69 | public function removeAlgorithm($algorithm) |
||
| 70 | { |
||
| 71 | if ($algorithm instanceof JWAInterface) { |
||
| 72 | $name = $algorithm->getAlgorithmName(); |
||
| 73 | } elseif (is_string($algorithm)) { |
||
| 74 | $name = $algorithm; |
||
| 75 | } else { |
||
| 76 | throw new \InvalidArgumentException('Argument must be a string or a JWAInterface object.'); |
||
| 77 | } |
||
| 78 | if (array_key_exists($name, $this->algorithms)) { |
||
| 79 | unset($this->algorithms[$name]); |
||
| 80 | } |
||
| 81 | } |
||
| 82 | } |
||
| 83 |