mirror of
https://github.com/danog/amp.git
synced 2024-12-11 08:59:46 +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:
parent
71d7f5674c
commit
603ce25299
@ -76,7 +76,7 @@ trait Producer
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @return Promise<TValue>
|
* @return TValue
|
||||||
*/
|
*/
|
||||||
public function getCurrent()
|
public function getCurrent()
|
||||||
{
|
{
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
@ -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")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user