Skip to content

Commit

Permalink
No manual type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sirn-se committed Mar 5, 2024
1 parent 1eba81c commit c4f4490
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/StreamCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Countable;
use Iterator;
use Phrity\Util\ErrorHandler;
use TypeError;

/**
* Phrity\Net\StreamCollection class.
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit c4f4490

Please sign in to comment.