Code Duplication    Length = 4-4 lines in 2 locations

lib/Mongo/MongoGridFS.php 2 locations

@@ 218-221 (lines=4) @@
215
        fwrite($stream, $bytes);
216
        fclose($stream);
217
218
        if (count($extra)) {
219
            $collection = $this->bucket->getFilesCollection();
220
            $collection->updateOne(['_id' => $id], ['$set' => $extra]);
221
        }
222
223
        return TypeConverter::toLegacy($id);
224
    }
@@ 253-256 (lines=4) @@
250
            $filename =  $metadata['uri'];
251
        }
252
        $id = $this->bucket->uploadFromStream($filename, $handle);
253
        if (count($extra)) {
254
            $collection = $this->bucket->getFilesCollection();
255
            $collection->updateOne(['_id' => $id], ['$set' => $extra]);
256
        }
257
258
        return TypeConverter::toLegacy($id);
259
    }