mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Clean up some code
This commit is contained in:
@@ -235,7 +235,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$user = $model->user; // @phpstan-ignore-line
|
||||
// ignore lines about polymorphic calls.
|
||||
if ($model instanceof PiggyBank) {
|
||||
$user = $model->account->user; // @phpstan-ignore-line
|
||||
$user = $model->account->user;
|
||||
}
|
||||
|
||||
$attachment = new Attachment(); // create Attachment object.
|
||||
@@ -374,7 +374,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$count = 0;
|
||||
// ignore lines about polymorphic calls.
|
||||
if ($model instanceof PiggyBank) {
|
||||
$count = $model->account->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count(); // @phpstan-ignore-line
|
||||
$count = $model->account->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
|
||||
}
|
||||
if ($model instanceof PiggyBank) {
|
||||
$count = $model->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count(); // @phpstan-ignore-line
|
||||
|
Reference in New Issue
Block a user