Various code cleanup.

This commit is contained in:
James Cole
2025-10-05 12:57:58 +02:00
parent 072212c112
commit 6341743cf9
169 changed files with 482 additions and 305 deletions

View File

@@ -61,8 +61,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function accounts(ExportRequest $request): LaravelResponse
@@ -100,8 +103,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function bills(ExportRequest $request): LaravelResponse
@@ -112,8 +118,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function budgets(ExportRequest $request): LaravelResponse
@@ -124,8 +133,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function categories(ExportRequest $request): LaravelResponse
@@ -136,8 +148,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function piggyBanks(ExportRequest $request): LaravelResponse
@@ -148,8 +163,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function recurring(ExportRequest $request): LaravelResponse
@@ -160,8 +178,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function rules(ExportRequest $request): LaravelResponse
@@ -172,8 +193,11 @@ class ExportController extends Controller
}
/**
* @throws FireflyException
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
public function tags(ExportRequest $request): LaravelResponse
@@ -184,6 +208,10 @@ class ExportController extends Controller
}
/**
* @param ExportRequest $request
*
* @return LaravelResponse
* @throws DatetimeException
* @throws FireflyException
*/
public function transactions(ExportRequest $request): LaravelResponse

View File

@@ -71,7 +71,6 @@ class ListController extends Controller
}
/**
* @throws FireflyException
*/
public function attachments(Account $account): JsonResponse
{
@@ -97,7 +96,6 @@ class ListController extends Controller
}
/**
* @throws FireflyException
*/
public function piggyBanks(Account $account): JsonResponse
{
@@ -136,7 +134,6 @@ class ListController extends Controller
/**
* Show all transaction groups related to the account.
*
* @throws FireflyException
*/
public function transactions(Request $request, Account $account): JsonResponse
{

View File

@@ -69,7 +69,6 @@ class ShowController extends Controller
/**
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(ShowRequest $request): JsonResponse
{

View File

@@ -120,7 +120,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -68,7 +68,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -72,7 +72,6 @@ class ListController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function attachments(Bill $bill): JsonResponse
{
@@ -103,7 +102,6 @@ class ListController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function rules(Bill $bill): JsonResponse
{
@@ -136,7 +134,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, Bill $bill): JsonResponse
{

View File

@@ -66,7 +66,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -74,7 +74,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listAttachmentByBudget
*
* @throws FireflyException
*/
public function attachments(Budget $budget): JsonResponse
{
@@ -105,7 +104,6 @@ class ListController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function budgetLimits(Budget $budget): JsonResponse
{
@@ -141,7 +139,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, Budget $budget): JsonResponse
{
@@ -203,7 +200,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function withoutBudget(Request $request): JsonResponse
{

View File

@@ -70,7 +70,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -50,7 +50,6 @@ class ListController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listTransactionByBudgetLimit
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
{

View File

@@ -69,7 +69,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/categories/listAttachmentByCategory
*
* @throws FireflyException
*/
public function attachments(Category $category): JsonResponse
{
@@ -100,7 +99,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, Category $category): JsonResponse
{

View File

@@ -66,7 +66,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -69,7 +69,6 @@ class ListController extends Controller
*
* List all bills in this object group
*
* @throws FireflyException
*/
public function bills(ObjectGroup $objectGroup): JsonResponse
{
@@ -110,7 +109,6 @@ class ListController extends Controller
*
* List all piggies under the object group.
*
* @throws FireflyException
*/
public function piggyBanks(ObjectGroup $objectGroup): JsonResponse
{

View File

@@ -68,7 +68,6 @@ class ListController extends Controller
*
* List single resource.
*
* @throws FireflyException
*/
public function accounts(PiggyBank $piggyBank): JsonResponse
{
@@ -106,7 +105,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/piggy_banks/listAttachmentByPiggyBank
*
* @throws FireflyException
*/
public function attachments(PiggyBank $piggyBank): JsonResponse
{
@@ -137,7 +135,6 @@ class ListController extends Controller
*
* List single resource.
*
* @throws FireflyException
*/
public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse
{

View File

@@ -66,7 +66,6 @@ class ShowController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -69,7 +69,6 @@ class ListController extends Controller
*
* Show transactions for this recurrence.
*
* @throws FireflyException
*/
public function transactions(Request $request, Recurrence $recurrence): JsonResponse
{

View File

@@ -66,7 +66,6 @@ class ShowController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -87,9 +87,7 @@ class TriggerController extends Controller
// enrich groups and return them:
if (0 === $groups->count()) {
$paginator = new LengthAwarePaginator(new Collection(), 0, 1);
}
$paginator = new LengthAwarePaginator(new Collection(), 0, 1);
if ($groups->count() > 0) {
/** @var User $admin */
$admin = auth()->user();

View File

@@ -68,7 +68,6 @@ class ShowController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -65,7 +65,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/rule_groups/listRuleByGroup
*
* @throws FireflyException
*/
public function rules(RuleGroup $group): JsonResponse
{

View File

@@ -67,7 +67,6 @@ class ShowController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/rule_groups/listRuleGroup
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -72,7 +72,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/tags/listAttachmentByTag
*
* @throws FireflyException
*/
public function attachments(Tag $tag): JsonResponse
{
@@ -103,7 +102,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, Tag $tag): JsonResponse
{

View File

@@ -68,7 +68,6 @@ class ShowController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -70,7 +70,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/transactions/listAttachmentByTransaction
*
* @throws FireflyException
*/
public function attachments(TransactionGroup $transactionGroup): JsonResponse
{
@@ -102,7 +101,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/transactions/listEventByTransaction
*
* @throws FireflyException
*/
public function piggyBankEvents(TransactionGroup $transactionGroup): JsonResponse
{
@@ -145,7 +143,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/transactions/listLinksByJournal
*
* @throws FireflyException
*/
public function transactionLinks(TransactionJournal $transactionJournal): JsonResponse
{

View File

@@ -53,7 +53,6 @@ class ShowController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function index(Request $request): JsonResponse
{

View File

@@ -72,7 +72,6 @@ class ListController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/currencies/listAccountByCurrency
* Display a list of accounts.
*
* @throws FireflyException
*/
public function accounts(Request $request, TransactionCurrency $currency): JsonResponse
{
@@ -130,7 +129,6 @@ class ListController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function availableBudgets(TransactionCurrency $currency): JsonResponse
{
@@ -165,7 +163,6 @@ class ListController extends Controller
*
* List all bills
*
* @throws FireflyException
*/
public function bills(TransactionCurrency $currency): JsonResponse
{
@@ -212,7 +209,6 @@ class ListController extends Controller
*
* List all budget limits
*
* @throws FireflyException
*/
public function budgetLimits(TransactionCurrency $currency): JsonResponse
{
@@ -250,7 +246,6 @@ class ListController extends Controller
*
* List all recurring transactions.
*
* @throws FireflyException
*/
public function recurrences(TransactionCurrency $currency): JsonResponse
{
@@ -303,7 +298,6 @@ class ListController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function rules(TransactionCurrency $currency): JsonResponse
{
@@ -348,7 +342,6 @@ class ListController extends Controller
*
* Show all transactions.
*
* @throws FireflyException
*/
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
{

View File

@@ -70,7 +70,6 @@ class ShowController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{
@@ -100,7 +99,6 @@ class ShowController extends Controller
*
* Show a currency.
*
* @throws FireflyException
*/
public function show(TransactionCurrency $currency): JsonResponse
{
@@ -124,7 +122,6 @@ class ShowController extends Controller
/**
* Show a currency.
*
* @throws FireflyException
*/
public function showPrimary(): JsonResponse
{

View File

@@ -67,7 +67,6 @@ class StoreController extends Controller
*
* Store new currency.
*
* @throws FireflyException
*/
public function store(StoreRequest $request): JsonResponse
{

View File

@@ -99,7 +99,6 @@ class UpdateController extends Controller
}
/**
* @throws FireflyException
*/
public function makePrimary(TransactionCurrency $currency): JsonResponse
{
@@ -128,7 +127,6 @@ class UpdateController extends Controller
*
* Enable a currency.
*
* @throws FireflyException
*/
public function enable(TransactionCurrency $currency): JsonResponse
{

View File

@@ -70,7 +70,6 @@ class ShowController extends Controller
*
* List all transaction links there are.
*
* @throws FireflyException
*/
public function index(Request $request): JsonResponse
{

View File

@@ -69,7 +69,6 @@ class ListController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/links/listTransactionByLinkType
*
* @throws FireflyException
*/
public function transactions(Request $request, LinkType $linkType): JsonResponse
{

View File

@@ -68,7 +68,6 @@ class ShowController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/links/listLinkType
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -43,7 +43,6 @@ class TransactionController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchTransactions
*
* @throws FireflyException
*/
public function search(Request $request, SearchInterface $searcher): JsonResponse
{

View File

@@ -91,7 +91,6 @@ class UserController extends Controller
*
* Display a listing of the resource.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -50,7 +50,6 @@ class PreferencesController extends Controller
*
* List all of them.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{

View File

@@ -63,7 +63,6 @@ class MessageController extends Controller
* This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/webhooks/getWebhookMessages
*
* @throws FireflyException
*/
public function index(Webhook $webhook): JsonResponse
{

View File

@@ -71,7 +71,6 @@ class ShowController extends Controller
*
* Display a listing of the webhooks of the user.
*
* @throws FireflyException
*/
public function index(): JsonResponse
{