Make PHPCI output properly formatted JSON and Yaml files where possible, rather than one-line files.
Closes #547
This commit is contained in:
parent
abfea65c31
commit
6ab7973fd2
3 changed files with 18 additions and 3 deletions
|
|
@ -138,11 +138,16 @@ class SettingsController extends Controller
|
|||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert config to yaml and store to file.
|
||||
* @return mixed
|
||||
*/
|
||||
protected function storeSettings()
|
||||
{
|
||||
$dumper = new Dumper();
|
||||
$yaml = $dumper->dump($this->settings);
|
||||
$yaml = $dumper->dump($this->settings, 4);
|
||||
file_put_contents(APPLICATION_PATH . 'PHPCI/config.yml', $yaml);
|
||||
|
||||
if (error_get_last()) {
|
||||
$error_get_last = error_get_last();
|
||||
return $error_get_last['message'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue