Code Duplication    Length = 10-10 lines in 2 locations

src/Grid/Column.php 1 location

@@ 313-322 (lines=10) @@
310
     *
311
     * @return $this
312
     */
313
    public function using(array $values, $default = null)
314
    {
315
        return $this->display(function ($value) use ($values, $default) {
316
            if (is_null($value)) {
317
                return $default;
318
            }
319
320
            return array_get($values, $value, $default);
321
        });
322
    }
323
324
    /**
325
     * If has display callbacks.

src/Show/Field.php 1 location

@@ 173-182 (lines=10) @@
170
     *
171
     * @return $this
172
     */
173
    public function using(array $values, $default = null)
174
    {
175
        return $this->as(function ($value) use ($values, $default) {
176
            if (is_null($value)) {
177
                return $default;
178
            }
179
180
            return array_get($values, $value, $default);
181
        });
182
    }
183
184
    /**
185
     * Show field as a image.