Skip to content

Commit b076aa9

Browse files
mvoriseknicolas-grekas
authored andcommitted
Fix "can not" spelling
1 parent a3ab479 commit b076aa9

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Process.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function disableOutput()
530530
throw new RuntimeException('Disabling output while the process is running is not possible.');
531531
}
532532
if (null !== $this->idleTimeout) {
533-
throw new LogicException('Output can not be disabled while an idle timeout is set.');
533+
throw new LogicException('Output cannot be disabled while an idle timeout is set.');
534534
}
535535

536536
$this->outputDisabled = true;
@@ -814,7 +814,7 @@ public function getTermSignal()
814814
$this->requireProcessIsTerminated(__FUNCTION__);
815815

816816
if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) {
817-
throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.');
817+
throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal cannot be retrieved.');
818818
}
819819

820820
return $this->processInformation['termsig'];
@@ -1038,7 +1038,7 @@ public function setTimeout(?float $timeout)
10381038
public function setIdleTimeout(?float $timeout)
10391039
{
10401040
if (null !== $timeout && $this->outputDisabled) {
1041-
throw new LogicException('Idle timeout can not be set while the output is disabled.');
1041+
throw new LogicException('Idle timeout cannot be set while the output is disabled.');
10421042
}
10431043

10441044
$this->idleTimeout = $this->validateTimeout($timeout);
@@ -1155,7 +1155,7 @@ public function getEnv()
11551155
*/
11561156
public function setEnv(array $env)
11571157
{
1158-
// Process can not handle env values that are arrays
1158+
// Process cannot handle env values that are arrays
11591159
$env = array_filter($env, function ($value) {
11601160
return !\is_array($value);
11611161
});
@@ -1189,7 +1189,7 @@ public function getInput()
11891189
public function setInput($input)
11901190
{
11911191
if ($this->isRunning()) {
1192-
throw new LogicException('Input can not be set while the process is running.');
1192+
throw new LogicException('Input cannot be set while the process is running.');
11931193
}
11941194

11951195
$this->input = ProcessUtils::validateInput(__METHOD__, $input);
@@ -1514,7 +1514,7 @@ private function doSignal(int $signal, bool $throwException): bool
15141514
{
15151515
if (null === $pid = $this->getPid()) {
15161516
if ($throwException) {
1517-
throw new LogicException('Can not send signal on a non running process.');
1517+
throw new LogicException('Cannot send signal on a non running process.');
15181518
}
15191519

15201520
return false;

Tests/ProcessTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function testLiveStreamAsInput()
276276
public function testSetInputWhileRunningThrowsAnException()
277277
{
278278
$this->expectException(LogicException::class);
279-
$this->expectExceptionMessage('Input can not be set while the process is running.');
279+
$this->expectExceptionMessage('Input cannot be set while the process is running.');
280280
$process = $this->getProcessForCode('sleep(30);');
281281
$process->start();
282282
try {
@@ -938,7 +938,7 @@ public function testExitCodeIsAvailableAfterSignal()
938938
public function testSignalProcessNotRunning()
939939
{
940940
$this->expectException(LogicException::class);
941-
$this->expectExceptionMessage('Can not send signal on a non running process.');
941+
$this->expectExceptionMessage('Cannot send signal on a non running process.');
942942
$process = $this->getProcess('foo');
943943
$process->signal(1); // SIGHUP
944944
}
@@ -1057,7 +1057,7 @@ public function testEnableOrDisableOutputAfterRunDoesNotThrowException()
10571057
public function testDisableOutputWhileIdleTimeoutIsSet()
10581058
{
10591059
$this->expectException(LogicException::class);
1060-
$this->expectExceptionMessage('Output can not be disabled while an idle timeout is set.');
1060+
$this->expectExceptionMessage('Output cannot be disabled while an idle timeout is set.');
10611061
$process = $this->getProcess('foo');
10621062
$process->setIdleTimeout(1);
10631063
$process->disableOutput();
@@ -1066,7 +1066,7 @@ public function testDisableOutputWhileIdleTimeoutIsSet()
10661066
public function testSetIdleTimeoutWhileOutputIsDisabled()
10671067
{
10681068
$this->expectException(LogicException::class);
1069-
$this->expectExceptionMessage('timeout can not be set while the output is disabled.');
1069+
$this->expectExceptionMessage('timeout cannot be set while the output is disabled.');
10701070
$process = $this->getProcess('foo');
10711071
$process->disableOutput();
10721072
$process->setIdleTimeout(1);

0 commit comments

Comments
 (0)