Code Duplication    Length = 4-4 lines in 2 locations

src/MongoDB.php 2 locations

@@ 114-117 (lines=4) @@
111
    public function update($collection, $filters, $values)
112
    {
113
        $collection = $this->database->selectCollection($collection);
114
        if (isset($filters['id'])) {
115
            $filters['_id'] = new \MongoDB\BSON\ObjectID($filters['id']);
116
            unset($filters['id']);
117
        }
118
        $query_filters = [];
119
        if ($filters != null) {
120
            $query_filters = ['$and' => self::buildFilter($filters)];
@@ 151-154 (lines=4) @@
148
    public function find($collection, $filters, $fields = null, $sort = null, $start = 0, $limit = 25, $debug = false)
149
    {
150
        $collection = $this->database->selectCollection($collection);
151
        if (isset($filters['id'])) {
152
            $filters['_id'] = new \MongoDB\BSON\ObjectID($filters['id']);
153
            unset($filters['id']);
154
        }
155
        $query_filters = [];
156
        if ($filters != null) {
157
            $query_filters = ['$and' => self::buildFilter($filters)];