Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

@@ 733-741 (lines=9) @@
730
                    $aFeatures = [];
731
                    foreach ($headerFeatures as $key => $value) {
732
                        switch ($key) {
733
                            case 'css':
734
                                if (is_array($value)) {
735
                                    foreach ($value as $value2) {
736
                                        $aFeatures[] = $this->setCssFile(filter_var($value2, FILTER_SANITIZE_URL));
737
                                    }
738
                                } else {
739
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
740
                                }
741
                                break;
742
                            case 'javascript':
743
                                if (is_array($value)) {
744
                                    foreach ($value as $value2) {
@@ 742-751 (lines=10) @@
739
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
740
                                }
741
                                break;
742
                            case 'javascript':
743
                                if (is_array($value)) {
744
                                    foreach ($value as $value2) {
745
                                        $vl          = filter_var($value2, FILTER_SANITIZE_URL);
746
                                        $aFeatures[] = $this->setJavascriptFile($vl);
747
                                    }
748
                                } else {
749
                                    $aFeatures[] = $this->setJavascriptFile(filter_var($value, FILTER_SANITIZE_URL));
750
                                }
751
                                break;
752
                            case 'lang':
753
                                $fixedHeaderElements['lang'] = '<html lang="'
754
                                        . filter_var($value, FILTER_SANITIZE_STRING) . '">';