diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index cfc75fd01c..a8925ed2f7 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -63,20 +63,20 @@ class XmlFileLoader extends FileLoader */ protected function parseNode(RouteCollection $collection, \DOMElement $node, $path) { - switch ($node->tagName) { - case 'route': - $this->parseRoute($collection, $node, $path); - break; - case 'import': - $resource = (string) $node->getAttribute('resource'); - $type = (string) $node->getAttribute('type'); - $prefix = (string) $node->getAttribute('prefix'); - $this->setCurrentDir(dirname($path)); - $collection->addCollection($this->import($resource, ('' !== $type ? $type : null), false, $file), $prefix); - break; - default: - throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName)); - } + switch ($node->tagName) { + case 'route': + $this->parseRoute($collection, $node, $path); + break; + case 'import': + $resource = (string) $node->getAttribute('resource'); + $type = (string) $node->getAttribute('type'); + $prefix = (string) $node->getAttribute('prefix'); + $this->setCurrentDir(dirname($path)); + $collection->addCollection($this->import($resource, ('' !== $type ? $type : null), false, $file), $prefix); + break; + default: + throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $node->tagName)); + } } /**