Code cleanup.

This commit is contained in:
James Cole
2016-05-02 20:49:19 +02:00
parent 5e1167b8ae
commit 3344bb7263
21 changed files with 105 additions and 89 deletions

View File

@@ -3,6 +3,7 @@ declare(strict_types = 1);
namespace FireflyIII\Repositories\Attachment;
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Models\Attachment;
use FireflyIII\User;
use Illuminate\Support\Collection;
@@ -34,8 +35,8 @@ class AttachmentRepository implements AttachmentRepositoryInterface
*/
public function destroy(Attachment $attachment): bool
{
/** @var \FireflyIII\Helpers\Attachments\AttachmentHelperInterface $helper */
$helper = app('FireflyIII\Helpers\Attachments\AttachmentHelperInterface');
/** @var AttachmentHelperInterface $helper */
$helper = app(AttachmentHelperInterface::class);
$file = $helper->getAttachmentLocation($attachment);
unlink($file);