1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-28 15:29:59 +02:00

feat(core): update Config API #428

This commit is contained in:
Awilum
2020-05-24 16:42:54 +03:00
parent 223bd954d6
commit 3229697cc4

View File

@@ -36,17 +36,15 @@ class Config
* @param string $key The key of the config item to get.
* @param mixed $default Default value
*
* @return array
* @return mixed
*/
public function get(string $config, $key, $default = null) : array
public function get(string $config, $key, $default = null)
{
$config_file = $this->getFileLocation($config);
if (Filesystem::has($config_file)) {
return Arr::get($this->flextype->serializer->decode(Filesystem::read($config_file), 'yaml'), $key, $default);
}
return [];
}
/**