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

@@ -46,8 +46,6 @@ class BulkController extends Controller
/**
* BulkController constructor.
*
*/
public function __construct()
{
@@ -69,8 +67,6 @@ class BulkController extends Controller
*
* TODO user wont be able to tell if the journal is part of a split.
*
* @param array $journals
*
* @return Factory|View
*/
public function edit(array $journals)
@@ -92,9 +88,7 @@ class BulkController extends Controller
/**
* Update all journals.
*
* @param BulkEditJournalRequest $request
*
* @return Application|RedirectResponse|Redirector
* @return Application|Redirector|RedirectResponse
*/
public function update(BulkEditJournalRequest $request)
{
@@ -114,7 +108,7 @@ class BulkController extends Controller
$resultB = $this->updateJournalTags($journal, $tagsAction, explode(',', $request->convertString('tags')));
$resultC = $this->updateJournalCategory($journal, $ignoreCategory, $request->convertString('category'));
if ($resultA || $resultB || $resultC) {
$count++;
++$count;
$collection->push($journal);
}
}
@@ -133,13 +127,6 @@ class BulkController extends Controller
return redirect($this->getPreviousUrl('transactions.bulk-edit.url'));
}
/**
* @param TransactionJournal $journal
* @param bool $ignoreUpdate
* @param int $budgetId
*
* @return bool
*/
private function updateJournalBudget(TransactionJournal $journal, bool $ignoreUpdate, int $budgetId): bool
{
if (true === $ignoreUpdate) {
@@ -151,13 +138,6 @@ class BulkController extends Controller
return true;
}
/**
* @param TransactionJournal $journal
* @param string $action
* @param array $tags
*
* @return bool
*/
private function updateJournalTags(TransactionJournal $journal, string $action, array $tags): bool
{
if ('do_replace' === $action) {
@@ -173,13 +153,6 @@ class BulkController extends Controller
return true;
}
/**
* @param TransactionJournal $journal
* @param bool $ignoreUpdate
* @param string $category
*
* @return bool
*/
private function updateJournalCategory(TransactionJournal $journal, bool $ignoreUpdate, string $category): bool
{
if (true === $ignoreUpdate) {