Remove JSON exceptions that are not thrown anyway.

This commit is contained in:
James Cole
2023-12-22 07:47:13 +01:00
parent 34e22e0747
commit 58dea55d38
52 changed files with 105 additions and 211 deletions

View File

@@ -69,8 +69,7 @@ class IndexController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function inactive(Request $request, string $objectType)
@@ -125,8 +124,7 @@ class IndexController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function index(Request $request, string $objectType)

View File

@@ -76,8 +76,7 @@ class ReconcileController extends Controller
* @return Factory|Redirector|RedirectResponse|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function reconcile(Account $account, Carbon $start = null, Carbon $end = null)
@@ -151,8 +150,7 @@ class ReconcileController extends Controller
* @return Redirector|RedirectResponse
*
* @throws DuplicateTransactionException
* @throws \JsonException
*/
* */
public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end)
{
if (!$this->isEditableAccount($account)) {
@@ -194,8 +192,7 @@ class ReconcileController extends Controller
* Creates a reconciliation group.
*
* @throws DuplicateTransactionException
* @throws \JsonException
*/
* */
private function createReconciliation(Account $account, Carbon $start, Carbon $end, string $difference): string
{
if (!$this->isEditableAccount($account)) {

View File

@@ -76,8 +76,7 @@ class ShowController extends Controller
* @return Factory|Redirector|RedirectResponse|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function show(Request $request, Account $account, Carbon $start = null, Carbon $end = null)
@@ -162,8 +161,7 @@ class ShowController extends Controller
* @return Factory|Redirector|RedirectResponse|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function showAll(Request $request, Account $account)

View File

@@ -86,8 +86,7 @@ class IndexController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function index(Carbon $start = null, Carbon $end = null)

View File

@@ -79,8 +79,7 @@ class AccountController extends Controller
*
* This chart is (multi) currency aware.
*
* @throws \JsonException
*/
* */
public function expenseAccounts(): JsonResponse
{
/** @var Carbon $start */
@@ -298,8 +297,7 @@ class AccountController extends Controller
* Shows the balances for all the user's frontpage accounts.
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function frontpage(AccountRepositoryInterface $repository): JsonResponse
@@ -386,8 +384,7 @@ class AccountController extends Controller
* Shows overview of account during a single period.
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
{
$chartData = [];
@@ -423,8 +420,7 @@ class AccountController extends Controller
* TODO this chart is not multi currency aware.
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function report(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
return response()->json($this->accountBalanceChart($accounts, $start, $end));
@@ -435,8 +431,7 @@ class AccountController extends Controller
*
* This chart is multi-currency aware.
*
* @throws \JsonException
*/
* */
public function revenueAccounts(): JsonResponse
{
/** @var Carbon $start */
@@ -526,8 +521,7 @@ class AccountController extends Controller
/**
* @throws FireflyException
* @throws \JsonException
*/
* */
private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array
{
app('log')->debug(sprintf('Now in periodByCurrency("%s", "%s", %s, "%s")', $start->format('Y-m-d'), $end->format('Y-m-d'), $account->id, $currency->code));

View File

@@ -71,8 +71,7 @@ class ExpenseReportController extends Controller
*
* TODO this chart is not multi currency aware.
*
* @throws \JsonException
*/
* */
public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse
{
$cache = new CacheProperties();

View File

@@ -133,8 +133,7 @@ class ReportController extends Controller
/**
* Shows income and expense, debit/credit: operations.
*
* @throws \JsonException
*/
* */
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{
// chart properties for cache:

View File

@@ -97,8 +97,7 @@ class JavascriptController extends Controller
* Show some common variables to be used in scripts.
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function variables(Request $request, AccountRepositoryInterface $repository): Response

View File

@@ -65,8 +65,7 @@ class ReconcileController extends Controller
* Overview of reconciliation.
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function overview(Request $request, Account $account = null, Carbon $start = null, Carbon $end = null): JsonResponse
{
$startBalance = $request->get('startBalance');
@@ -166,8 +165,7 @@ class ReconcileController extends Controller
* @return JsonResponse
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function transactions(Account $account, Carbon $start = null, Carbon $end = null)
{
if (null === $start || null === $end) {

View File

@@ -74,8 +74,7 @@ class IndexController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function index()
{
$this->cleanupObjectGroups();

View File

@@ -66,8 +66,7 @@ class ShowController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function show(PiggyBank $piggyBank)
{
/** @var Carbon $end */

View File

@@ -66,8 +66,7 @@ class BudgetController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function accountPerBudget(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
{
/** @var BudgetReportGenerator $generator */
@@ -258,8 +257,7 @@ class BudgetController extends Controller
* @return string
*
* @throws FireflyException
* @throws \JsonException
*/
* */
public function general(Collection $accounts, Carbon $start, Carbon $end)
{
/** @var BudgetReportGenerator $generator */

View File

@@ -98,8 +98,7 @@ class CreateController extends Controller
* @return Factory|View
*
* @throws FireflyException
* @throws \JsonException
* @throws ContainerExceptionInterface
* * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function create(?string $objectType)