public function initConfig() { if (is_file($this->configPath)) { $this->config = Yaml::parse($this->configPath); } // Ensure salts have enough spaces to prevent YAML parse errors if ($this->has('wordpress')) { foreach ($this->get('wordpress') as $env => $settings) { $property = 'wordpress.' . $env . '.salts'; $salts = Validators::validateSalts($this->get($property)); $this->set($property, $salts); } } return $this->getConfig(); }
private function guessSalts() { return Validators::validateSalts(file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/')); }