Skip to content

Commit 8d985e6

Browse files
authored
Remove unreachable code (#1079)
1 parent 3bd3fb4 commit 8d985e6

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

src/GridFS/StreamWrapper.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ class StreamWrapper
4646
/** @var resource|null Stream context (set by PHP) */
4747
public $context;
4848

49-
/** @var string|null */
50-
private $mode;
51-
5249
/** @var string|null */
5350
private $protocol;
5451

@@ -127,7 +124,6 @@ public function stream_eof(): bool
127124
public function stream_open(string $path, string $mode, int $options, ?string &$openedPath): bool
128125
{
129126
$this->initProtocol($path);
130-
$this->mode = $mode;
131127

132128
if ($mode === 'r') {
133129
return $this->initReadableStream();

src/GridFS/WritableStream.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ private function abort(): void
255255
$this->isClosed = true;
256256
}
257257

258-
/** @return mixed */
259-
private function fileCollectionInsert()
258+
private function fileCollectionInsert(): void
260259
{
261260
$this->file['length'] = $this->length;
262261
$this->file['uploadDate'] = new UTCDateTime();
@@ -272,8 +271,6 @@ private function fileCollectionInsert()
272271

273272
throw $e;
274273
}
275-
276-
return $this->file['_id'];
277274
}
278275

279276
private function insertChunkFromBuffer(): void

src/Operation/Explain.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,4 @@ private function createOptions(): array
159159

160160
return $options;
161161
}
162-
163-
private function isFindAndModify(Explainable $explainable): bool
164-
{
165-
if ($explainable instanceof FindAndModify || $explainable instanceof FindOneAndDelete || $explainable instanceof FindOneAndReplace || $explainable instanceof FindOneAndUpdate) {
166-
return true;
167-
}
168-
169-
return false;
170-
}
171162
}

0 commit comments

Comments
 (0)