-
Notifications
You must be signed in to change notification settings - Fork 266
Remove unreachable code #1079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unreachable code #1079
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,8 +255,7 @@ private function abort(): void | |
$this->isClosed = true; | ||
} | ||
|
||
/** @return mixed */ | ||
private function fileCollectionInsert() | ||
private function fileCollectionInsert(): void | ||
{ | ||
$this->file['length'] = $this->length; | ||
$this->file['uploadDate'] = new UTCDateTime(); | ||
|
@@ -272,8 +271,6 @@ private function fileCollectionInsert() | |
|
||
throw $e; | ||
} | ||
|
||
return $this->file['_id']; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returned value never used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this dates back to some early GridFS code which was refactored long ago. This looks good to remove. |
||
} | ||
|
||
private function insertChunkFromBuffer(): void | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,13 +159,4 @@ private function createOptions(): array | |
|
||
return $options; | ||
} | ||
|
||
private function isFindAndModify(Explainable $explainable): bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was originally introduced in c6a2df9 and I missed removing it in 103c1f2#diff-fc0bd4b2f7c5d5615660cecd2acc184702ebfbd7153723cc4d0954bc6696bc08L121 when cleaning up code for pre-3.6 servers. |
||
{ | ||
if ($explainable instanceof FindAndModify || $explainable instanceof FindOneAndDelete || $explainable instanceof FindOneAndReplace || $explainable instanceof FindOneAndUpdate) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduced in e2bf1d4#diff-87d70a08d4e98fae61febf5131732ba9564f41ce431a1ea8f4bd759df70c2365R95 and never removed in bc98d9c when
stream_stat()
was refactored.