Code Duplication    Length = 10-10 lines in 2 locations

src/Assets.php 2 locations

@@ 153-162 (lines=10) @@
150
     * @return $this
151
     * @author Sang Nguyen
152
     */
153
    public function removeStylesheets($assets)
154
    {
155
        if (!is_array($assets)) {
156
            $assets = [$assets];
157
        }
158
        foreach ($assets as $rem) {
159
            unset($this->stylesheets[array_search($rem, $this->stylesheets)]);
160
        }
161
        return $this;
162
    }
163
164
    /**
165
     * Add Javascript to current module
@@ 171-180 (lines=10) @@
168
     * @return $this
169
     * @author Sang Nguyen
170
     */
171
    public function removeJavascript($assets)
172
    {
173
        if (!is_array($assets)) {
174
            $assets = [$assets];
175
        }
176
        foreach ($assets as $rem) {
177
            unset($this->javascript[array_search($rem, $this->javascript)]);
178
        }
179
        return $this;
180
    }
181
182
    /**
183
     * Get All Javascript in current module