Updating type-hints and some naming conventions

This commit is contained in:
Philipp Holzer 2019-02-04 09:30:48 +01:00
parent 1c51d7d22f
commit d78ac57514
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
9 changed files with 74 additions and 74 deletions

View file

@ -22,7 +22,7 @@ class ConfigCache implements IConfigCache, IPConfigCache
/**
* @param array $config A initial config array
*/
public function __construct($config = [])
public function __construct(array $config = [])
{
$this->config = [];
@ -43,9 +43,9 @@ class ConfigCache implements IConfigCache, IPConfigCache
foreach ($config as $category => $values) {
foreach ($values as $key => $value) {
if ($overwrite) {
self::set($category, $key, $value);
$this->set($category, $key, $value);
} else {
self::setDefault($category, $key, $value);
$this->setDefault($category, $key, $value);
}
}
}
@ -83,7 +83,7 @@ class ConfigCache implements IConfigCache, IPConfigCache
private function setDefault($cat, $k, $v)
{
if (!isset($this->config[$cat][$k])) {
self::set($cat, $k, $v);
$this->set($cat, $k, $v);
}
}