Code Duplication    Length = 3-5 lines in 3 locations

src/Assets.php 3 locations

@@ 238-241 (lines=4) @@
235
            if (isset($this->config[$configName])) {
236
                $src = $this->config[$configName . '.src.local'];
237
                $attributes = $this->config[$configName . '.attributes'] ?? [];
238
                if ($this->config[$configName . '.use_cdn'] && !$this->config['offline']) {
239
                    $src = $this->config[$configName . '.src.cdn'];
240
                    $attributes = [];
241
                }
242
243
                foreach ((array)$src as $s) {
244
                    $stylesheets[] = [
@@ 309-313 (lines=5) @@
306
        $cdn = false;
307
        $attributes = $this->config[$configName . '.attributes'] ?? [];
308
309
        if ($this->config[$configName . '.use_cdn'] && !$this->config['offline']) {
310
            $src = $this->config[$configName . '.src.cdn'];
311
            $cdn = true;
312
            $attributes = [];
313
        }
314
315
        if ($this->config[$configName . '.include_style']) {
316
            $this->addStyles([$script]);
@@ 371-373 (lines=3) @@
368
        if (isset($this->config[$config])) {
369
370
            $src = $this->config[$config . '.src.local'];
371
            if ($this->config[$config . '.use_cdn'] && !$this->config['offline']) {
372
                $src = $this->config[$config . '.src.cdn'];
373
            }
374
375
            if (!is_array($src)) {
376
                $src = [$src];