Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -38,7 +38,6 @@ use Illuminate\View\View;
use Symfony\Component\HttpFoundation\ParameterBag;
/**
*
* Class ShowController
*/
class ShowController extends Controller
@@ -50,8 +49,6 @@ class ShowController extends Controller
/**
* IndexController constructor.
*
*/
public function __construct()
{
@@ -74,14 +71,14 @@ class ShowController extends Controller
/**
* Show a single recurring transaction.
*
* @param Recurrence $recurrence
*
* @return Factory|View
*
* @throws FireflyException
*/
public function show(Recurrence $recurrence)
{
$repos = app(AttachmentRepositoryInterface::class);
/** @var RecurrenceTransformer $transformer */
$transformer = app(RecurrenceTransformer::class);
$transformer->setParameters(new ParameterBag());
@@ -108,12 +105,12 @@ class ShowController extends Controller
$attachments = $recurrence->attachments()->get();
$array['attachments'] = [];
$attachmentTransformer = app(AttachmentTransformer::class);
/** @var Attachment $attachment */
foreach ($attachments as $attachment) {
$item = $attachmentTransformer->transform($attachment);
$item['file_exists'] = $repos->exists($attachment); // TODO this should be part of the transformer
$array['attachments'][] = $item;
}
$subTitle = (string)trans('firefly.overview_for_recurrence', ['title' => $recurrence->title]);