Skip to content

Commit e96c4f6

Browse files
Narrow existing return types on private/internal/final/test methods
1 parent 26416cc commit e96c4f6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Process.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,11 @@ public function run(callable $callback = null, array $env = []): int
258258
* This is identical to run() except that an exception is thrown if the process
259259
* exits with a non-zero exit code.
260260
*
261-
* @return $this
262-
*
263261
* @throws ProcessFailedException if the process didn't terminate successfully
264262
*
265263
* @final
266264
*/
267-
public function mustRun(callable $callback = null, array $env = []): self
265+
public function mustRun(callable $callback = null, array $env = []): static
268266
{
269267
if (0 !== $this->run($callback, $env)) {
270268
throw new ProcessFailedException($this);
@@ -374,16 +372,14 @@ public function start(callable $callback = null, array $env = [])
374372
* @param callable|null $callback A PHP callback to run whenever there is some
375373
* output available on STDOUT or STDERR
376374
*
377-
* @return static
378-
*
379375
* @throws RuntimeException When process can't be launched
380376
* @throws RuntimeException When process is already running
381377
*
382378
* @see start()
383379
*
384380
* @final
385381
*/
386-
public function restart(callable $callback = null, array $env = []): self
382+
public function restart(callable $callback = null, array $env = []): static
387383
{
388384
if ($this->isRunning()) {
389385
throw new RuntimeException('Process is already running.');

0 commit comments

Comments
 (0)