Clean up some code.

This commit is contained in:
James Cole
2020-10-13 06:35:33 +02:00
parent 3bd5ac21c9
commit 4e51f0abc4
33 changed files with 149 additions and 294 deletions

View File

@@ -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);