We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97dd58 commit 0e91b4bCopy full SHA for 0e91b4b
src/main/php/io/streams/compress/Algorithms.class.php
@@ -54,12 +54,7 @@ public function named(string $lookup): Algorithm {
54
* @param string|io.streams.compress.Algorithm $target
55
*/
56
public function remove($target): bool {
57
- if ($target instanceof Algorithm) {
58
- $algorithm= $this->set[$target->name()] ?? null;
59
- } else {
60
- $algorithm= $this->set[$target] ?? (($name= $this->lookup[$target] ?? null) ? $this->set[$name] : null);
61
- }
62
-
+ $algorithm= $target instanceof Algorithm ? $this->set[$target->name()] ?? null : $this->find($target);
63
if (null === $algorithm) return false;
64
65
unset($this->lookup[$algorithm->token()], $this->lookup[$algorithm->extension()]);
0 commit comments