Code Duplication    Length = 10-10 lines in 2 locations

src/Grid/Column.php 1 location

@@ 367-376 (lines=10) @@
364
     *
365
     * @return $this
366
     */
367
    public function using(array $values, $default = null)
368
    {
369
        return $this->display(function ($value) use ($values, $default) {
370
            if (is_null($value)) {
371
                return $default;
372
            }
373
374
            return Arr::get($values, $value, $default);
375
        });
376
    }
377
378
    /**
379
     * Render this column with the given view.

src/Show/Field.php 1 location

@@ 191-200 (lines=10) @@
188
     *
189
     * @return $this
190
     */
191
    public function using(array $values, $default = null)
192
    {
193
        return $this->as(function ($value) use ($values, $default) {
194
            if (is_null($value)) {
195
                return $default;
196
            }
197
198
            return Arr::get($values, $value, $default);
199
        });
200
    }
201
202
    /**
203
     * Show field as a image.