Code Duplication    Length = 10-10 lines in 3 locations

src/Grid/Displayers/DropdownActions.php 3 locations

@@ 89-98 (lines=10) @@
86
     *
87
     * @return $this
88
     */
89
    public function disableView(bool $disable = true)
90
    {
91
        if ($disable) {
92
            array_delete($this->default, Show::class);
93
        } elseif (!in_array(Show::class, $this->default)) {
94
            array_push($this->default, Show::class);
95
        }
96
97
        return $this;
98
    }
99
100
    /**
101
     * Disable delete.
@@ 105-114 (lines=10) @@
102
     *
103
     * @return $this.
104
     */
105
    public function disableDelete(bool $disable = true)
106
    {
107
        if ($disable) {
108
            array_delete($this->default, Delete::class);
109
        } elseif (!in_array(Delete::class, $this->default)) {
110
            array_push($this->default, Delete::class);
111
        }
112
113
        return $this;
114
    }
115
116
    /**
117
     * Disable edit.
@@ 121-130 (lines=10) @@
118
     *
119
     * @return $this.
120
     */
121
    public function disableEdit(bool $disable = true)
122
    {
123
        if ($disable) {
124
            array_delete($this->default, Edit::class);
125
        } elseif (!in_array(Edit::class, $this->default)) {
126
            array_push($this->default, Edit::class);
127
        }
128
129
        return $this;
130
    }
131
132
    /**
133
     * @param null|\Closure $callback