1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

update callback code

This commit is contained in:
Damodar Lohani 2022-11-14 10:24:16 +00:00
parent bbcce5e018
commit d15af1ae17
10 changed files with 10 additions and 10 deletions

View file

@ -25,7 +25,7 @@ class Doctor extends Action
$this
->desc('Validate server health')
->inject('register')
->callback(fn (Registry $register) => $this->action($register));
->callback($this->action);
}
public function action(Registry $register): void

View file

@ -28,7 +28,7 @@ class Install extends Action
->param('organization', 'appwrite', new Text(0), 'Docker Registry organization', true)
->param('image', 'appwrite', new Text(0), 'Main appwrite docker image', true)
->param('interactive', 'Y', new Text(1), 'Run an interactive session', true)
->callback(fn ($httpPort, $httpsPort, $organization, $image, $interactive) => $this->action($httpPort, $httpsPort, $organization, $image, $interactive));
->callback($this->action);
}
public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive): void

View file

@ -25,7 +25,7 @@ class Maintenance extends Action
$this
->desc('Schedules maintenance tasks and publishes them to resque')
->inject('dbForConsole')
->callback(fn (Database $dbForConsole) => $this->action($dbForConsole));
->callback($this->action);
}
public function action(Database $dbForConsole): void

View file

@ -25,7 +25,7 @@ class Migrate extends Action
->desc('Migrate Appwrite to new version')
->param('version', APP_VERSION_STABLE, new Text(8), 'Version to migrate to.', true)
->inject('register')
->callback(fn ($version, $register) => $this->action($version, $register));
->callback($this->action);
}
public function action(string $version, Registry $register)

View file

@ -36,7 +36,7 @@ class SDKs extends Action
{
$this
->desc('Generate Appwrite SDKs')
->callback(fn () => $this->action());
->callback($this->action);
}
public function action(): void

View file

@ -21,7 +21,7 @@ class SSL extends Action
$this
->desc('Validate server certificates')
->param('domain', App::getEnv('_APP_DOMAIN', ''), new Hostname(), 'Domain to generate certificate for. If empty, main domain will be used.', true)
->callback(fn ($domain) => $this->action($domain));
->callback($this->action);
}
public function action(string $domain): void

View file

@ -35,7 +35,7 @@ class Specs extends Action
->param('version', 'latest', new Text(16), 'Spec version', true)
->param('mode', 'normal', new WhiteList(['normal', 'mocks']), 'Spec Mode', true)
->inject('register')
->callback(fn (string $version, string $mode, Registry $register) => $this->action($version, $mode, $register));
->callback($this->action);
}
public function action(string $version, string $mode, Registry $register): void

View file

@ -28,7 +28,7 @@ class Usage extends Action
->inject('dbForConsole')
->inject('influxdb')
->inject('logError')
->callback(fn ($type, $dbForConsole, $influxDB, $logError) => $this->action($type, $dbForConsole, $influxDB, $logError));
->callback($this->action);
}
protected function aggregateTimeseries(UtopiaDatabase $database, InfluxDatabase $influxDB, callable $logError): void

View file

@ -18,7 +18,7 @@ class Vars extends Action
{
$this
->desc('List all the server environment variables')
->callback(fn () => $this->action());
->callback($this->action);
}
public function action(): void

View file

@ -22,7 +22,7 @@ class VolumeSync extends Action
->param('source', null, new Text(255), 'Source path to sync from.', false)
->param('destination', null, new Text(255), 'Destination path to sync to.', false)
->param('interval', null, new Integer(true), 'Interval to run rsync', false)
->callback(fn ($source, $destination, $interval) => $this->action($source, $destination, $interval));
->callback($this->action);
}
public function action(string $source, string $destination, int $interval)