Code cleanup.

This commit is contained in:
James Cole
2018-04-02 14:17:11 +02:00
parent 4cea5d65a6
commit f96f38b172
44 changed files with 87 additions and 100 deletions

View File

@@ -14,7 +14,7 @@ class ConfigSeeder extends Seeder
public function run()
{
$entry = Configuration::where('name', 'db_version')->first();
if (is_null($entry)) {
if (null === $entry) {
Log::warning('No database version entry is present. Database is assumed to be OLD (version 1).');
// FF old or no version present. Put at 1:
Configuration::create(
@@ -24,8 +24,8 @@ class ConfigSeeder extends Seeder
]
);
}
if (!is_null($entry)) {
$version = intval(config('firefly.db_version'));
if (null !== $entry) {
$version = (int)config('firefly.db_version');
$entry->data = $version;
$entry->save();