1
0
mirror of https://github.com/danog/amp.git synced 2024-12-11 00:49:48 +01:00

Fix invalid types in doc comments

We're on the way to psalm error level 4, but there are still some remaining issues.
This commit is contained in:
Niklas Keller 2020-03-28 14:32:53 +01:00
parent 71d7f5674c
commit 603ce25299
4 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ trait Producer
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @return Promise<TValue> * @return TValue
*/ */
public function getCurrent() public function getCurrent()
{ {

View File

@ -252,7 +252,7 @@ class NativeDriver extends Driver
} }
if ($timeout > 0) { // Otherwise sleep with usleep() if $timeout > 0. if ($timeout > 0) { // Otherwise sleep with usleep() if $timeout > 0.
\usleep($timeout * self::MICROSEC_PER_SEC); \usleep((int) ($timeout * self::MICROSEC_PER_SEC));
} }
} }

View File

@ -14,7 +14,7 @@ final class Producer implements Iterator
use CallableMaker, Internal\Producer; 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. * @throws \Error Thrown if the callable does not return a Generator.
*/ */

View File

@ -10,7 +10,7 @@ namespace Amp;
class TimeoutException extends \Exception class TimeoutException extends \Exception
{ {
/** /**
* @param string|null $message Exception message. * @param string $message Exception message.
*/ */
public function __construct(string $message = "Operation timed out") public function __construct(string $message = "Operation timed out")
{ {