diff --git a/lib/Internal/Producer.php b/lib/Internal/Producer.php index 33751a3..c955755 100644 --- a/lib/Internal/Producer.php +++ b/lib/Internal/Producer.php @@ -76,7 +76,7 @@ trait Producer /** * {@inheritdoc} * - * @return Promise + * @return TValue */ public function getCurrent() { diff --git a/lib/Loop/NativeDriver.php b/lib/Loop/NativeDriver.php index a253ab5..5be332b 100644 --- a/lib/Loop/NativeDriver.php +++ b/lib/Loop/NativeDriver.php @@ -252,7 +252,7 @@ class NativeDriver extends Driver } if ($timeout > 0) { // Otherwise sleep with usleep() if $timeout > 0. - \usleep($timeout * self::MICROSEC_PER_SEC); + \usleep((int) ($timeout * self::MICROSEC_PER_SEC)); } } diff --git a/lib/Producer.php b/lib/Producer.php index 82895f6..35b88c9 100644 --- a/lib/Producer.php +++ b/lib/Producer.php @@ -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. */ diff --git a/lib/TimeoutException.php b/lib/TimeoutException.php index 719c560..dc7fba9 100644 --- a/lib/TimeoutException.php +++ b/lib/TimeoutException.php @@ -10,7 +10,7 @@ namespace Amp; class TimeoutException extends \Exception { /** - * @param string|null $message Exception message. + * @param string $message Exception message. */ public function __construct(string $message = "Operation timed out") {