diff --git a/src/StreamCollection.php b/src/StreamCollection.php index 986e0a7..57dff31 100644 --- a/src/StreamCollection.php +++ b/src/StreamCollection.php @@ -5,7 +5,6 @@ use Countable; use Iterator; use Phrity\Util\ErrorHandler; -use TypeError; /** * Phrity\Net\StreamCollection class. @@ -55,7 +54,6 @@ public function detach(Stream|string $detach): bool unset($this->streams[$detach]); return true; } - return false; } if ($detach instanceof Stream) { foreach ($this->streams as $key => $stream) { @@ -64,9 +62,8 @@ public function detach(Stream|string $detach): bool return true; } } - return false; } - throw new TypeError("Argument #1 ($detach) must be of type Phrity\Net\Stream or string."); + return false; } /**