drop async-interop
[m6w6/seekat] / examples / cli.php
index fc72130200e41c390d9342d50e84057ca98bba01..caae47c17d0c802b468a60bf5cb15f4b00364556 100755 (executable)
@@ -8,18 +8,18 @@ $api = new seekat\API(seekat\API\Future\react(), [
 ]);
 array_shift($argv);
 
-($self = function($error, $api) use(&$self) {
+($self = function($api) use(&$self) {
        global $argv;
 
        while (null !== ($arg = array_shift($argv))) {
                if ("." === $arg) {
-                       $api->when($self);
+                       $api->then($self);
                        return;
                }
                $api = $api->$arg;
        }
 
        echo $api, "\n";
-})(null, $api);
+})($api);
 
 $api->send();