mirror of
https://github.com/danog/loop.git
synced 2024-11-30 04:19:04 +01:00
Cs-fix and psalm fixes
This commit is contained in:
parent
db84c4851f
commit
b1941cc6a7
@ -67,6 +67,7 @@ trait ResumableLoop
|
||||
AmpLoop::cancel($this->resumeTimer);
|
||||
$this->resumeTimer = null;
|
||||
}
|
||||
/** @psalm-suppress MixedArgumentTypeCoercion */
|
||||
$this->resumeTimer = AmpLoop::delay($time, \Closure::fromCallable([$this, 'resumeInternal']));
|
||||
}
|
||||
|
||||
@ -103,6 +104,7 @@ trait ResumableLoop
|
||||
*/
|
||||
public function resumeDefer(): Promise
|
||||
{
|
||||
/** @psalm-suppress MixedArgumentTypeCoercion */
|
||||
AmpLoop::defer(Closure::fromCallable([$this, 'resumeInternal']));
|
||||
if (!$this->pause) {
|
||||
$this->pause = new Deferred;
|
||||
|
@ -63,6 +63,7 @@ trait SignalLoop
|
||||
public function waitSignal($promise): Promise
|
||||
{
|
||||
if ($promise instanceof \Generator) {
|
||||
/** @psalm-suppress MixedArgumentTypeCoercion */
|
||||
$promise = new Coroutine($promise);
|
||||
}
|
||||
$this->signalDeferred = new Deferred();
|
||||
|
@ -105,7 +105,7 @@ class ResumableTest extends Fixtures
|
||||
}
|
||||
|
||||
/**
|
||||
* Test pausing loop and then resuming it with deferOnce
|
||||
* Test pausing loop and then resuming it with deferOnce.
|
||||
*
|
||||
* @param ResumableInterface $loop Loop
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user