8000 removed usage of backticks in exception messages · sroze/symfony@e5bb5e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e5bb5e2

Browse files
committed
removed usage of backticks in exception messages
1 parent 0cd1da6 commit e5bb5e2

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/Symfony/Component/Console/Question/Question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function setAutocompleterValues($values)
141141
}
142142

143143
if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) {
144-
throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.');
144+
throw new InvalidArgumentException('Autocompleter values can be either an array, "null" or a "Traversable" object.');
145145
}
146146

147147
if ($this->hidden) {

src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final public function factory($factory)
2727
if (\is_string($factory) && 1 === substr_count($factory, ':')) {
2828
$factoryParts = explode(':', $factory);
2929

30-
throw new InvalidArgumentException(sprintf('Invalid factory "%s": the `service:method` notation is not available when using PHP-based DI configuration. Use "[ref(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1]));
30+
throw new InvalidArgumentException(sprintf('Invalid factory "%s": the "service:method" notation is not available when using PHP-based DI configuration. Use "[ref(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1]));
3131
}
3232

3333
$this->definition->setFactory(static::processValue($factory, true));

src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testAutoConfigureAndChildDefinitionNotAllowed()
9494

9595
/**
9696
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
97-
* @expectedExceptionMessage Invalid factory "factory:method": the `service:method` notation is not available when using PHP-based DI configuration. Use "[ref('factory'), 'method']" instead.
97+
* @expectedExceptionMessage Invalid factory "factory:method": the "service:method" notation is not available when using PHP-based DI configuration. Use "[ref('factory'), 'method']" instead.
9898
*/
9999
public function testFactoryShortNotationNotAllowed()
100100
{

src/Symfony/Component/Intl/Util/GitRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private static function exec($command, $customErrorMessage = null)
9595
exec(sprintf('%s 2>&1', $command), $output, $result);
9696

9797
if (0 !== $result) {
98-
throw new RuntimeException(null !== $customErrorMessage ? $customErrorMessage : sprintf('The `%s` command failed.', $command));
98+
throw new RuntimeException(null !== $customErrorMessage ? $customErrorMessage : sprintf('The "%s" command failed.', $command));
9999
}
100100

101101
return $output;

src/Symfony/Component/Process/Process.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ public function stop($timeout = 10, $signal = null)
856856
{
857857
$timeoutMicro = microtime(true) + $timeout;
858858
if ($this->isRunning()) {
859-
// given `SIGTERM` may not be defined and that `proc_terminate` uses the constant value and not the constant itself, we use the same here
859+
// given SIGTERM may not be defined and that "proc_terminate" uses the constant value and not the constant itself, we use the same here
860860
$this->doSignal(15, false);
861861
do {
862862
usleep(1000);
@@ -1479,7 +1479,7 @@ private function doSignal(int $signal, bool $throwException): bool
14791479
}
14801480
if (!$ok) {
14811481
if ($throwException) {
1482-
throw new RuntimeException(sprintf('Error while sending signal `%s`.', $signal));
1482+
throw new RuntimeException(sprintf('Error while sending signal "%s".', $signal));
14831483
}
14841484

14851485
return false;
@@ -1553,7 +1553,7 @@ private function requireProcessIsStarted(string $functionName)
15531553
}
15541554

15551555
/**
1556-
* Ensures the process is terminated, throws a LogicException if the process has a status different than `terminated`.
1556+
* Ensures the process is terminated, throws a LogicException if the process has a status differ 67E6 ent than "terminated".
15571557
*
15581558
* @throws LogicException if the process is not yet terminated
15591559
*/

src/Symfony/Component/Yaml/Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ private static function parseTag(string $value, int &$i, int $flags): ?string
684684
return $tag;
685685
}
686686

687-
throw new ParseException(sprintf('Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
687+
throw new ParseException(sprintf('Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
688688
}
689689

690690
public static function evaluateBinaryScalar(string $scalar): string

src/Symfony/Component/Yaml/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ private function isStringUnIndentedCollectionItem(): bool
979979
}
980980

981981
/**
982-
* A local wrapper for `preg_match` which will throw a ParseException if there
982+
* A local wrapper for "preg_match" which will throw a ParseException if there
983983
* is an internal error in the PCRE engine.
984984
*
985985
* This avoids us needing to check for "false" every time PCRE is used
@@ -1023,7 +1023,7 @@ public static function preg_match(string $pattern, string $subject, array &$matc
10231023
/**
10241024
* Trim the tag on top of the value.
10251025
*
1026-
* Prevent values such as `!foo {quz: bar}` to be considered as
1026+
* Prevent values such as "!foo {quz: bar}" to be considered as
10271027
* a mapping block.
10281028
*/
10291029
private function trimTag(string $value): string
@@ -1056,6 +1056,6 @@ private function getLineTag(string $value, int $flags, bool $nextLineCheck = tru
10561056
return $tag;
10571057
}
10581058

1059-
throw new ParseException(sprintf('Tags support is not enabled. You must use the flag `Yaml::PARSE_CUSTOM_TAGS` to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
1059+
throw new ParseException(sprintf('Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename);
10601060
}
10611061
}

src/Symfony/Component/Yaml/Tests/ParserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ public function testScalarInSequence()
788788
*
789789
* > It is an error for two equal keys to appear in the same mapping node.
790790
* > In such a case the YAML processor may continue, ignoring the second
791-
* > `key: value` pair and issuing an appropriate warning. This strategy
791+
* > "key: value" pair and issuing an appropriate warning. This strategy
792792
* > preserves a consistent information model for one-pass and random access
793793
* > applications.
794794
*
@@ -1698,7 +1698,7 @@ public function testNonSpecificTagSupport()
16981698

16991699
/**
17001700
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
1701-
* @expectedExceptionMessage Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!iterator" at line 1 (near "!iterator [foo]").
1701+
* @expectedExceptionMessage Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!iterator" at line 1 (near "!iterator [foo]").
17021702
*/
17031703
public function testCustomTagsDisabled()
17041704
{
@@ -1707,7 +1707,7 @@ public function testCustomTagsDisabled()
17071707

17081708
/**
17091709
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
1710-
* @expectedExceptionMessage Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!iterator" at line 1 (near "!iterator foo").
1710+
* @expectedExceptionMessage Tags support is not enabled. Enable the "Yaml::PARSE_CUSTOM_TAGS" flag to use "!iterator" at line 1 (near "!iterator foo").
17111711
*/
17121712
public function testUnsupportedTagWithScalar()
17131713
{

0 commit comments

Comments
 (0)
0