Code Duplication    Length = 13-14 lines in 2 locations

src/AppserverIo/Server/Configuration/ServerJsonConfiguration.php 1 location

@@ 687-699 (lines=13) @@
684
                // remove name
685
                unset($params["name"]);
686
                // set all virtual host information's
687
                foreach ($virtualHostNames as $virtualHostName) {
688
                    // add all virtual hosts params per key for faster matching later on
689
                    $virtualHosts[trim($virtualHostName)] = array(
690
                        'params' => $params,
691
                        'rewriteMaps' => $this->prepareRewriteMaps($virtualHost),
692
                        'rewrites' => $this->prepareRewrites($virtualHost),
693
                        'locations' => $this->prepareLocations($virtualHost),
694
                        'environmentVariables' => $this->prepareEnvironmentVariables($virtualHost),
695
                        'authentication' => $this->prepareAuthentications($virtualHost),
696
                        'accesses' => $this->prepareAccesses($virtualHost),
697
                        'analytics' => $this->prepareAnalytics($virtualHost)
698
                    );
699
                }
700
            }
701
        }
702
        return $virtualHosts;

src/AppserverIo/Server/Configuration/ServerXmlConfiguration.php 1 location

@@ 523-536 (lines=14) @@
520
                    $paramName = (string)$paramNode->attributes()->name;
521
                    $params[$paramName] = (string)array_shift($virtualHostNode->xpath(".//param[@name='$paramName']"));
522
                }
523
                foreach ($virtualHostNames as $virtualHostName) {
524
                    // set all virtual hosts params per key for faster matching later on
525
                    $virutalHosts[trim($virtualHostName)] = array(
526
                        'params' => $params,
527
                        'headers' => $this->prepareHeaders($virtualHostNode),
528
                        'rewriteMaps' => $this->prepareRewriteMaps($virtualHostNode),
529
                        'rewrites' => $this->prepareRewrites($virtualHostNode),
530
                        'locations' => $this->prepareLocations($virtualHostNode),
531
                        'environmentVariables' => $this->prepareEnvironmentVariables($virtualHostNode),
532
                        'authentications' => $this->prepareAuthentications($virtualHostNode),
533
                        'accesses' => $this->prepareAccesses($virtualHostNode),
534
                        'analytics' => $this->prepareAnalytics($virtualHostNode)
535
                    );
536
                }
537
            }
538
        }
539
        return $virutalHosts;