Skip to content

Commit

Permalink
Fix invalid types in doc comments
Browse files Browse the repository at this point in the history
We're on the way to psalm error level 4, but there are still some remaining issues.
  • Loading branch information
kelunik committed Mar 28, 2020
1 parent 71d7f56 commit 603ce25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Internal/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function advance(): Promise
/**
* {@inheritdoc}
*
* @return Promise<TValue>
* @return TValue
*/
public function getCurrent()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Loop/NativeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private function selectStreams(array $read, array $write, int $timeout)
}

if ($timeout > 0) { // Otherwise sleep with usleep() if $timeout > 0.
\usleep($timeout * self::MICROSEC_PER_SEC);
\usleep((int) ($timeout * self::MICROSEC_PER_SEC));
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class Producer implements Iterator
use CallableMaker, Internal\Producer;

/**
* @param callable(callable(TValue $value): Promise $emit): \Generator $producer
* @param callable(callable(TValue):Promise):\Generator $producer
*
* @throws \Error Thrown if the callable does not return a Generator.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/TimeoutException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TimeoutException extends \Exception
{
/**
* @param string|null $message Exception message.
* @param string $message Exception message.
*/
public function __construct(string $message = "Operation timed out")
{
Expand Down

0 comments on commit 603ce25

Please sign in to comment.