Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

@@ 696-704 (lines=9) @@
693
                    $aFeatures = [];
694
                    foreach ($headerFeatures as $key => $value) {
695
                        switch ($key) {
696
                            case 'css':
697
                                if (is_array($value)) {
698
                                    foreach ($value as $value2) {
699
                                        $aFeatures[] = $this->setCssFile(filter_var($value2, FILTER_SANITIZE_URL));
700
                                    }
701
                                } else {
702
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
703
                                }
704
                                break;
705
                            case 'javascript':
706
                                if (is_array($value)) {
707
                                    foreach ($value as $value2) {
@@ 705-714 (lines=10) @@
702
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
703
                                }
704
                                break;
705
                            case 'javascript':
706
                                if (is_array($value)) {
707
                                    foreach ($value as $value2) {
708
                                        $vl          = filter_var($value2, FILTER_SANITIZE_URL);
709
                                        $aFeatures[] = $this->setJavascriptFile($vl);
710
                                    }
711
                                } else {
712
                                    $aFeatures[] = $this->setJavascriptFile(filter_var($value, FILTER_SANITIZE_URL));
713
                                }
714
                                break;
715
                            case 'lang':
716
                                $fixedHeaderElements['lang'] = '<html lang="'
717
                                        . filter_var($value, FILTER_SANITIZE_STRING) . '">';