Code Duplication    Length = 5-5 lines in 2 locations

src/Form/Field/BelongsToRelation.php 1 location

@@ 38-42 (lines=5) @@
35
     */
36
    protected function setSelectable($selectable)
37
    {
38
        if (!class_exists($selectable) || !is_subclass_of($selectable, Selectable::class)) {
39
            throw new \InvalidArgumentException(
40
                "[Class [{$selectable}] must be a sub class of Encore\Admin\Grid\Selectable"
41
            );
42
        }
43
44
        $this->selectable = $selectable;
45
    }

src/Grid/Displayers/BelongsTo.php 1 location

@@ 39-43 (lines=5) @@
36
     */
37
    public function display($selectable = null, $column = '')
38
    {
39
        if (!class_exists($selectable) || !is_subclass_of($selectable, Selectable::class)) {
40
            throw new \InvalidArgumentException(
41
                "[Class [{$selectable}] must be a sub class of Encore\Admin\Grid\Selectable"
42
            );
43
        }
44
45
        return Admin::component('admin::grid.inline-edit.belongsto', [
46
            'modal'     => sprintf('modal-grid-selector-%s', $this->getClassName()),