Code Duplication    Length = 7-7 lines in 2 locations

src/Config/ModelFactory.php 1 location

@@ 78-84 (lines=7) @@
75
            $query = $query->withTrashed();
76
        }
77
78
        if ($this->usePagination()) {
79
            $data = $query->paginate($this->config->get('perPage'));
80
81
            $data->setCollection($this->parseRows($data->getCollection()));
82
        } else {
83
            $data = $this->parseRows($query->get());
84
        }
85
86
        return $data;
87
    }

src/View/Table.php 1 location

@@ 96-102 (lines=7) @@
93
            $query = $query->withTrashed();
94
        }
95
96
        if ($this->usePagination()) {
97
            $data = $query->paginate($this->perPage, ['*'], $this->pageName);
98
99
            $data->setCollection($this->parseRows($data->getCollection()));
100
        } else {
101
            $data = $this->parseRows($query->get());
102
        }
103
104
        return $data;
105
    }