*
* @return null|mixed Returns the value of the Config entry or null if not set
*/
- public function get(string $cat, $key = null)
+ public function get(string $cat, string $key = null)
{
if (isset($this->config[$cat][$key])) {
return $this->config[$cat][$key];
*
* @return null|string The value of the config entry or null if not set
*/
- public function get(int $uid, string $cat, $key = null)
+ public function get(int $uid, string $cat, string $key = null)
{
if (isset($this->config[$uid][$cat][$key])) {
return $this->config[$uid][$cat][$key];
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get('system'));
+
+ // explicit null as key
+ $this->assertEquals([
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ ], $configCache->get('system', null));
}
/**
'key1' => 'value1',
'key2' => 'value2',
], $configCache->get($uid, 'system'));
+
+ // test explicit cat with null as key
+ $this->assertEquals([
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ ], $configCache->get($uid, 'system', null));
}
/**