Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

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