Code Duplication    Length = 10-10 lines in 2 locations

src/Assets.php 2 locations

@@ 159-168 (lines=10) @@
156
     * @return $this
157
     * @author Sang Nguyen
158
     */
159
    public function removeStyles($assets)
160
    {
161
        if (!is_array($assets)) {
162
            $assets = [$assets];
163
        }
164
        foreach ($assets as $rem) {
165
            unset($this->styles[array_search($rem, $this->styles)]);
166
        }
167
        return $this;
168
    }
169
170
    /**
171
     * Add scripts
@@ 177-186 (lines=10) @@
174
     * @return $this
175
     * @author Sang Nguyen
176
     */
177
    public function removeScripts($assets)
178
    {
179
        if (!is_array($assets)) {
180
            $assets = [$assets];
181
        }
182
        foreach ($assets as $rem) {
183
            unset($this->scripts[array_search($rem, $this->scripts)]);
184
        }
185
        return $this;
186
    }
187
188
    /**
189
     * Get All scripts in current module