argument('channel'); if (! in_array($channel, ['stable', 'preview', 'nightly'], true)) { $this->error("{$channel} is not an update channel, expected stable, preview or nightly"); return self::FAILURE; } $settings = instanceSettings(); $settings->switchUpdateChannel($channel); $settings->save(); invalidate_versions_cache(); $this->info("The instance follows the {$channel} channel"); return self::SUCCESS; } }