@@ -213,6 +213,10 @@ public function run()
213
213
$ this ->futureTickQueue ->tick ();
214
214
215
215
$ hasPendingCallbacks = !$ this ->futureTickQueue ->isEmpty ();
216
+ /**
217
+ * @link https://github.com/phpstan/phpstan/issues/10566
218
+ * @phpstan-ignore-next-line
219
+ */
216
220
$ wasJustStopped = !$ this ->running ;
217
221
$ nothingLeftToDo = !$ this ->readStreams
218
222
&& !$ this ->writeStreams
@@ -223,12 +227,20 @@ public function run()
223
227
// otherwise use UV::RUN_NOWAIT.
224
228
// @link http://docs.libuv.org/en/v1.x/loop.html#c.uv_run
225
229
$ flags = \UV ::RUN_ONCE ;
230
+ /**
231
+ * @link https://github.com/phpstan/phpstan/issues/10566
232
+ * @phpstan-ignore-next-line
233
+ */
226
234
if ($ wasJustStopped || $ hasPendingCallbacks ) {
227
235
$ flags = \UV ::RUN_NOWAIT ;
228
236
} elseif ($ nothingLeftToDo ) {
229
237
break ;
230
238
}
231
239
240
+ /**
241
+ * @link https://github.com/JetBrains/phpstorm-stubs/pull/1614
242
+ * @phpstan-ignore-next-line
243
+ */
232
244
\uv_run ($ this ->uv , $ flags );
233
245
}
234
246
}
@@ -261,6 +273,10 @@ private function removeStream($stream)
261
273
if (!isset ($ this ->readStreams [(int ) $ stream ])
262
274
&& !isset ($ this ->writeStreams [(int ) $ stream ])) {
263
275
\uv_poll_stop ($ this ->streamEvents [(int ) $ stream ]);
276
+ /**
277
+ * @link https://github.com/JetBrains/phpstorm-stubs/pull/1615
278
+ * @phpstan-ignore-next-line
279
+ */
264
280
\uv_close ($ this ->streamEvents [(int ) $ stream ]);
265
281
unset($ this ->streamEvents [(int ) $ stream ]);
266
282
return ;
0 commit comments