Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

@@ 600-608 (lines=9) @@
597
                    $aFeatures = [];
598
                    foreach ($headerFeatures as $key => $value) {
599
                        switch ($key) {
600
                            case 'css':
601
                                if (is_array($value)) {
602
                                    foreach ($value as $value2) {
603
                                        $aFeatures[] = $this->setCssFile(filter_var($value2, FILTER_SANITIZE_URL));
604
                                    }
605
                                } else {
606
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
607
                                }
608
                                break;
609
                            case 'javascript':
610
                                if (is_array($value)) {
611
                                    foreach ($value as $value2) {
@@ 609-618 (lines=10) @@
606
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
607
                                }
608
                                break;
609
                            case 'javascript':
610
                                if (is_array($value)) {
611
                                    foreach ($value as $value2) {
612
                                        $vl          = filter_var($value2, FILTER_SANITIZE_URL);
613
                                        $aFeatures[] = $this->setJavascriptFile($vl);
614
                                    }
615
                                } else {
616
                                    $aFeatures[] = $this->setJavascriptFile(filter_var($value, FILTER_SANITIZE_URL));
617
                                }
618
                                break;
619
                            case 'lang':
620
                                $fixedHeaderElements['lang'] = '<html lang="'
621
                                        . filter_var($value, FILTER_SANITIZE_STRING) . '">';