Skip to content

Commit ae2af87

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent b040da6 commit ae2af87

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

ExecutableFinder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class ExecutableFinder
2323

2424
/**
2525
* Replaces default suffixes of executable.
26+
*
27+
* @return void
2628
*/
2729
public function setSuffixes(array $suffixes)
2830
{
@@ -31,6 +33,8 @@ public function setSuffixes(array $suffixes)
3133

3234
/**
3335
* Adds new possible suffix to check for executable.
36+
*
37+
* @return void
3438
*/
3539
public function addSuffix(string $suffix)
3640
{

InputStream.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class InputStream implements \IteratorAggregate
2929

3030
/**
3131
* Sets a callback that is called when the write buffer becomes empty.
32+
*
33+
* @return void
3234
*/
3335
public function onEmpty(callable $onEmpty = null)
3436
{
@@ -40,6 +42,8 @@ public function onEmpty(callable $onEmpty = null)
4042
*
4143
* @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
4244
* stream resource or \Traversable
45+
*
46+
* @return void
4347
*/
4448
public function write(mixed $input)
4549
{
@@ -54,6 +58,8 @@ public function write(mixed $input)
5458

5559
/**
5660
* Closes the write buffer.
61+
*
62+
* @return void
5763
*/
5864
public function close()
5965
{

PhpProcess.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public static function fromShellCommandline(string $command, string $cwd = null,
5555
throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
5656
}
5757

58+
/**
59+
* @return void
60+
*/
5861
public function start(callable $callback = null, array $env = [])
5962
{
6063
if (null === $this->getCommandLine()) {

Pipes/AbstractPipes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(mixed $input)
4141
}
4242
}
4343

44-
public function close()
44+
public function close(): void
4545
{
4646
foreach ($this->pipes as $pipe) {
4747
if (\is_resource($pipe)) {
@@ -66,7 +66,7 @@ protected function hasSystemCallBeenInterrupted(): bool
6666
/**
6767
* Unblocks streams.
6868
*/
69-
protected function unblock()
69+
protected function unblock(): void
7070
{
7171
if (!$this->blocked) {
7272
return;
@@ -170,7 +170,7 @@ protected function write(): ?array
170170
/**
171171
* @internal
172172
*/
173-
public function handleError(int $type, string $msg)
173+
public function handleError(int $type, string $msg): void
174174
{
175175
$this->lastError = $msg;
176176
}

Pipes/PipesInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ public function haveReadSupport(): bool;
5757
/**
5858
* Closes file handles and pipes.
5959
*/
60-
public function close();
60+
public function close(): void;
6161
}

Pipes/WindowsPipes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function areOpen(): bool
172172
return $this->pipes && $this->fileHandles;
173173
}
174174

175-
public function close()
175+
public function close(): void
176176
{
177177
parent::close();
178178
foreach ($this->fileHandles as $type => $handle) {

0 commit comments

Comments
 (0)