mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-09 22:26:04 +00:00
Various code cleanup.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -69,7 +69,6 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(ShowRequest $request): JsonResponse
|
||||
{
|
||||
|
@@ -120,7 +120,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -68,7 +68,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -66,7 +66,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -70,7 +70,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -66,7 +66,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -66,7 +66,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -69,7 +69,6 @@ class ListController extends Controller
|
||||
*
|
||||
* Show transactions for this recurrence.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Recurrence $recurrence): JsonResponse
|
||||
{
|
||||
|
@@ -66,7 +66,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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();
|
||||
|
@@ -68,7 +68,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -68,7 +68,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -53,7 +53,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -67,7 +67,6 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store new currency.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(StoreRequest $request): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -70,7 +70,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* List all transaction links there are.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -91,7 +91,6 @@ class UserController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -50,7 +50,6 @@ class PreferencesController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -71,7 +71,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the webhooks of the user.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
|
@@ -92,7 +92,6 @@ class ConvertsDatesToUTC extends Command
|
||||
$this->friendlyInfo(sprintf('Converting field "%s" of model "%s" to UTC.', $field, $shortModel));
|
||||
$items->each(
|
||||
function ($item) use ($field, $timezoneField): void {
|
||||
/** @var Carbon $date */
|
||||
$date = Carbon::parse($item->{$field}, $item->{$timezoneField}); // @phpstan-ignore-line
|
||||
$date->setTimezone('UTC');
|
||||
$item->{$field} = $date->format('Y-m-d H:i:s'); // @phpstan-ignore-line
|
||||
|
@@ -135,9 +135,7 @@ class RemovesOrphanedTransactions extends Command
|
||||
// delete journals
|
||||
/** @var null|TransactionJournal $journal */
|
||||
$journal = TransactionJournal::find($transaction->transaction_journal_id);
|
||||
if (null !== $journal) {
|
||||
$journal->delete();
|
||||
}
|
||||
$journal?->delete();
|
||||
Transaction::where('transaction_journal_id', $transaction->transaction_journal_id)->delete();
|
||||
$this->friendlyWarning(
|
||||
sprintf(
|
||||
|
@@ -40,6 +40,7 @@ use Exception;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use InvalidArgumentException;
|
||||
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use function Safe\file_put_contents;
|
||||
|
||||
class ExportsData extends Command
|
||||
@@ -275,7 +276,11 @@ class ExportsData extends Command
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $options
|
||||
* @param array $data
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws FilesystemException
|
||||
*/
|
||||
private function exportData(array $options, array $data): void
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ class CallsLaravelPassportKeys extends Command
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
Artisan::call('passport:keys --no-interaction', []);
|
||||
Artisan::call('passport:keys --no-interaction');
|
||||
$result = Artisan::output();
|
||||
if (str_contains($result, 'Encryption keys already exist')) {
|
||||
$this->friendlyInfo('Encryption keys exist already.');
|
||||
|
@@ -156,7 +156,6 @@ class ForcesDecimalSize extends Command
|
||||
*/
|
||||
private function correctAmountsByCurrency(): void
|
||||
{
|
||||
/** @var Collection $enabled */
|
||||
$enabled = TransactionCurrency::whereEnabled(1)->get();
|
||||
|
||||
/** @var TransactionCurrency $currency */
|
||||
@@ -301,7 +300,7 @@ class ForcesDecimalSize extends Command
|
||||
}
|
||||
);
|
||||
|
||||
$result = $query->get(['*']);
|
||||
$result = $query->get();
|
||||
if (0 === $result->count()) {
|
||||
$this->friendlyPositive(sprintf('All %s in %s are OK', $table, $currency->code));
|
||||
|
||||
@@ -533,7 +532,7 @@ class ForcesDecimalSize extends Command
|
||||
DB::raw(sprintf($this->regularExpression, $currency->decimal_places))
|
||||
);
|
||||
|
||||
$result = $query->get(['*']);
|
||||
$result = $query->get();
|
||||
if (0 === $result->count()) {
|
||||
$this->friendlyPositive(sprintf('All transactions in foreign currency %s are OK', $currency->code));
|
||||
|
||||
|
@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Flysystem\FilesystemException;
|
||||
|
||||
use Safe\Exceptions\JsonException;
|
||||
use function Safe\json_decode;
|
||||
|
||||
class VerifySecurityAlerts extends Command
|
||||
@@ -44,7 +45,9 @@ class VerifySecurityAlerts extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FilesystemException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -54,7 +54,6 @@ class AddsTransactionIdentifiers extends Command
|
||||
* When either of these are the same amount, FF3 can't keep them apart: +3/-3, +3/-3, +3/-3. This happens more
|
||||
* often than you would think. So each set gets a number (1,2,3) to keep them apart.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@@ -101,11 +100,8 @@ class AddsTransactionIdentifiers extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -99,11 +99,8 @@ class RemovesDatabaseDecryption extends Command
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function decryptField(string $table, string $field): void
|
||||
|
@@ -100,7 +100,6 @@ class UpgradesAccountCurrencies extends Command
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function updateCurrenciesForUser(User $user): void
|
||||
{
|
||||
|
@@ -83,11 +83,8 @@ class UpgradesAccountMetaData extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
|
@@ -93,11 +93,8 @@ class UpgradesAttachments extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
|
@@ -99,17 +99,13 @@ class UpgradesBillsToRules extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate bills to new rule structure for a specific user.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function migrateUser(User $user): void
|
||||
{
|
||||
|
@@ -85,11 +85,8 @@ class UpgradesBudgetLimits extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
|
@@ -66,11 +66,8 @@ class UpgradesCurrencyPreferences extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool)$configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function runUpgrade(): void
|
||||
|
@@ -87,11 +87,8 @@ class UpgradesJournalNotes extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
|
@@ -62,11 +62,8 @@ class UpgradesLiabilities extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function upgradeLiabilities(): void
|
||||
|
@@ -64,11 +64,8 @@ class UpgradesLiabilitiesEight extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function upgradeLiabilities(): void
|
||||
|
@@ -65,11 +65,8 @@ class UpgradesMultiPiggyBanks extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function upgradePiggyBanks(): void
|
||||
|
@@ -61,11 +61,8 @@ class UpgradesPrimaryCurrencyAmounts extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
|
@@ -66,11 +66,8 @@ class UpgradesRecurrenceMetaData extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function migrateMetaData(): int
|
||||
|
@@ -64,11 +64,8 @@ class UpgradesRuleActions extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function replaceEqualSign(): void
|
||||
|
@@ -58,11 +58,8 @@ class UpgradesTagLocations extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function migrateTagLocations(): void
|
||||
|
@@ -98,11 +98,8 @@ class UpgradesToGroups extends Command
|
||||
private function isMigrated(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -106,11 +106,8 @@ class UpgradesTransferCurrencies extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -87,11 +87,8 @@ class UpgradesVariousCurrencyInformation extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool) $configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -64,11 +64,8 @@ class UpgradesWebhooks extends Command
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
$configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
|
||||
if (null !== $configVar) {
|
||||
return (bool)$configVar->data;
|
||||
}
|
||||
return (bool)$configVar?->data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function upgradeWebhooks(): void
|
||||
|
@@ -65,7 +65,6 @@ trait VerifiesAccessToken
|
||||
/**
|
||||
* Returns false when given token does not match given user token.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
protected function verifyAccessToken(): bool
|
||||
{
|
||||
|
@@ -83,7 +83,6 @@ class AccountFactory
|
||||
|
||||
if (null === $return) {
|
||||
Log::debug('Found nothing. Will create a new one.');
|
||||
/** @var Account $return */
|
||||
$return = $this->create(
|
||||
[
|
||||
'user_id' => $this->user->id,
|
||||
|
@@ -343,7 +343,11 @@ class TransactionJournalFactory
|
||||
/**
|
||||
* If this transaction already exists, throw an error.
|
||||
*
|
||||
* @param string $hash
|
||||
*
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws JsonException
|
||||
* @throws \Safe\Exceptions\JsonException
|
||||
*/
|
||||
private function errorIfDuplicate(string $hash): void
|
||||
{
|
||||
@@ -478,7 +482,6 @@ class TransactionJournalFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function getCurrency(?TransactionCurrency $currency, Account $account): TransactionCurrency
|
||||
{
|
||||
|
@@ -165,7 +165,6 @@ class UserEventHandler
|
||||
/**
|
||||
* Set the demo user back to English.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function demoUserBackToEnglish(Login $event): void
|
||||
{
|
||||
@@ -183,7 +182,6 @@ class UserEventHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function notifyNewIPAddress(DetectedNewIPAddress $event): void
|
||||
{
|
||||
@@ -448,7 +446,6 @@ class UserEventHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function storeUserIPAddress(ActuallyLoggedIn $event): void
|
||||
{
|
||||
|
@@ -31,6 +31,8 @@ use FireflyIII\Helpers\Update\UpdateTrait;
|
||||
use FireflyIII\Models\Configuration;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class VersionCheckEventHandler
|
||||
@@ -42,7 +44,11 @@ class VersionCheckEventHandler
|
||||
/**
|
||||
* Checks with GitHub to see if there is a new version.
|
||||
*
|
||||
* @param RequestedVersionCheckStatus $event
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
#[Deprecated(message: '?')]
|
||||
public function checkForUpdates(RequestedVersionCheckStatus $event): void
|
||||
@@ -87,7 +93,11 @@ class VersionCheckEventHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestedVersionCheckStatus $event
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void
|
||||
{
|
||||
|
@@ -37,6 +37,7 @@ use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Safe\Exceptions\FileinfoException;
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use Safe\Exceptions\StringsException;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
use function Safe\tmpfile;
|
||||
@@ -222,8 +223,11 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
/**
|
||||
* Process the upload of a file.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws EncryptException
|
||||
* @param UploadedFile $file
|
||||
* @param Model $model
|
||||
*
|
||||
* @return Attachment|null
|
||||
* @throws StringsException
|
||||
*/
|
||||
protected function processFile(UploadedFile $file, Model $model): ?Attachment
|
||||
{
|
||||
|
@@ -43,7 +43,6 @@ trait AccountCollection
|
||||
Log::warning(sprintf('GroupCollector will be SLOW: accountBalanceIs: "%s" "%s" "%s"', $direction, $operator, $value));
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param array $object
|
||||
*
|
||||
* @return bool
|
||||
|
@@ -41,7 +41,6 @@ trait AttachmentCollection
|
||||
$this->withAttachmentInformation();
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param array $object
|
||||
*
|
||||
* @return bool
|
||||
@@ -120,7 +119,6 @@ trait AttachmentCollection
|
||||
$this->withAttachmentInformation();
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param array $object
|
||||
*
|
||||
* @return bool
|
||||
@@ -155,7 +153,6 @@ trait AttachmentCollection
|
||||
$this->withAttachmentInformation();
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param array $object
|
||||
*
|
||||
* @return bool
|
||||
@@ -190,7 +187,6 @@ trait AttachmentCollection
|
||||
$this->withAttachmentInformation();
|
||||
|
||||
/**
|
||||
* @param int $index
|
||||
* @param array $object
|
||||
*
|
||||
* @return bool
|
||||
|
@@ -48,6 +48,7 @@ use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Override;
|
||||
|
||||
use Safe\Exceptions\JsonException;
|
||||
use function Safe\json_decode;
|
||||
|
||||
/**
|
||||
@@ -564,7 +565,11 @@ class GroupCollector implements GroupCollectorInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $augumentedJournal
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function parseAugmentedJournal(TransactionJournal $augumentedJournal): array
|
||||
{
|
||||
|
@@ -24,6 +24,8 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Helpers\Fiscal;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class FiscalHelper.
|
||||
@@ -62,7 +64,11 @@ class FiscalHelper implements FiscalHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return Carbon date object
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function startOfFiscalYear(Carbon $date): Carbon
|
||||
{
|
||||
|
@@ -68,7 +68,7 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterface
|
||||
// The actual JSON payload (i.e., the request body)
|
||||
$timestamp = Carbon::now()->getTimestamp();
|
||||
$payload = sprintf('%s.%s', $timestamp, $json);
|
||||
$signature = hash_hmac('sha3-256', $payload, (string) $message->webhook->secret, false);
|
||||
$signature = hash_hmac('sha3-256', $payload, (string) $message->webhook->secret);
|
||||
|
||||
// signature string:
|
||||
// header included in each signed event contains a timestamp and one or more signatures.
|
||||
|
@@ -37,6 +37,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class CreateController
|
||||
@@ -131,9 +133,12 @@ class CreateController extends Controller
|
||||
/**
|
||||
* Store the new account.
|
||||
*
|
||||
* @param AccountFormRequest $request
|
||||
*
|
||||
* @return Redirector|RedirectResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function store(AccountFormRequest $request)
|
||||
{
|
||||
|
@@ -35,6 +35,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class IndexController
|
||||
@@ -66,10 +68,14 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param string $objectType
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* */
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function inactive(Request $request, string $objectType)
|
||||
{
|
||||
$inactivePage = true;
|
||||
@@ -136,10 +142,14 @@ class IndexController extends Controller
|
||||
/**
|
||||
* Show list of accounts.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $objectType
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* */
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function index(Request $request, string $objectType)
|
||||
{
|
||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||
|
@@ -40,6 +40,8 @@ use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
@@ -76,10 +78,17 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show an account.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* */
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, Account $account, ?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
if (0 === $account->id) {
|
||||
@@ -193,10 +202,14 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show an account.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* */
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showAll(Request $request, Account $account)
|
||||
{
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
|
@@ -28,6 +28,8 @@ use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class HomeController.
|
||||
@@ -47,6 +49,8 @@ class HomeController extends Controller
|
||||
* Index of the admin.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyIII\Events\Admin\InvitationCreated;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Http\Requests\InviteUserFormRequest;
|
||||
@@ -37,6 +38,8 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class UserController.
|
||||
@@ -151,6 +154,9 @@ class UserController extends Controller
|
||||
* Show index of user manager.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
@@ -194,7 +194,6 @@ class AttachmentController extends Controller
|
||||
* View attachment in browser.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws BindingResolutionException
|
||||
*/
|
||||
public function view(Attachment $attachment): LaravelResponse
|
||||
{
|
||||
|
@@ -33,6 +33,8 @@ use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Safe\Exceptions\UrlException;
|
||||
|
||||
use function Safe\parse_url;
|
||||
@@ -60,7 +62,11 @@ class ForgotPasswordController extends Controller
|
||||
/**
|
||||
* Send a reset link to the given user.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param UserRepositoryInterface $repository
|
||||
*
|
||||
* @return Factory|RedirectResponse|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function sendResetLinkEmail(Request $request, UserRepositoryInterface $repository)
|
||||
{
|
||||
@@ -126,6 +132,8 @@ class ForgotPasswordController extends Controller
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showLinkRequestForm()
|
||||
{
|
||||
|
@@ -46,6 +46,8 @@ use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpFoundation\Response as ResponseAlias;
|
||||
|
||||
/**
|
||||
@@ -151,7 +153,7 @@ class LoginController extends Controller
|
||||
$this->sendFailedLoginResponse($request);
|
||||
|
||||
// @noinspection PhpUnreachableStatementInspection
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,9 +221,13 @@ class LoginController extends Controller
|
||||
/**
|
||||
* Show the application's login form.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Application|Factory|Redirector|RedirectResponse|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
|
@@ -140,9 +140,14 @@ class RegisterController extends Controller
|
||||
/**
|
||||
* Show the application registration form if the invitation code is valid.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $code
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showInviteForm(Request $request, string $code)
|
||||
{
|
||||
@@ -172,9 +177,13 @@ class RegisterController extends Controller
|
||||
/**
|
||||
* Show the application registration form.
|
||||
*
|
||||
* @param Request|null $request
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showRegistrationForm(?Request $request = null)
|
||||
{
|
||||
|
@@ -34,6 +34,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ResetPasswordController
|
||||
@@ -112,11 +114,14 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* If no token is present, display the link request form.
|
||||
*
|
||||
* @param null $token
|
||||
* @param Request $request
|
||||
* @param null $token
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
|
@@ -37,6 +37,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PragmaRX\Google2FALaravel\Support\Authenticator;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class TwoFactorController.
|
||||
@@ -59,7 +61,11 @@ class TwoFactorController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Redirector|RedirectResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function submitMFA(Request $request)
|
||||
{
|
||||
|
@@ -149,7 +149,6 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function getSums(array $bills): array
|
||||
{
|
||||
|
@@ -44,6 +44,8 @@ use Illuminate\View\View;
|
||||
use League\Fractal\Manager;
|
||||
use League\Fractal\Resource\Item;
|
||||
use League\Fractal\Serializer\DataArraySerializer;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
@@ -113,7 +115,12 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show a bill.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, Bill $bill)
|
||||
{
|
||||
|
@@ -150,7 +150,7 @@ class BudgetLimitController extends Controller
|
||||
$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
|
||||
|
||||
if (!$start instanceof Carbon || !$end instanceof Carbon) {
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
$amount = (string) $request->get('amount');
|
||||
@@ -158,7 +158,7 @@ class BudgetLimitController extends Controller
|
||||
$end->startOfDay();
|
||||
|
||||
if ('' === $amount) {
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
app('log')->debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
@@ -172,7 +172,7 @@ class BudgetLimitController extends Controller
|
||||
}
|
||||
|
||||
// return empty=ish array:
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
if ((int) $amount > 268435456) { // intentional cast to integer
|
||||
$amount = '268435456';
|
||||
|
@@ -174,7 +174,7 @@ class IndexController extends Controller
|
||||
$array['end_date'] = $entry->end_date;
|
||||
|
||||
// spent in period:
|
||||
$spentArr = $this->opsRepository->sumExpenses($entry->start_date, $entry->end_date, null, null, $entry->transactionCurrency, false);
|
||||
$spentArr = $this->opsRepository->sumExpenses($entry->start_date, $entry->end_date, null, null, $entry->transactionCurrency);
|
||||
$array['spent'] = $spentArr[$entry->transaction_currency_id]['sum'] ?? '0';
|
||||
$array['pc_spent'] = $this->convertToPrimary && $entry->transaction_currency_id !== $this->primaryCurrency->id ? $converter->convert($entry->transactionCurrency, $this->primaryCurrency, $entry->start_date, $array['spent']) : null;
|
||||
// budgeted in period:
|
||||
@@ -235,7 +235,7 @@ class IndexController extends Controller
|
||||
|
||||
/** @var TransactionCurrency $currency */
|
||||
foreach ($currencies as $currency) {
|
||||
$spentArr = $this->opsRepository->sumExpenses($start, $end, null, new Collection()->push($current), $currency, false);
|
||||
$spentArr = $this->opsRepository->sumExpenses($start, $end, null, new Collection()->push($current), $currency);
|
||||
if (array_key_exists($currency->id, $spentArr) && array_key_exists('sum', $spentArr[$currency->id])) {
|
||||
$array['spent'][$currency->id]['spent'] = $spentArr[$currency->id]['sum'];
|
||||
$array['spent'][$currency->id]['currency_id'] = $currency->id;
|
||||
|
@@ -39,6 +39,8 @@ use FireflyIII\Support\Http\Controllers\PeriodOverview;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -73,9 +75,15 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show transactions without a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function noBudget(Request $request, ?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
@@ -110,7 +118,11 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Shows ALL transactions without a budget.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function noBudgetAll(Request $request)
|
||||
{
|
||||
@@ -135,7 +147,12 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show a single budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, Budget $budget)
|
||||
{
|
||||
@@ -166,9 +183,15 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show a single budget by a budget limit.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showByBudgetLimit(Request $request, Budget $budget, BudgetLimit $budgetLimit)
|
||||
{
|
||||
|
@@ -32,6 +32,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class IndexController
|
||||
@@ -62,7 +64,11 @@ class IndexController extends Controller
|
||||
/**
|
||||
* Show all categories.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
@@ -37,6 +37,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class NoCategoryController
|
||||
@@ -69,9 +71,15 @@ class NoCategoryController extends Controller
|
||||
/**
|
||||
* Show transactions without a category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, ?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
@@ -106,7 +114,11 @@ class NoCategoryController extends Controller
|
||||
/**
|
||||
* Show all transactions without a category.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showAll(Request $request)
|
||||
{
|
||||
|
@@ -35,6 +35,8 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -68,9 +70,16 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show a single category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Category $category
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, Category $category, ?Carbon $start = null, ?Carbon $end = null)
|
||||
{
|
||||
@@ -111,7 +120,12 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show all transactions within a category.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Category $category
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showAll(Request $request, Category $category)
|
||||
{
|
||||
|
@@ -45,6 +45,7 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use Safe\Exceptions\JsonException;
|
||||
use function Safe\json_encode;
|
||||
|
||||
/**
|
||||
@@ -482,7 +483,13 @@ class AccountController extends Controller
|
||||
/**
|
||||
* Shows overview of account during a single period.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -571,7 +578,7 @@ class AccountController extends Controller
|
||||
$label = $current->isoFormat($format);
|
||||
$return[$key]['entries'][$label] = $amount;
|
||||
}
|
||||
$current = app('navigation')->addPeriod($current, $step, 0);
|
||||
$current = app('navigation')->addPeriod($current, $step);
|
||||
// here too, to fix #8041, the data is corrected to the end of the period.
|
||||
$current = app('navigation')->endOfX($current, $step, null);
|
||||
}
|
||||
|
@@ -40,6 +40,8 @@ use FireflyIII\Support\Http\Controllers\ChartGeneration;
|
||||
use FireflyIII\Support\Http\Controllers\DateCalculation;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Collection;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class CategoryController.
|
||||
@@ -66,7 +68,6 @@ class CategoryController extends Controller
|
||||
* Show an overview for a category for all time, per month/week/year.
|
||||
* TODO test method, for category refactor.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function all(Category $category): JsonResponse
|
||||
{
|
||||
@@ -256,7 +257,12 @@ class CategoryController extends Controller
|
||||
* Chart for a specific period.
|
||||
* TODO test me, for category refactor.
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @param Category $category
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function specificPeriod(Category $category, Carbon $date): JsonResponse
|
||||
{
|
||||
|
@@ -59,7 +59,6 @@ class PiggyBankController extends Controller
|
||||
*
|
||||
* TODO this chart is not multi currency aware.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
|
||||
{
|
||||
@@ -95,7 +94,7 @@ class PiggyBankController extends Controller
|
||||
$currentSum = $filtered->sum('amount');
|
||||
$label = $oldest->isoFormat((string) trans('config.month_and_day_js', [], $locale));
|
||||
$chartData[$label] = $currentSum;
|
||||
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
||||
$oldest = app('navigation')->addPeriod($oldest, $step);
|
||||
}
|
||||
$finalFiltered = $set->filter(
|
||||
static fn (PiggyBankEvent $event) => $event->date->lte($today)
|
||||
|
@@ -260,7 +260,7 @@ class ReportController extends Controller
|
||||
$expense['entries'][$title] = '0';
|
||||
|
||||
}
|
||||
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);
|
||||
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange);
|
||||
}
|
||||
Log::debug('End of sub-loop');
|
||||
|
||||
|
@@ -49,6 +49,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\View\View;
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
use function Safe\file_get_contents;
|
||||
@@ -131,7 +132,7 @@ class DebugController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws FilesystemException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
@@ -33,6 +33,8 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Controllers\GetConfigurationData;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class JavascriptController.
|
||||
@@ -90,8 +92,14 @@ class JavascriptController extends Controller
|
||||
/**
|
||||
* Show some common variables to be used in scripts.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return Response
|
||||
* @throws FireflyException
|
||||
* */
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function variables(Request $request, AccountRepositoryInterface $repository): Response
|
||||
{
|
||||
$account = $repository->find((int) $request->get('account'));
|
||||
|
@@ -52,7 +52,7 @@ class BoxController extends Controller
|
||||
#[Deprecated]
|
||||
public function available(): JsonResponse
|
||||
{
|
||||
return response()->json([]);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user