Skip to content

Commit 04c6bb1

Browse files
committed
Fix more quotes in exception messages
1 parent 7ca8560 commit 04c6bb1

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

InputStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function write($input)
4545
return;
4646
}
4747
if ($this->isClosed()) {
48-
throw new RuntimeException(sprintf('%s is closed.', static::class));
48+
throw new RuntimeException(sprintf('"%s" is closed.', static::class));
4949
}
5050
$this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
5151
}

Pipes/AbstractPipes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function write()
107107
} elseif (!isset($this->inputBuffer[0])) {
108108
if (!\is_string($input)) {
109109
if (!is_scalar($input)) {
110-
throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
110+
throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input)));
111111
}
112112
$input = (string) $input;
113113
}

ProcessUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static function validateInput($caller, $input)
110110
return new \IteratorIterator($input);
111111
}
112112

113-
throw new InvalidArgumentException(sprintf('%s only accepts strings, Traversable objects or stream resources.', $caller));
113+
throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
114114
}
115115

116116
return $input;

Tests/ProcessBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function testShouldReturnProcessWithEnabledOutput()
200200
public function testInvalidInput()
201201
{
202202
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
203-
$this->expectExceptionMessage('Symfony\Component\Process\ProcessBuilder::setInput only accepts strings, Traversable objects or stream resources.');
203+
$this->expectExceptionMessage('"Symfony\Component\Process\ProcessBuilder::setInput" only accepts strings, Traversable objects or stream resources.');
204204
$builder = ProcessBuilder::create();
205205
$builder->setInput([]);
206206
}

Tests/ProcessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function testSetInputWhileRunningThrowsAnException()
263263
public function testInvalidInput($value)
264264
{
265265
$this->expectException('Symfony\Component\Process\Exception\InvalidArgumentException');
266-
$this->expectExceptionMessage('Symfony\Component\Process\Process::setInput only accepts strings, Traversable objects or stream resources.');
266+
$this->expectExceptionMessage('"Symfony\Component\Process\Process::setInput" only accepts strings, Traversable objects or stream resources.');
267267
$process = $this->getProcess('foo');
268268
$process->setInput($value);
269269
}

0 commit comments

Comments
 (0)