mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 10:53:31 +00:00
Code cleanup.
This commit is contained in:
@@ -239,8 +239,8 @@ $factory->define(
|
||||
FireflyIII\Models\Transaction::class,
|
||||
function (Faker\Generator $faker) {
|
||||
return [
|
||||
'transaction_amount' => strval($faker->randomFloat(2, -100, 100)),
|
||||
'destination_amount' => strval($faker->randomFloat(2, -100, 100)),
|
||||
'transaction_amount' => (string)$faker->randomFloat(2, -100, 100),
|
||||
'destination_amount' => (string)$faker->randomFloat(2, -100, 100),
|
||||
'opposing_account_id' => $faker->numberBetween(1, 10),
|
||||
'source_account_id' => $faker->numberBetween(1, 10),
|
||||
'opposing_account_name' => $faker->words(3, true),
|
||||
@@ -249,7 +249,7 @@ $factory->define(
|
||||
'destination_account_id' => $faker->numberBetween(1, 10),
|
||||
'date' => new Carbon,
|
||||
'destination_account_name' => $faker->words(3, true),
|
||||
'amount' => strval($faker->randomFloat(2, -100, 100)),
|
||||
'amount' => (string)$faker->randomFloat(2, -100, 100),
|
||||
'budget_id' => 0,
|
||||
'category' => $faker->words(3, true),
|
||||
'transaction_journal_id' => $faker->numberBetween(1, 10),
|
||||
|
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user