mirror of
https://github.com/danog/amp.git
synced 2024-12-03 09:57:51 +01:00
Increase psalm error level to level 4
This commit is contained in:
parent
603ce25299
commit
0e04422dcb
@ -33,7 +33,6 @@ final class Coroutine implements Promise
|
||||
|
||||
try {
|
||||
if (\is_array($yielded)) {
|
||||
/** @var array<array-key, Promise|ReactPromise> $yielded */
|
||||
return Promise\all($yielded);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,8 @@ use React\Promise\PromiseInterface as ReactPromise;
|
||||
/**
|
||||
* Creates a failed promise using the given exception.
|
||||
*
|
||||
* @template-implements Promise<?>
|
||||
* @template-covariant TValue
|
||||
* @template-implements Promise<TValue>
|
||||
*/
|
||||
final class Failure implements Promise
|
||||
{
|
||||
|
@ -70,9 +70,11 @@ trait Placeholder
|
||||
}
|
||||
|
||||
if (!$this->onResolved instanceof ResolutionQueue) {
|
||||
/** @psalm-suppress InternalClass */
|
||||
$this->onResolved = new ResolutionQueue($this->onResolved);
|
||||
}
|
||||
|
||||
/** @psalm-suppress InternalMethod */
|
||||
$this->onResolved->push($onResolved);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ use React\Promise\PromiseInterface as ReactPromise;
|
||||
* Stores a set of functions to be invoked when a promise is resolved.
|
||||
*
|
||||
* @internal
|
||||
* @psalm-internal Amp
|
||||
* @psalm-internal Amp\Internal
|
||||
*/
|
||||
class ResolutionQueue
|
||||
{
|
||||
|
@ -134,6 +134,7 @@ abstract class Driver
|
||||
}
|
||||
}
|
||||
|
||||
/** @psalm-suppress RedundantCondition */
|
||||
$this->dispatch(empty($this->nextTickQueue) && empty($this->enableQueue) && $this->running && !$this->isEmpty());
|
||||
}
|
||||
|
||||
|
@ -171,6 +171,7 @@ class UvDriver extends Driver
|
||||
*/
|
||||
public function now(): int
|
||||
{
|
||||
/** @psalm-suppress TooManyArguments */
|
||||
return \uv_now($this->handle);
|
||||
}
|
||||
|
||||
@ -187,6 +188,7 @@ class UvDriver extends Driver
|
||||
*/
|
||||
protected function dispatch(bool $blocking)
|
||||
{
|
||||
/** @psalm-suppress TooManyArguments */
|
||||
\uv_run($this->handle, $blocking ? \UV::RUN_ONCE : \UV::RUN_NOWAIT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user