Code Duplication    Length = 3-3 lines in 2 locations

src/Xhgui/Searcher/MongoSearcher.php 1 location

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

src/Xhgui/Db/Mapper.php 1 location

@@ 50-52 (lines=3) @@
47
     */
48
    private function buildConditions(array $search): array
49
    {
50
        if (!empty($search['limit_custom']) && $search['limit_custom'][0] === 'P') {
51
            $search['limit'] = $search['limit_custom'];
52
        }
53
        $hasLimit = (!empty($search['limit']) && $search['limit'] != -1);
54
55
        $conditions = [];