File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
await-generator/src/SOFe/AwaitGenerator Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,14 @@ public static function race(array $generators) : Generator{
191191
192192 /**
193193 * Wraps a generator that executes some action before and after suspension points (`yield`s).
194+ * @phpstan-template TKey
195+ * @phpstan-template TValue
196+ * @phpstan-template TSend
197+ * @phpstan-template TReturn
198+ * @phpstan-param Generator<TKey, TValue, TSend, TReturn> $generator
199+ * @phpstan-param Closure(Generator, TValue, TKey): bool $beforeSuspend
200+ * @phpstan-param Closure(Generator, TValue, TKey, TSend): bool $afterSuspend
201+ * @phpstan-return Generator<TKey, TValue, TSend, TReturn>
194202 */
195203 public static function trap (Generator $ generator , Closure $ beforeSuspend , Closure $ afterSuspend ) : Generator {
196204 while ($ generator ->valid ()) {
You can’t perform that action at this time.
0 commit comments