Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 24, 2020
1 parent 253b9e6 commit 4636999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Process/Runnable/Runnable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace PHPStan\Process\Runnable;

use React\Promise\PromiseInterface;
use React\Promise\CancellablePromiseInterface;

interface Runnable
{

public function getName(): string;

public function run(): PromiseInterface;
public function run(): CancellablePromiseInterface;

public function cancel(): void;

Expand Down
5 changes: 3 additions & 2 deletions tests/PHPStan/Process/Runnable/RunnableStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace PHPStan\Process\Runnable;

use React\Promise\CancellablePromiseInterface;
use React\Promise\Deferred;
use React\Promise\PromiseInterface;

class RunnableStub implements Runnable
{
Expand All @@ -30,8 +30,9 @@ public function finish(): void
$this->deferred->resolve();
}

public function run(): PromiseInterface
public function run(): CancellablePromiseInterface
{
/** @var CancellablePromiseInterface */
return $this->deferred->promise();
}

Expand Down

0 comments on commit 4636999

Please sign in to comment.