First class callable syntax

This commit is contained in:
Jake Barnby 2025-05-06 13:36:45 +12:00
parent 66a40eb175
commit cc4c147b15
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -49,7 +49,7 @@ class Specs extends Action
->desc('Generate Appwrite API specifications')
->param('version', 'latest', new Text(16), 'Spec version', true)
->param('mode', 'normal', new WhiteList(['normal', 'mocks']), 'Spec Mode', true)
->callback([$this, 'action']);
->callback($this->action(...));
}
public function action(string $version, string $mode): void