Code Duplication    Length = 10-10 lines in 2 locations

src/Grid/Column.php 1 location

@@ 409-418 (lines=10) @@
406
     *
407
     * @return $this
408
     */
409
    public function using(array $values, $default = null)
410
    {
411
        return $this->display(function ($value) use ($values, $default) {
412
            if (is_null($value)) {
413
                return $default;
414
            }
415
416
            return Arr::get($values, $value, $default);
417
        });
418
    }
419
420
    /**
421
     * Render this column with the given view.

src/Show/Field.php 1 location

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