Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

@@ 826-834 (lines=9) @@
823
                    $aFeatures = [];
824
                    foreach ($headerFeatures as $key => $value) {
825
                        switch ($key) {
826
                            case 'css':
827
                                if (is_array($value)) {
828
                                    foreach ($value as $value2) {
829
                                        $aFeatures[] = $this->setCssFile(filter_var($value2, FILTER_SANITIZE_URL));
830
                                    }
831
                                } else {
832
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
833
                                }
834
                                break;
835
                            case 'javascript':
836
                                if (is_array($value)) {
837
                                    foreach ($value as $value2) {
@@ 835-844 (lines=10) @@
832
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
833
                                }
834
                                break;
835
                            case 'javascript':
836
                                if (is_array($value)) {
837
                                    foreach ($value as $value2) {
838
                                        $vl          = filter_var($value2, FILTER_SANITIZE_URL);
839
                                        $aFeatures[] = $this->setJavascriptFile($vl);
840
                                    }
841
                                } else {
842
                                    $aFeatures[] = $this->setJavascriptFile(filter_var($value, FILTER_SANITIZE_URL));
843
                                }
844
                                break;
845
                            case 'lang':
846
                                $fixedHeaderElements['lang'] = '<html lang="'
847
                                        . filter_var($value, FILTER_SANITIZE_STRING) . '">';