mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup
This commit is contained in:
@@ -89,9 +89,9 @@ class CreateExport extends Command
|
||||
$accountRepository->setUser($user);
|
||||
|
||||
// first date
|
||||
$firstJournal = $journalRepository->first();
|
||||
$firstJournal = $journalRepository->firstNull();
|
||||
$first = new Carbon;
|
||||
if (null !== $firstJournal->id) {
|
||||
if (null !== $firstJournal) {
|
||||
$first = $firstJournal->date;
|
||||
}
|
||||
|
||||
|
@@ -100,6 +100,5 @@ class DecryptAttachment extends Command
|
||||
}
|
||||
$this->info(sprintf('%d bytes written. Exiting now..', $result));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -93,7 +93,6 @@ class Import extends Command
|
||||
sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->getLines())
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -106,7 +106,7 @@ class UpgradeDatabase extends Command
|
||||
|
||||
if ($ruleGroup === null) {
|
||||
$array = RuleGroup::get(['order'])->pluck('order')->toArray();
|
||||
$order = count($array) > 0 ? max($array) + 1 : 1;
|
||||
$order = \count($array) > 0 ? max($array) + 1 : 1;
|
||||
$ruleGroup = RuleGroup::create(
|
||||
[
|
||||
'user_id' => $user->id,
|
||||
@@ -240,7 +240,6 @@ class UpgradeDatabase extends Command
|
||||
$this->updateJournalidentifiers((int)$journalId);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,7 +293,6 @@ class UpgradeDatabase extends Command
|
||||
}
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,7 +350,6 @@ class UpgradeDatabase extends Command
|
||||
}
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -413,7 +410,7 @@ class UpgradeDatabase extends Command
|
||||
|
||||
// move description:
|
||||
$description = (string)$att->description;
|
||||
if (strlen($description) > 0) {
|
||||
if (\strlen($description) > 0) {
|
||||
// find or create note:
|
||||
$note = $att->notes()->first();
|
||||
if (null === $note) {
|
||||
@@ -484,7 +481,6 @@ class UpgradeDatabase extends Command
|
||||
$journal->save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -530,7 +526,6 @@ class UpgradeDatabase extends Command
|
||||
++$identifier;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -663,7 +658,6 @@ class UpgradeDatabase extends Command
|
||||
$opposing->save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ class UpgradeFireflyInstructions extends Command
|
||||
$text = '';
|
||||
foreach (array_keys($config) as $compare) {
|
||||
// if string starts with:
|
||||
$len = strlen($compare);
|
||||
$len = \strlen($compare);
|
||||
if (substr($version, 0, $len) === $compare) {
|
||||
$text = $config[$compare];
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class UpgradeFireflyInstructions extends Command
|
||||
$text = '';
|
||||
foreach (array_keys($config) as $compare) {
|
||||
// if string starts with:
|
||||
$len = strlen($compare);
|
||||
$len = \strlen($compare);
|
||||
if (substr($version, 0, $len) === $compare) {
|
||||
$text = $config[$compare];
|
||||
}
|
||||
|
Reference in New Issue
Block a user