protected function registerCommands() { foreach (array_keys($this->commands) as $command) { $method = "register{$command}Command"; call_user_func_array([$this, $method], []); } $this->commands(array_values($this->commands)); }