mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user