Code Duplication    Length = 4-4 lines in 2 locations

src/Modules/Core/BaseClasses/BaseRepository.php 1 location

@@ 85-88 (lines=4) @@
82
     */
83
    public function count($conditions = false)
84
    {
85
        if($conditions) {
86
            $conditions = $this->constructConditions($conditions, $this->model);
87
            return $this->model->whereRaw($conditions['conditionString'], $conditions['conditionValues'])->count();
88
        }
89
        
90
        return $this->model->count();
91
    }

src/Modules/Reporting/Repositories/ReportRepository.php 1 location

@@ 38-41 (lines=4) @@
35
         */
36
        $report = \DB::table($report->view_name);
37
        unset($conditions['page']);
38
        if (count($conditions)) {
39
            $conditions = $this->constructConditions($conditions, $this->model);
40
            $report->whereRaw($conditions['conditionString'], $conditions['conditionValues']);
41
        }
42
        /**
43
         * Paginate or all data.
44
         */