Skip to content

Commit 9f000eb

Browse files
committed
Fix quotes in exception messages
1 parent d974f6f commit 9f000eb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

PropertyAccessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ private function getPropertyPath($propertyPath)
917917
public static function createCache($namespace, $defaultLifetime, $version, LoggerInterface $logger = null)
918918
{
919919
if (!class_exists('Symfony\Component\Cache\Adapter\ApcuAdapter')) {
920-
throw new \RuntimeException(sprintf('The Symfony Cache component must be installed to use %s().', __METHOD__));
920+
throw new \RuntimeException(sprintf('The Symfony Cache component must be installed to use "%s()".', __METHOD__));
921921
}
922922

923923
if (!ApcuAdapter::isSupported()) {

PropertyPath.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function getElements()
173173
public function getElement($index)
174174
{
175175
if (!isset($this->elements[$index])) {
176-
throw new OutOfBoundsException(sprintf('The index %s is not within the property path.', $index));
176+
throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index));
177177
}
178178

179179
return $this->elements[$index];
@@ -185,7 +185,7 @@ public function getElement($index)
185185
public function isProperty($index)
186186
{
187187
if (!isset($this->isIndex[$index])) {
188-
throw new OutOfBoundsException(sprintf('The index %s is not within the property path.', $index));
188+
throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index));
189189
}
190190

191191
return !$this->isIndex[$index];
@@ -197,7 +197,7 @@ public function isProperty($index)
197197
public function isIndex($index)
198198
{
199199
if (!isset($this->isIndex[$index])) {
200-
throw new OutOfBoundsException(sprintf('The index %s is not within the property path.', $index));
200+
throw new OutOfBoundsException(sprintf('The index "%s" is not within the property path.', $index));
201201
}
202202

203203
return $this->isIndex[$index];

PropertyPathBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function appendProperty($name)
9494
public function remove($offset, $length = 1)
9595
{
9696
if (!isset($this->elements[$offset])) {
97-
throw new OutOfBoundsException(sprintf('The offset %s is not within the property path.', $offset));
97+
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
9898
}
9999

100100
$this->resize($offset, $length, 0);
@@ -149,7 +149,7 @@ public function replace($offset, $length, $path, $pathOffset = 0, $pathLength =
149149
public function replaceByIndex($offset, $name = null)
150150
{
151151
if (!isset($this->elements[$offset])) {
152-
throw new OutOfBoundsException(sprintf('The offset %s is not within the property path.', $offset));
152+
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
153153
}
154154

155155
if (null !== $name) {
@@ -170,7 +170,7 @@ public function replaceByIndex($offset, $name = null)
170170
public function replaceByProperty($offset, $name = null)
171171
{
172172
if (!isset($this->elements[$offset])) {
173-
throw new OutOfBoundsException(sprintf('The offset %s is not within the property path.', $offset));
173+
throw new OutOfBoundsException(sprintf('The offset "%s" is not within the property path.', $offset));
174174
}
175175

176176
if (null !== $name) {

0 commit comments

Comments
 (0)