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:
@@ -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 [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user