Various code cleanup and fixed alignments.

This commit is contained in:
James Cole
2024-01-01 14:43:56 +01:00
parent 1368aafe5f
commit f963ac63f1
443 changed files with 3668 additions and 3672 deletions

View File

@@ -51,7 +51,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
/** @var AttachmentHelperInterface $helper */
$helper = app(AttachmentHelperInterface::class);
$path = $helper->getAttachmentLocation($attachment);
$path = $helper->getAttachmentLocation($attachment);
try {
Storage::disk('upload')->delete($path);
@@ -118,7 +118,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
/** @var AttachmentFactory $factory */
$factory = app(AttachmentFactory::class);
$factory->setUser($this->user);
$result = $factory->create($data);
$result = $factory->create($data);
if (null === $result) {
throw new FireflyException('Could not store attachment.');
}
@@ -172,7 +172,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
return true;
}
$dbNote = $attachment->notes()->first();
$dbNote = $attachment->notes()->first();
if (null === $dbNote) {
$dbNote = new Note();
$dbNote->noteable()->associate($attachment);