protected function generateCustomUrls(\DOMNode $environmentNode, Environment $environment)
    {
        foreach ($this->xpath->query('x:custom-urls/x:custom-url', $environmentNode) as $urlNode) {
            /** @var \DOMNode $urlNode */
            $url = new CustomUrl();

            $url->setUrl(rtrim($urlNode->nodeValue, '/'));

            if (false === strpos($url->getUrl(), '*')) {
                throw new InvalidCustomUrlException($this->webspace, $url->getUrl());
            }

            $environment->addCustomUrl($url);
        }
    }