Code Duplication    Length = 5-5 lines in 2 locations

src/Form/Field/BelongsToRelation.php 1 location

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

src/Grid/Displayers/BelongsToRelation.php 1 location

@@ 101-105 (lines=5) @@
98
     */
99
    public function display($selectable = null, $column = '')
100
    {
101
        if (!class_exists($selectable) || !is_subclass_of($selectable, Selectable::class)) {
102
            throw new \InvalidArgumentException(
103
                "[Class [{$selectable}] must be a sub class of Encore\Admin\Grid\Selectable"
104
            );
105
        }
106
107
        $this->columnName = $column ?: $this->getName();
108
        $this->selectable = $selectable;