X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=inline;f=examples%2Fcli.php;fp=examples%2Fcli.php;h=fc72130200e41c390d9342d50e84057ca98bba01;hb=e368287b3cd2dd40945ac8d1a1946bc32268007d;hp=650ca8541e62f121766dabe369872103ce6b27a9;hpb=f4aa6beaf2e1f0dc9c877782cbbad5a989194517;p=m6w6%2Fseekat diff --git a/examples/cli.php b/examples/cli.php old mode 100644 new mode 100755 index 650ca85..fc72130 --- a/examples/cli.php +++ b/examples/cli.php @@ -1,24 +1,25 @@ +#!/usr/bin/env php "token ".getenv("GITHUB_TOKEN") ]); array_shift($argv); -($self = function($api) use(&$self) { +($self = function($error, $api) use(&$self) { global $argv; while (null !== ($arg = array_shift($argv))) { if ("." === $arg) { - $api->then($self); + $api->when($self); return; } $api = $api->$arg; } echo $api, "\n"; -})($api); +})(null, $api); $api->send();