/** * Loads the local configuration from "~/.localhook/config.json" file. */ protected function loadConfiguration() { try { $configuration = $this->configurationStorage->loadFromFile()->get(); } catch (NoConfigurationException $e) { $this->io->comment($e->getMessage()); if (!$this->secret) { $this->secret = $this->io->ask('Secret'); } $configuration = $this->parseConfigurationKey(); } $this->serverUrl = $configuration['socket_url']; $this->secret = $configuration['secret']; $this->configurationStorage->merge($configuration)->save(); }