mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Fix all level 2 issues.
This commit is contained in:
@@ -250,7 +250,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : '';
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : '';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : '';
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : '';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
@@ -373,12 +373,12 @@ class BillRepository implements BillRepositoryInterface
|
||||
|
||||
return $bill->transactionJournals()
|
||||
->before($end)->after($start)->get(
|
||||
[
|
||||
[
|
||||
'transaction_journals.id',
|
||||
'transaction_journals.date',
|
||||
'transaction_journals.transaction_group_id',
|
||||
]
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -589,7 +589,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : '';
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : '';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : '';
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : '';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class JournalAPIRepository implements JournalAPIRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : ''; // TODO should not set notes like this.
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : ''; // TODO should not set notes like this.
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
static function (Attachment $attachment) use ($disk) {
|
||||
$notes = $attachment->notes()->first();
|
||||
$attachment->file_exists = $disk->exists($attachment->fileName());
|
||||
$attachment->notes_text = $notes ? $notes->text : '';
|
||||
$attachment->notes_text = null !== $notes ? $notes->text : '';
|
||||
|
||||
return $attachment;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ class UserRepository implements UserRepositoryInterface
|
||||
public function redeemCode(string $code): void
|
||||
{
|
||||
$obj = InvitedUser::where('invite_code', $code)->where('redeemed', 0)->first();
|
||||
if ($obj) {
|
||||
if (null !== $obj) {
|
||||
$obj->redeemed = true;
|
||||
$obj->save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user