X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=examples%2Fhooks.php;h=612e6de75dbfc014f7ac97daaf11a7152896e50a;hb=cac6bea94e6cde142c951566fa6387ffa54eb3cb;hp=dfcb6359d51d19bf154570cb8e761ab90cae90a8;hpb=e368287b3cd2dd40945ac8d1a1946bc32268007d;p=m6w6%2Fseekat diff --git a/examples/hooks.php b/examples/hooks.php index dfcb635..612e6de 100755 --- a/examples/hooks.php +++ b/examples/hooks.php @@ -30,7 +30,8 @@ $api(function() use($api) { foreach ($repos as $repo) { $batch[] = $repo->hooks(); } - foreach (yield $batch as $key => $hooks) { + $result = yield $batch; + foreach ($result as $key => $hooks) { if (!count($hooks)) { continue; }