mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Fix code quality with rector [skip ci]
This commit is contained in:
@@ -65,7 +65,7 @@ class JournalAPIRepository implements JournalAPIRepositoryInterface, UserGroupIn
|
||||
$disk = Storage::disk('upload');
|
||||
|
||||
return $set->each(
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
static function (Attachment $attachment) use ($disk): Attachment {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : ''; // TODO should not set notes like this.
|
||||
|
||||
@@ -78,11 +78,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
{
|
||||
/** @var null|TransactionJournal $entry */
|
||||
$entry = $this->user->transactionJournals()->orderBy('date', 'ASC')->first(['transaction_journals.*']);
|
||||
if (null !== $entry) {
|
||||
return $entry;
|
||||
}
|
||||
|
||||
return null;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
public function getDestinationAccount(TransactionJournal $journal): Account
|
||||
@@ -120,11 +116,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
{
|
||||
/** @var null|TransactionJournal $entry */
|
||||
$entry = $this->user->transactionJournals()->orderBy('date', 'DESC')->first(['transaction_journals.*']);
|
||||
if (null !== $entry) {
|
||||
return $entry;
|
||||
}
|
||||
|
||||
return null;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
public function getLinkNoteText(TransactionJournalLink $link): string
|
||||
|
||||
Reference in New Issue
Block a user