Skip to content

Commit dc11866

Browse files
committed
Fix quotes in exception messages
1 parent a1531aa commit dc11866

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Loader/ObjectRouteLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function load($resource, $type = null)
5555
$loaderObject = $this->getServiceObject($serviceString);
5656

5757
if (!\is_object($loaderObject)) {
58-
throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned.', static::class, \gettype($loaderObject)));
58+
throw new \LogicException(sprintf('%s:getServiceObject() must return an object: "%s" returned.', static::class, \gettype($loaderObject)));
5959
}
6060

6161
if (!method_exists($loaderObject, $method)) {
@@ -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

RouteCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static function compilePattern(Route $route, $pattern, $isHost)
139139
}
140140

141141
if (\strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) {
142-
throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern));
142+
throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %d characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern));
143143
}
144144

145145
if ($isSeparator && $precedingText !== $precedingChar) {

0 commit comments

Comments
 (0)