Skip to content

Commit 53b432f

Browse files
[Routing] µtweaks
1 parent 785e4e6 commit 53b432f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Loader/ObjectRouteLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function load($resource, $type = null)
6767
if (!$routeCollection instanceof RouteCollection) {
6868
$type = \is_object($routeCollection) ? \get_class($routeCollection) : \gettype($routeCollection);
6969

70-
throw new \LogicException(sprintf('The "%s"::%s method must return a RouteCollection: "%s" returned.', \get_class($loaderObject), $method, $type));
70+
throw new \LogicException(sprintf('The "%s::%s()" method must return a RouteCollection: "%s" returned.', \get_class($loaderObject), $method, $type));
7171
}
7272

7373
// make the service file tracked so that if it changes, the cache rebuilds

Loader/XmlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ private function parseConfigs(\DOMElement $node, $path)
240240

241241
if ($controller = $node->getAttribute('controller')) {
242242
if (isset($defaults['_controller'])) {
243-
$name = $node->hasAttribute('id') ? sprintf('"%s"', $node->getAttribute('id')) : sprintf('the "%s" tag', $node->tagName);
243+
$name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName);
244244

245-
throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for %s.', $path, $name));
245+
throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for ', $path).$name);
246246
}
247247

248248
$defaults['_controller'] = $controller;

0 commit comments

Comments
 (0)