Skip to content

Commit

Permalink
Fix phpstan!
Browse files Browse the repository at this point in the history
  • Loading branch information
VennDev authored Aug 28, 2024
1 parent 5954913 commit 67fe588
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
26 changes: 24 additions & 2 deletions src/vennv/vapm/ChildCoroutine.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,34 @@
interface ChildCoroutineInterface
{

/**
* @param Exception $exception
* @return void
*
* This function sets the exception.
*/
public function setException(Exception $exception): void;

public function run(): ChildCoroutineInterface;
/**
* @return ChildCoroutine
*
* This function runs the coroutine.
*/

public function run(): ChildCoroutine;

/**
* @return bool
*
* This function checks if the coroutine is finished.
*/
public function isFinished(): bool;

/**
* @return mixed
*
* This function returns the return value of the coroutine.
*/
public function getReturn(): mixed;

}
Expand All @@ -56,7 +78,7 @@ public function setException(Exception $exception): void
$this->exception = $exception;
}

public function run(): ChildCoroutineInterface
public function run(): ChildCoroutine
{
$this->coroutine->send($this->coroutine->current());
return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/vennv/vapm/Mutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function isLocked(): bool
}

/**
* @return void
* @return Generator
*
* This function locks the mutex.
*/
Expand All @@ -80,7 +80,7 @@ public function lock(): Generator
}

/**
* @return void
* @return Generator
*
* This function unlocks the mutex.
*/
Expand Down

0 comments on commit 67fe588

Please sign in to comment.