. */ namespace SP\Modules\Cli; use SP\Modules\Cli\Commands\BackupCommand; use SP\Modules\Cli\Commands\CommandBase; use SP\Modules\Cli\Commands\Crypt\UpdateMasterPasswordCommand; use SP\Modules\Cli\Commands\InstallCommand; /** * A helper to instantiate CLI commands */ final class CliCommandHelper { /** * @var CommandBase[] */ private array $commands; public function __construct( InstallCommand $installCommand, BackupCommand $backupCommand, UpdateMasterPasswordCommand $updateMasterPasswordCommand ) { $this->commands = [ $installCommand, $backupCommand, $updateMasterPasswordCommand, ]; } /** * @return CommandBase[] */ public function getCommands(): array { return $this->commands; } }