mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various code cleanup.
This commit is contained in:
parent
481a6bdd5f
commit
3589c9f60f
@ -29,8 +29,6 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Support\Export\ExportDataGenerator;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use League\Csv\CannotInsertRecord;
|
||||
use League\Csv\Exception;
|
||||
|
||||
/**
|
||||
* Class ExportController
|
||||
|
@ -152,7 +152,7 @@ class ListController extends Controller
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Account $account): JsonResponse
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Account;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
@ -73,7 +74,7 @@ class ShowController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
@ -71,7 +72,7 @@ class ListController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(Bill $bill): JsonResponse
|
||||
@ -103,7 +104,7 @@ class ListController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function rules(Bill $bill): JsonResponse
|
||||
@ -140,7 +141,7 @@ class ListController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Bill $bill): JsonResponse
|
||||
|
@ -24,10 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@ -63,7 +63,7 @@ class ShowController extends Controller
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Bill\UpdateRequest;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
@ -73,7 +74,7 @@ class ListController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(Budget $budget): JsonResponse
|
||||
@ -105,7 +106,7 @@ class ListController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function budgetLimits(Budget $budget): JsonResponse
|
||||
@ -136,7 +137,7 @@ class ListController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Budget $budget): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
@ -66,7 +67,7 @@ class ShowController extends Controller
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
@ -73,7 +74,7 @@ class ListController extends Controller
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
|
@ -25,7 +25,6 @@ namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\BudgetLimit\StoreRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
use FireflyIII\Transformers\BudgetLimitTransformer;
|
||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Api\V1\Controllers\Models\Category;
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Category;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
@ -68,7 +69,7 @@ class ListController extends Controller
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(Category $category): JsonResponse
|
||||
@ -102,7 +103,7 @@ class ListController extends Controller
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Category $category): JsonResponse
|
||||
|
@ -24,10 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Category;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use FireflyIII\Transformers\CategoryTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@ -63,7 +63,7 @@ class ShowController extends Controller
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Category\StoreRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use FireflyIII\Transformers\CategoryTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Category\UpdateRequest;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use FireflyIII\Transformers\CategoryTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\ObjectGroup;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
@ -67,7 +68,7 @@ class ListController extends Controller
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function bills(ObjectGroup $objectGroup): JsonResponse
|
||||
@ -100,7 +101,7 @@ class ListController extends Controller
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function piggyBanks(ObjectGroup $objectGroup): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\ObjectGroup;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||
use FireflyIII\Transformers\ObjectGroupTransformer;
|
||||
@ -68,7 +69,7 @@ class ShowController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\PiggyBank;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Transformers\AttachmentTransformer;
|
||||
@ -62,7 +63,7 @@ class ListController extends Controller
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(PiggyBank $piggyBank): JsonResponse
|
||||
@ -94,7 +95,7 @@ class ListController extends Controller
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\PiggyBank;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Transformers\PiggyBankTransformer;
|
||||
@ -62,7 +63,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -26,7 +26,6 @@ namespace FireflyIII\Api\V1\Controllers\Models\Recurrence;
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Recurrence;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
@ -69,7 +70,7 @@ class ListController extends Controller
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Recurrence $recurrence): JsonResponse
|
||||
|
@ -24,10 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Recurrence;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use FireflyIII\Transformers\RecurrenceTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@ -63,7 +63,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Recurrence\StoreRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use FireflyIII\Transformers\RecurrenceTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Recurrence\UpdateRequest;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use FireflyIII\Transformers\RecurrenceTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Rule;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
||||
use FireflyIII\Transformers\RuleTransformer;
|
||||
@ -66,7 +67,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\RuleGroup;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
use FireflyIII\Transformers\RuleTransformer;
|
||||
@ -65,7 +66,7 @@ class ListController extends Controller
|
||||
* @param RuleGroup $group
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function rules(RuleGroup $group): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\RuleGroup;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
use FireflyIII\Transformers\RuleGroupTransformer;
|
||||
@ -66,7 +67,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -34,7 +34,6 @@ use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use Exception;
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Tag;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
@ -71,7 +72,7 @@ class ListController extends Controller
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(Tag $tag): JsonResponse
|
||||
@ -104,7 +105,7 @@ class ListController extends Controller
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, Tag $tag): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Tag;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use FireflyIII\Transformers\TagTransformer;
|
||||
@ -66,7 +67,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Transaction;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalAPIRepositoryInterface;
|
||||
@ -69,7 +70,7 @@ class ListController extends Controller
|
||||
* @param TransactionGroup $transactionGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function attachments(TransactionGroup $transactionGroup): JsonResponse
|
||||
@ -102,7 +103,7 @@ class ListController extends Controller
|
||||
* @param TransactionGroup $transactionGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function piggyBankEvents(TransactionGroup $transactionGroup): JsonResponse
|
||||
@ -138,7 +139,7 @@ class ListController extends Controller
|
||||
* @param TransactionJournal $transactionJournal
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactionLinks(TransactionJournal $transactionJournal): JsonResponse
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Transaction;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@ -50,7 +51,7 @@ class ShowController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Bill;
|
||||
@ -93,7 +94,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function accounts(Request $request, TransactionCurrency $currency): JsonResponse
|
||||
@ -144,7 +145,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function availableBudgets(TransactionCurrency $currency): JsonResponse
|
||||
@ -180,7 +181,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function bills(TransactionCurrency $currency): JsonResponse
|
||||
@ -221,7 +222,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function budgetLimits(TransactionCurrency $currency): JsonResponse
|
||||
@ -253,7 +254,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function recurrences(TransactionCurrency $currency): JsonResponse
|
||||
@ -304,7 +305,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function rules(TransactionCurrency $currency): JsonResponse
|
||||
@ -356,7 +357,7 @@ class ListController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
|
||||
|
@ -25,12 +25,12 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\CurrencyTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@ -68,7 +68,7 @@ class ShowController extends Controller
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -32,7 +32,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\CurrencyTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -32,7 +32,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\CurrencyTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
@ -127,6 +126,7 @@ class UpdateController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function makeDefault(TransactionCurrency $currency): JsonResponse
|
||||
@ -157,6 +157,8 @@ class UpdateController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLink;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionJournalLink;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use FireflyIII\Transformers\TransactionLinkTransformer;
|
||||
@ -68,7 +69,7 @@ class ShowController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\LinkType;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
@ -75,7 +76,7 @@ class ListController extends Controller
|
||||
* @param LinkType $linkType
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactions(Request $request, LinkType $linkType): JsonResponse
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\TransactionLinkType;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\LinkType;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
@ -72,7 +73,7 @@ class ShowController extends Controller
|
||||
* List all of them.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Search;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Support\Search\SearchInterface;
|
||||
use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@ -42,7 +43,7 @@ class TransactionController extends Controller
|
||||
* @param SearchInterface $searcher
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function search(Request $request, SearchInterface $searcher): JsonResponse
|
||||
{
|
||||
|
@ -100,10 +100,10 @@ class ConfigurationController extends Controller
|
||||
$singleUser = app('fireflyconfig')->get('single_user_mode');
|
||||
|
||||
return [
|
||||
'is_demo_site' => null === $isDemoSite ? null : $isDemoSite->data,
|
||||
'is_demo_site' => $isDemoSite?->data,
|
||||
'permission_update_check' => null === $updateCheck ? null : (int)$updateCheck->data,
|
||||
'last_update_check' => null === $lastCheck ? null : (int)$lastCheck->data,
|
||||
'single_user_mode' => null === $singleUser ? null : $singleUser->data,
|
||||
'single_user_mode' => $singleUser?->data,
|
||||
];
|
||||
}
|
||||
|
||||
@ -132,14 +132,14 @@ class ConfigurationController extends Controller
|
||||
$data = [];
|
||||
$dynamic = $this->getDynamicConfiguration();
|
||||
$shortKey = str_replace('configuration.', '', $configKey);
|
||||
if ('configuration.' === substr($configKey, 0, 14)) {
|
||||
if (str_starts_with($configKey, 'configuration.')) {
|
||||
$data = [
|
||||
'title' => $configKey,
|
||||
'value' => $dynamic[$shortKey],
|
||||
'editable' => true,
|
||||
];
|
||||
}
|
||||
if ('configuration.' !== substr($configKey, 0, 14)) {
|
||||
if (!str_starts_with($configKey, 'configuration.')) {
|
||||
$data = [
|
||||
'title' => $configKey,
|
||||
'value' => config($configKey),
|
||||
@ -157,6 +157,7 @@ class ConfigurationController extends Controller
|
||||
* @param string $name
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function update(UpdateRequest $request, string $name): JsonResponse
|
||||
{
|
||||
|
@ -98,6 +98,7 @@ class PreferencesController extends Controller
|
||||
* @param PreferenceStoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(PreferenceStoreRequest $request): JsonResponse
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ use FireflyIII\Models\WebhookAttempt;
|
||||
use FireflyIII\Models\WebhookMessage;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Transformers\WebhookAttemptTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
|
@ -30,7 +30,6 @@ use FireflyIII\Models\Webhook;
|
||||
use FireflyIII\Models\WebhookAttempt;
|
||||
use FireflyIII\Models\WebhookMessage;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,6 @@ use FireflyIII\Models\Webhook;
|
||||
use FireflyIII\Models\WebhookMessage;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Transformers\WebhookMessageTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
|
@ -24,10 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Webhook;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Transformers\WebhookTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@ -62,7 +62,7 @@ class ShowController extends Controller
|
||||
* Display a listing of the webhooks of the user.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
|
@ -27,7 +27,6 @@ use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\Webhook\CreateRequest;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Transformers\WebhookTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Requests\Models\Webhook\UpdateRequest;
|
||||
use FireflyIII\Models\Webhook;
|
||||
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use FireflyIII\Transformers\WebhookTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
|
@ -220,7 +220,7 @@ class GenericRequest extends FormRequest
|
||||
/** @var Account $account */
|
||||
foreach ($this->accounts as $account) {
|
||||
$type = $account->accountType->type;
|
||||
if (in_array($type, [AccountType::EXPENSE])) {
|
||||
if ($type === AccountType::EXPENSE) {
|
||||
$return->push($account);
|
||||
}
|
||||
}
|
||||
@ -238,7 +238,7 @@ class GenericRequest extends FormRequest
|
||||
/** @var Account $account */
|
||||
foreach ($this->accounts as $account) {
|
||||
$type = $account->accountType->type;
|
||||
if (in_array($type, [AccountType::REVENUE])) {
|
||||
if ($type === AccountType::REVENUE) {
|
||||
$return->push($account);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\Recurrence;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Rules\BelongsUser;
|
||||
use FireflyIII\Rules\IsBoolean;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
|
@ -173,6 +173,7 @@ class UpdateRequest extends FormRequest
|
||||
* For each field, add it to the array if a reference is present in the request:
|
||||
*
|
||||
* @param array $current
|
||||
* @param array $transaction
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -57,6 +57,7 @@ class CorrectOpeningBalanceCurrencies extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -96,7 +97,6 @@ class CorrectOpeningBalanceCurrencies extends Command
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return int
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function correctJournal(TransactionJournal $journal): int
|
||||
{
|
||||
|
@ -27,7 +27,6 @@ use Exception;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class DeleteZeroAmount
|
||||
|
@ -33,7 +33,6 @@ use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Support\Export\ExportDataGenerator;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use InvalidArgumentException;
|
||||
@ -82,9 +81,7 @@ class ExportData extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws CannotInsertRecord
|
||||
* @throws FireflyException
|
||||
* @throws \League\Csv\Exception
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
use FireflyIII\Models\AccountType;
|
||||
@ -63,6 +64,7 @@ class AccountCurrencies extends Command
|
||||
* Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -106,7 +108,7 @@ class AccountCurrencies extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
@ -136,7 +138,7 @@ class AccountCurrencies extends Command
|
||||
* @param User $user
|
||||
* @param string $systemCurrencyCode
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function updateCurrenciesForUser(User $user, string $systemCurrencyCode): void
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
@ -47,6 +48,7 @@ class AppendBudgetLimitPeriods extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -69,7 +71,7 @@ class AppendBudgetLimitPeriods extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use DB;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@ -55,6 +56,7 @@ class BackToJournals extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -83,7 +85,7 @@ class BackToJournals extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isMigrated(): bool
|
||||
{
|
||||
@ -94,7 +96,7 @@ class BackToJournals extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
@ -50,6 +50,8 @@ class BudgetLimitCurrency extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -95,7 +97,7 @@ class BudgetLimitCurrency extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Illuminate\Console\Command;
|
||||
@ -51,6 +52,7 @@ class CCLiabilities extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -79,7 +81,7 @@ class CCLiabilities extends Command
|
||||
$this->line(sprintf('Converted credit card liability account "%s" (#%d) to generic debt liability.', $account->name, $account->id));
|
||||
}
|
||||
if ($accounts->count() > 0) {
|
||||
$this->info('Credit card liability types are no longer supported and have been converted to generic debts. See: http://bit.ly/FF3-credit-cards');
|
||||
$this->info('Credit card liability types are no longer supported and have been converted to generic debts. See: https://bit.ly/FF3-credit-cards');
|
||||
}
|
||||
if (0 === $accounts->count()) {
|
||||
$this->info('No incorrectly stored credit card liabilities.');
|
||||
@ -93,7 +95,7 @@ class CCLiabilities extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -76,6 +76,7 @@ class CreateGroupMemberships extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Note;
|
||||
use Illuminate\Console\Command;
|
||||
@ -51,6 +52,7 @@ class MigrateAttachments extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -105,7 +107,7 @@ class MigrateAttachments extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\TransactionJournalMeta;
|
||||
use Illuminate\Console\Command;
|
||||
@ -52,6 +53,7 @@ class MigrateJournalNotes extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -103,7 +105,7 @@ class MigrateJournalNotes extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -24,9 +24,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\RecurrenceMeta;
|
||||
use FireflyIII\Models\RecurrenceTransactionMeta;
|
||||
use Illuminate\Console\Command;
|
||||
use JsonException;
|
||||
|
||||
/**
|
||||
* Class MigrateRecurrenceMeta
|
||||
@ -51,6 +53,8 @@ class MigrateRecurrenceMeta extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -79,7 +83,7 @@ class MigrateRecurrenceMeta extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
@ -93,7 +97,7 @@ class MigrateRecurrenceMeta extends Command
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function migrateMetaData(): int
|
||||
{
|
||||
@ -112,7 +116,7 @@ class MigrateRecurrenceMeta extends Command
|
||||
* @param RecurrenceMeta $meta
|
||||
*
|
||||
* @return int
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function migrateEntry(RecurrenceMeta $meta): int
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\RecurrenceTransaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@ -52,6 +53,7 @@ class MigrateRecurrenceType extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -74,7 +76,7 @@ class MigrateRecurrenceType extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Location;
|
||||
use FireflyIII\Models\Tag;
|
||||
use Illuminate\Console\Command;
|
||||
@ -52,6 +53,7 @@ class MigrateTagLocations extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -72,7 +74,7 @@ class MigrateTagLocations extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use DB;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\TransactionGroupFactory;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
@ -127,7 +128,7 @@ class MigrateToGroups extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isMigrated(): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@ -70,6 +71,7 @@ class OtherCurrenciesCorrections extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -112,7 +114,7 @@ class OtherCurrenciesCorrections extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
@ -49,6 +50,7 @@ class RenameAccountMeta extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -96,7 +98,7 @@ class RenameAccountMeta extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
|
||||
@ -67,6 +68,7 @@ class TransactionIdentifier extends Command
|
||||
* think. So each set gets a number (1,2,3) to keep them apart.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -120,7 +122,7 @@ class TransactionIdentifier extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -132,6 +132,7 @@ class TransferCurrenciesCorrections extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
@ -169,7 +170,7 @@ class TransferCurrenciesCorrections extends Command
|
||||
|
||||
|
||||
if ($this->isSplitJournal($transfer)) {
|
||||
$this->line(sprintf(sprintf('Transaction journal #%d is a split journal. Cannot continue.', $transfer->id)));
|
||||
$this->line(sprintf('Transaction journal #%d is a split journal. Cannot continue.', $transfer->id));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -246,7 +247,7 @@ class TransferCurrenciesCorrections extends Command
|
||||
private function getSourceInformation(TransactionJournal $journal): void
|
||||
{
|
||||
$this->sourceTransaction = $this->getSourceTransaction($journal);
|
||||
$this->sourceAccount = null === $this->sourceTransaction ? null : $this->sourceTransaction->account;
|
||||
$this->sourceAccount = $this->sourceTransaction?->account;
|
||||
$this->sourceCurrency = null === $this->sourceAccount ? null : $this->getCurrency($this->sourceAccount);
|
||||
}
|
||||
|
||||
@ -298,7 +299,7 @@ class TransferCurrenciesCorrections extends Command
|
||||
private function getDestinationInformation(TransactionJournal $journal): void
|
||||
{
|
||||
$this->destinationTransaction = $this->getDestinationTransaction($journal);
|
||||
$this->destinationAccount = null === $this->destinationTransaction ? null : $this->destinationTransaction->account;
|
||||
$this->destinationAccount = $this->destinationTransaction?->account;
|
||||
$this->destinationCurrency = null === $this->destinationAccount ? null : $this->getCurrency($this->destinationAccount);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\AccountMetaFactory;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@ -57,6 +58,7 @@ class UpgradeLiabilities extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@ -78,7 +80,7 @@ class UpgradeLiabilities extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@ -24,9 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use FireflyIII\Support\System\GeneratesInstallationId;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\QueryException;
|
||||
|
||||
/**
|
||||
* Class UpgradeFireflyInstructions.
|
||||
|
@ -51,6 +51,7 @@ class VerifySecurityAlerts extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Events;
|
||||
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
|
@ -45,6 +45,7 @@ class StoredTransactionGroup extends Event
|
||||
*
|
||||
* @param TransactionGroup $transactionGroup
|
||||
* @param bool $applyRules
|
||||
* @param bool $fireWebhooks
|
||||
*/
|
||||
public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true, bool $fireWebhooks = true)
|
||||
{
|
||||
|
@ -45,6 +45,7 @@ class UpdatedTransactionGroup extends Event
|
||||
*
|
||||
* @param TransactionGroup $transactionGroup
|
||||
* @param bool $applyRules
|
||||
* @param bool $fireWebhooks
|
||||
*/
|
||||
public function __construct(TransactionGroup $transactionGroup, bool $applyRules = true, bool $fireWebhooks = true)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Bill;
|
||||
@ -31,7 +30,9 @@ use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
@ -50,7 +51,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
* @param Request $request
|
||||
* @param Throwable $e
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\JsonResponse|\Illuminate\Http\Response|Redirector|RedirectResponse|Response
|
||||
* @return Application|JsonResponse|\Illuminate\Http\Response|Redirector|RedirectResponse|Response
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function render($request, Throwable $e)
|
||||
|
@ -33,6 +33,7 @@ use FireflyIII\Services\Internal\Support\AccountServiceTrait;
|
||||
use FireflyIII\Services\Internal\Support\LocationServiceTrait;
|
||||
use FireflyIII\Services\Internal\Update\AccountUpdateService;
|
||||
use FireflyIII\User;
|
||||
use JsonException;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@ -107,6 +108,7 @@ class AccountFactory
|
||||
*
|
||||
* @return Account
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function create(array $data): Account
|
||||
{
|
||||
@ -180,7 +182,7 @@ class AccountFactory
|
||||
* @param array $data
|
||||
*
|
||||
* @return Account
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function createAccount(AccountType $type, array $data): Account
|
||||
{
|
||||
@ -247,7 +249,6 @@ class AccountFactory
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
* @throws \JsonException
|
||||
*/
|
||||
private function cleanMetaDataArray(Account $account, array $data): array
|
||||
{
|
||||
@ -358,6 +359,9 @@ class AccountFactory
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param array $data
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function storeOrder(Account $account, array $data): void
|
||||
{
|
||||
|
@ -101,9 +101,7 @@ class RecurrenceFactory
|
||||
if (array_key_exists('active', $data['recurrence'])) {
|
||||
$active = $data['recurrence']['active'];
|
||||
}
|
||||
if (null !== $repeatUntil) {
|
||||
$repeatUntilString = $repeatUntil->format('Y-m-d');
|
||||
}
|
||||
$repeatUntilString = $repeatUntil?->format('Y-m-d');
|
||||
|
||||
$recurrence = new Recurrence(
|
||||
[
|
||||
@ -111,7 +109,7 @@ class RecurrenceFactory
|
||||
'transaction_type_id' => $type->id,
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'first_date' => $firstDate ? $firstDate->format('Y-m-d') : null,
|
||||
'first_date' => $firstDate?->format('Y-m-d'),
|
||||
'repeat_until' => $repetitions > 0 ? null : $repeatUntilString,
|
||||
'latest_date' => null,
|
||||
'repetitions' => $repetitions,
|
||||
|
@ -46,6 +46,7 @@ use FireflyIII\Support\NullArrayObject;
|
||||
use FireflyIII\User;
|
||||
use FireflyIII\Validation\AccountValidator;
|
||||
use Illuminate\Support\Collection;
|
||||
use JsonException;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@ -146,7 +147,7 @@ class TransactionJournalFactory
|
||||
* @return TransactionJournal|null
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function createJournal(NullArrayObject $row): ?TransactionJournal
|
||||
{
|
||||
@ -295,7 +296,7 @@ class TransactionJournalFactory
|
||||
* @param NullArrayObject $row
|
||||
*
|
||||
* @return string
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function hashArray(NullArrayObject $row): string
|
||||
{
|
||||
@ -321,7 +322,7 @@ class TransactionJournalFactory
|
||||
* @param string $hash
|
||||
*
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws \JsonException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function errorIfDuplicate(string $hash): void
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Mail\AccessTokenCreatedMail;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Laravel\Passport\Events\AccessTokenCreated;
|
||||
@ -43,7 +44,7 @@ class APIEventHandler
|
||||
* @param AccessTokenCreated $event
|
||||
*
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function accessTokenCreated(AccessTokenCreated $event): bool
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Events\AdminRequestedTestMessage;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Mail\AdminTestMail;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Log;
|
||||
@ -41,7 +42,7 @@ class AdminEventHandler
|
||||
* @param AdminRequestedTestMessage $event
|
||||
*
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function sendTestMessage(AdminRequestedTestMessage $event): bool
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Events\RequestedReportOnJournals;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Mail\ReportNewJournalsMail;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Log;
|
||||
@ -42,7 +43,7 @@ class AutomationHandler
|
||||
* @param RequestedReportOnJournals $event
|
||||
*
|
||||
* @return bool
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function reportJournals(RequestedReportOnJournals $event): bool
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use FireflyIII\Events\RequestedVersionCheckStatus;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Update\UpdateTrait;
|
||||
use FireflyIII\Models\Configuration;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
@ -43,7 +44,7 @@ class VersionCheckEventHandler
|
||||
*
|
||||
* @param RequestedVersionCheckStatus $event
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function checkForUpdates(RequestedVersionCheckStatus $event): void
|
||||
{
|
||||
@ -88,7 +89,7 @@ class VersionCheckEventHandler
|
||||
|
||||
/**
|
||||
* @param RequestedVersionCheckStatus $event
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ namespace FireflyIII\Helpers\Help;
|
||||
use Cache;
|
||||
use Exception;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use Log;
|
||||
use Route;
|
||||
@ -71,7 +72,7 @@ class Help implements HelpInterface
|
||||
* @param string $language
|
||||
*
|
||||
* @return string
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getFromGitHub(string $route, string $language): string
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Helpers\Update;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
|
||||
use Log;
|
||||
|
||||
@ -38,7 +39,7 @@ trait UpdateTrait
|
||||
* 'level' => 'info' / 'success' / 'error'
|
||||
*
|
||||
* @return array
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getLatestRelease(): array
|
||||
{
|
||||
|
@ -194,6 +194,7 @@ class EditController extends Controller
|
||||
$request->session()->flash('success', (string)trans('firefly.updated_account', ['name' => $account->name]));
|
||||
|
||||
// store new attachment(s):
|
||||
|
||||
$files = $request->hasFile('attachments') ? $request->file('attachments') : null;
|
||||
if (null !== $files && !auth()->user()->hasRole('demo')) {
|
||||
$this->attachments->saveAttachmentsForModel($account, $files);
|
||||
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Http\Requests\ConfigurationRequest;
|
||||
@ -59,7 +60,7 @@ class ConfigurationController extends Controller
|
||||
* Show configuration index.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Requests\AttachmentFormRequest;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||
use Illuminate\Contracts\Container\BindingResolutionException;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@ -216,7 +217,7 @@ class AttachmentController extends Controller
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
* @throws BindingResolutionException
|
||||
*/
|
||||
public function view(Request $request, Attachment $attachment): LaravelResponse
|
||||
{
|
||||
|
@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers\Auth;
|
||||
use Adldap;
|
||||
use Cookie;
|
||||
use DB;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Providers\RouteServiceProvider;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
@ -33,6 +34,7 @@ use Illuminate\Foundation\Auth\ThrottlesLogins;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Log;
|
||||
@ -83,7 +85,7 @@ class LoginController extends Controller
|
||||
public function login(Request $request)
|
||||
{
|
||||
Log::channel('audit')->info(sprintf('User is trying to login using "%s"', $request->get('email')));
|
||||
Log::info(sprintf('User is trying to login.'));
|
||||
Log::info('User is trying to login.');
|
||||
|
||||
$guard = config('auth.defaults.guard');
|
||||
|
||||
@ -134,7 +136,7 @@ class LoginController extends Controller
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return Response
|
||||
*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
@ -162,7 +164,7 @@ class LoginController extends Controller
|
||||
}
|
||||
|
||||
return $request->wantsJson()
|
||||
? new \Illuminate\Http\Response('', 204)
|
||||
? new Response('', 204)
|
||||
: redirect('/');
|
||||
}
|
||||
|
||||
@ -192,8 +194,8 @@ class LoginController extends Controller
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|\Illuminate\Http\Response|View
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @return Factory|Response|View
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
|
@ -32,6 +32,7 @@ use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Log;
|
||||
|
||||
@ -79,7 +80,7 @@ class RegisterController extends Controller
|
||||
*
|
||||
* @return Factory|RedirectResponse|Redirector|View
|
||||
* @throws FireflyException
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function register(Request $request)
|
||||
{
|
||||
|
@ -24,6 +24,8 @@ namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
@ -38,7 +40,7 @@ class TwoFactorController extends Controller
|
||||
/**
|
||||
* What to do if 2FA lost?
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function lostTwoFactor()
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Budget;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\BudgetFormStoreRequest;
|
||||
@ -111,7 +112,7 @@ class CreateController extends Controller
|
||||
* @param BudgetFormStoreRequest $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(BudgetFormStoreRequest $request): RedirectResponse
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Category;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\CategoryFormRequest;
|
||||
@ -86,7 +87,7 @@ class CreateController extends Controller
|
||||
* @param CategoryFormRequest $request
|
||||
*
|
||||
* @return $this|RedirectResponse|Redirector
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(CategoryFormRequest $request)
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Export;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
@ -32,6 +33,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Illuminate\View\View;
|
||||
use League\Csv\CannotInsertRecord;
|
||||
use League\Csv\Exception;
|
||||
|
||||
/**
|
||||
* Class IndexController
|
||||
@ -66,8 +68,8 @@ class IndexController extends Controller
|
||||
/**
|
||||
* @return LaravelResponse
|
||||
* @throws CannotInsertRecord
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \League\Csv\Exception
|
||||
* @throws FireflyException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function export(): LaravelResponse
|
||||
{
|
||||
|
@ -27,6 +27,8 @@ namespace FireflyIII\Http\Controllers\ObjectGroup;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
/**
|
||||
@ -62,7 +64,7 @@ class DeleteController extends Controller
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function delete(ObjectGroup $objectGroup)
|
||||
{
|
||||
|
@ -28,6 +28,11 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\ObjectGroupFormRequest;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Routing\Redirector;
|
||||
|
||||
/**
|
||||
* Class EditController
|
||||
@ -62,7 +67,7 @@ class EditController extends Controller
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
|
||||
* @return Factory|View
|
||||
*/
|
||||
public function edit(ObjectGroup $objectGroup)
|
||||
{
|
||||
@ -82,7 +87,8 @@ class EditController extends Controller
|
||||
*
|
||||
* @param ObjectGroupFormRequest $request
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*
|
||||
* @return Application|RedirectResponse|Redirector
|
||||
*/
|
||||
public function update(ObjectGroupFormRequest $request, ObjectGroup $objectGroup)
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\View\View;
|
||||
use Log;
|
||||
@ -78,7 +79,7 @@ class IndexController extends Controller
|
||||
* @param Request $request
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function setOrder(Request $request, ObjectGroup $objectGroup)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user