Code Duplication    Length = 17-17 lines in 2 locations

src/Assets.php 2 locations

@@ 147-163 (lines=17) @@
144
     * @param array $assets
145
     * @return $this
146
     */
147
    public function removeStyles($assets)
148
    {
149
        if (empty($this->styles)) {
150
            return $this;
151
        }
152
153
        foreach ((array)$assets as $rem) {
154
            $index = array_search($rem, $this->styles);
155
            if ($index === false) {
156
                continue;
157
            }
158
159
            Arr::forget($this->styles, $index);
160
        }
161
162
        return $this;
163
    }
164
165
    /**
166
     * Add scripts.
@@ 171-187 (lines=17) @@
168
     * @param array $assets
169
     * @return $this
170
     */
171
    public function removeScripts($assets)
172
    {
173
        if (empty($this->scripts)) {
174
            return $this;
175
        }
176
177
        foreach ((array)$assets as $rem) {
178
            $index = array_search($rem, $this->scripts);
179
            if ($index === false) {
180
                continue;
181
            }
182
183
            Arr::forget($this->scripts, $index);
184
        }
185
186
        return $this;
187
    }
188
189
    /**
190
     * Get All scripts in current module.