diff options
author | nashe <thomas@chauchefoin.fr> | 2017-10-17 09:42:31 +0200 |
---|---|---|
committer | nashe <thomas@chauchefoin.fr> | 2017-10-17 09:42:31 +0200 |
commit | 1b341502ba68092b444a7870d601537eec68b344 (patch) | |
tree | c99532de86e48fb7646620c2d2a30f5b33a23528 /app | |
parent | db2ab071c73feb6ac510bfdc6ee5b9ddad1566ea (diff) | |
download | planet-1b341502ba68092b444a7870d601537eec68b344.tar planet-1b341502ba68092b444a7870d601537eec68b344.tar.gz planet-1b341502ba68092b444a7870d601537eec68b344.tar.bz2 planet-1b341502ba68092b444a7870d601537eec68b344.tar.xz planet-1b341502ba68092b444a7870d601537eec68b344.zip |
Cleanup install.php
Diffstat (limited to 'app')
-rw-r--r-- | app/classes/PlanetConfig.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/classes/PlanetConfig.php b/app/classes/PlanetConfig.php index 4348524..f3928bc 100644 --- a/app/classes/PlanetConfig.php +++ b/app/classes/PlanetConfig.php @@ -6,9 +6,9 @@ class PlanetConfig { - protected $conf = array(); + protected $conf = []; - protected $defaultConfig = array( + public static $defaultConfig = [ 'url' => 'http://www.example.com/', 'name' => '', 'locale' => 'en', @@ -22,7 +22,7 @@ class PlanetConfig 'cachedir' => './cache', 'debug' => false, 'checkcerts' => true, - ); + ]; /** * PlanetConfig constructor. @@ -31,7 +31,7 @@ class PlanetConfig */ public function __construct($userConfig = [], $useDefaultConfig = true) { - $default = $useDefaultConfig ? $this->defaultConfig : array(); + $default = $useDefaultConfig ? self::$defaultConfig : array(); $this->conf = $this->merge($default, $userConfig); } @@ -42,7 +42,7 @@ class PlanetConfig * @param array $user * @return array */ - protected function merge($default, $user) + protected function merge($default = [], $user = []) { return array_merge($default, $this->normalizeArrayKeys($user)); } @@ -131,7 +131,7 @@ class PlanetConfig */ public function getDefaultConfig() { - return $this->defaultConfig; + return self::$defaultConfig; } /** |