Skip to content

Commit

Permalink
Update Settings.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkumardusad authored Jan 31, 2023
1 parent 49bc396 commit a0336de
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,7 @@ public function getOptions(string $config)
return isset($this->configs[strtolower($config)]['options']) ? $this->configs[strtolower($config)]['options'] : null;
}

public function set($config, $value = null, array $options = [])
{
if (is_array($config)) {
foreach ($config as $config => $value) {
if (is_numeric($config)) {
continue;
}
if (is_array($value)) {
$this->setConfig($config, ...$value);
} else {
$this->setConfig($config, $value);
}
}
} else {
$this->setConfig($config, $value, $options);
}
}

private function setConfig(string $config, $value = null, array $options = [])
public function set(string $config, $value = null, array $options = [])
{
// Remove whitespace and special characters
$config = strtolower($config);
Expand Down

0 comments on commit a0336de

Please sign in to comment.