mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Clean up some code.
This commit is contained in:
@@ -87,8 +87,6 @@ class FireflyConfig
|
||||
/** @var Configuration $config */
|
||||
$config = Configuration::where('name', $name)->first(['id', 'name', 'data']);
|
||||
} catch (QueryException|Exception $e) {
|
||||
//Log::error(sprintf('Query exception while polling for config var: %s', $e->getMessage()));
|
||||
//Log::error($e->getTraceAsString());
|
||||
throw new FireflyException(sprintf('Could not poll the database: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
@@ -156,7 +154,6 @@ class FireflyConfig
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should NOT be called in the TEST environment!', __METHOD__));
|
||||
}
|
||||
//Log::debug('Set new value for ', ['name' => $name]);
|
||||
/** @var Configuration $config */
|
||||
try {
|
||||
$config = Configuration::whereName($name)->first();
|
||||
@@ -168,7 +165,6 @@ class FireflyConfig
|
||||
return $item;
|
||||
}
|
||||
if (null === $config) {
|
||||
//Log::debug('Does not exist yet ', ['name' => $name]);
|
||||
/** @var Configuration $item */
|
||||
$item = new Configuration;
|
||||
$item->name = $name;
|
||||
@@ -179,7 +175,6 @@ class FireflyConfig
|
||||
|
||||
return $item;
|
||||
}
|
||||
//Log::debug('Exists already, overwrite value.', ['name' => $name]);
|
||||
$config->data = $value;
|
||||
$config->save();
|
||||
Cache::forget('ff-config-' . $name);
|
||||
|
Reference in New Issue
Block a user