Code Duplication    Length = 7-7 lines in 5 locations

src/CachedBuilder.php 5 locations

@@ 153-159 (lines=7) @@
150
            ->toArray();
151
    }
152
153
    public function avg($column)
154
    {
155
        return $this->cache($this->getModelTag())
156
            ->rememberForever($this->getMethodKey("-avg_{$column}"), function () use ($column) {
157
                return parent::avg($column);
158
            });
159
    }
160
161
    public function count($columns = ['*'])
162
    {
@@ 161-167 (lines=7) @@
158
            });
159
    }
160
161
    public function count($columns = ['*'])
162
    {
163
        return $this->cache($this->getModelTag())
164
            ->rememberForever($this->getMethodKey("-count"), function () use ($columns) {
165
                return parent::count($columns);
166
            });
167
    }
168
169
    public function cursor()
170
    {
@@ 204-210 (lines=7) @@
201
            });
202
    }
203
204
    public function max($column)
205
    {
206
        return $this->cache($this->getModelTag())
207
            ->rememberForever($this->getMethodKey("-max_{$column}"), function () use ($column) {
208
                return parent::max($column);
209
            });
210
    }
211
212
    public function min($column)
213
    {
@@ 212-218 (lines=7) @@
209
            });
210
    }
211
212
    public function min($column)
213
    {
214
        return $this->cache($this->getModelTag())
215
            ->rememberForever($this->getMethodKey("-min_{$column}"), function () use ($column) {
216
                return parent::min($column);
217
            });
218
    }
219
220
    public function pluck($column, $key = null)
221
    {
@@ 234-240 (lines=7) @@
231
            });
232
    }
233
234
    public function sum($column)
235
    {
236
        return $this->cache($this->getModelTag())
237
            ->rememberForever($this->getMethodKey("-sum_{$column}"), function () use ($column) {
238
                return parent::sum($column);
239
            });
240
    }
241
242
    protected function getTypeClause($where)
243
    {