Code Duplication    Length = 10-10 lines in 3 locations

src/CachedBuilder.php 3 locations

@@ 145-154 (lines=10) @@
142
    /**
143
     * @SuppressWarnings(PHPMD.ShortVariable)
144
     */
145
    public function find($id, $columns = ['*'])
146
    {
147
        $tags = $this->getCacheTags();
148
        $key = $this->getCacheKey($columns, $id);
149
150
        return $this->cache($tags)
151
            ->rememberForever($key, function () use ($id, $columns) {
152
                return parent::find($id, $columns);
153
            });
154
    }
155
156
    public function first($columns = ['*'])
157
    {
@@ 156-165 (lines=10) @@
153
            });
154
    }
155
156
    public function first($columns = ['*'])
157
    {
158
        $tags = $this->getCacheTags();
159
        $key = $this->getCacheKey($columns) . '-first';
160
161
        return $this->cache($tags)
162
            ->rememberForever($key, function () use ($columns) {
163
                return parent::first($columns);
164
            });
165
    }
166
167
    public function get($columns = ['*'])
168
    {
@@ 167-176 (lines=10) @@
164
            });
165
    }
166
167
    public function get($columns = ['*'])
168
    {
169
        $tags = $this->getCacheTags();
170
        $key = $this->getCacheKey($columns);
171
172
        return $this->cache($tags)
173
            ->rememberForever($key, function () use ($columns) {
174
                return parent::get($columns);
175
            });
176
    }
177
178
    public function max($column)
179
    {