Code Duplication    Length = 3-3 lines in 2 locations

src/Db/Mapper.php 1 location

@@ 37-39 (lines=3) @@
34
            return [];
35
        }
36
37
        if (!empty($search['limit_custom']) && $search['limit_custom'][0] === 'P') {
38
            $search['limit'] = $search['limit_custom'];
39
        }
40
        $hasLimit = (!empty($search['limit']) && $search['limit'] != -1);
41
42
        $conditions = [];

src/Searcher/MongoSearcher.php 1 location

@@ 93-95 (lines=3) @@
90
        $match = $result['conditions'];
91
92
        $col = '$meta.request_date';
93
        if (!empty($search['limit']) && $search['limit'][0] === 'P') {
94
            $col = '$meta.request_ts';
95
        }
96
97
        $pipeline = [
98
            ['$match' => $match],