Code Duplication    Length = 7-7 lines in 5 locations

src/CachedBuilder.php 5 locations

@@ 157-163 (lines=7) @@
154
            ->toArray();
155
    }
156
157
    public function avg($column)
158
    {
159
        return $this->cache($this->getModelTag())
160
            ->rememberForever($this->getMethodKey("-avg_{$column}"), function () use ($column) {
161
                return parent::avg($column);
162
            });
163
    }
164
165
    public function count($columns = ['*'])
166
    {
@@ 165-171 (lines=7) @@
162
            });
163
    }
164
165
    public function count($columns = ['*'])
166
    {
167
        return $this->cache($this->getModelTag())
168
            ->rememberForever($this->getMethodKey("-count"), function () use ($columns) {
169
                return parent::count($columns);
170
            });
171
    }
172
173
    public function cursor()
174
    {
@@ 208-214 (lines=7) @@
205
            });
206
    }
207
208
    public function max($column)
209
    {
210
        return $this->cache($this->getModelTag())
211
            ->rememberForever($this->getMethodKey("-max_{$column}"), function () use ($column) {
212
                return parent::max($column);
213
            });
214
    }
215
216
    public function min($column)
217
    {
@@ 216-222 (lines=7) @@
213
            });
214
    }
215
216
    public function min($column)
217
    {
218
        return $this->cache($this->getModelTag())
219
            ->rememberForever($this->getMethodKey("-min_{$column}"), function () use ($column) {
220
                return parent::min($column);
221
            });
222
    }
223
224
    public function pluck($column, $key = null)
225
    {
@@ 238-244 (lines=7) @@
235
            });
236
    }
237
238
    public function sum($column)
239
    {
240
        return $this->cache($this->getModelTag())
241
            ->rememberForever($this->getMethodKey("-sum_{$column}"), function () use ($column) {
242
                return parent::sum($column);
243
            });
244
    }
245
246
    protected function getTypeClause($where)
247
    {