mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Optimized code
This commit is contained in:
parent
204b1ac3da
commit
cf6ad5b1e5
@ -21,7 +21,7 @@ interface ConfigInterface
|
||||
* @param mixed $default default value of the entry when does not found
|
||||
* @return mixed entry
|
||||
*/
|
||||
public function get(string $key, $default);
|
||||
public function get(string $key, $default = null);
|
||||
|
||||
/**
|
||||
* Returns true if the container can return an entry for the given identifier.
|
||||
|
@ -73,9 +73,7 @@ class Connector
|
||||
*/
|
||||
public function getOptions(array $config)
|
||||
{
|
||||
$options = $config['options'] ?? [];
|
||||
|
||||
return array_diff_key($this->options, $options) + $options;
|
||||
return array_replace($this->options, $config['options'] ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user