Skip to content

Commit 21f8624

Browse files
committed
Remove redundant isClosed checks in private WritableStream methods
1 parent c267c85 commit 21f8624

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/GridFS/WritableStream.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ private function abort()
187187

188188
private function fileCollectionInsert()
189189
{
190-
if ($this->isClosed) {
191-
// TODO: Should this be an error condition? e.g. BadMethodCallException
192-
return;
193-
}
194-
195190
$md5 = hash_final($this->ctx);
196191

197192
$this->file['length'] = $this->length;
@@ -210,11 +205,6 @@ private function fileCollectionInsert()
210205

211206
private function insertChunkFromBuffer()
212207
{
213-
if ($this->isClosed) {
214-
// TODO: Should this be an error condition? e.g. BadMethodCallException
215-
return;
216-
}
217-
218208
if (strlen($this->buffer) == 0) {
219209
return;
220210
}

0 commit comments

Comments
 (0)