Code Duplication    Length = 9-10 lines in 2 locations

source/DomComponentsByDanielGP.php 2 locations

@@ 848-856 (lines=9) @@
845
                    $aFeatures = [];
846
                    foreach ($headerFeatures as $key => $value) {
847
                        switch ($key) {
848
                            case 'css':
849
                                if (is_array($value)) {
850
                                    foreach ($value as $value2) {
851
                                        $aFeatures[] = $this->setCssFile(filter_var($value2, FILTER_SANITIZE_URL));
852
                                    }
853
                                } else {
854
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
855
                                }
856
                                break;
857
                            case 'javascript':
858
                                if (is_array($value)) {
859
                                    foreach ($value as $value2) {
@@ 857-866 (lines=10) @@
854
                                    $aFeatures[] = $this->setCssFile(filter_var($value, FILTER_SANITIZE_URL));
855
                                }
856
                                break;
857
                            case 'javascript':
858
                                if (is_array($value)) {
859
                                    foreach ($value as $value2) {
860
                                        $vl          = filter_var($value2, FILTER_SANITIZE_URL);
861
                                        $aFeatures[] = $this->setJavascriptFile($vl);
862
                                    }
863
                                } else {
864
                                    $aFeatures[] = $this->setJavascriptFile(filter_var($value, FILTER_SANITIZE_URL));
865
                                }
866
                                break;
867
                            case 'lang':
868
                                $fixedHeaderElements['lang'] = '<html lang="'
869
                                        . filter_var($value, FILTER_SANITIZE_STRING) . '">';