From 190b6fb25f8a5bcd792de68ddb18a8d4b7f60dab Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 05:26:31 +0200 Subject: [PATCH 01/30] Update API endpoints. --- .../Autocomplete/AccountController.php | 7 +++++++ .../Autocomplete/BillController.php | 3 +++ .../Autocomplete/BudgetController.php | 3 +++ .../Autocomplete/CategoryController.php | 3 +++ .../Autocomplete/CurrencyController.php | 8 ++++++- .../Autocomplete/ObjectGroupController.php | 2 ++ .../Autocomplete/PiggyBankController.php | 10 ++++++++- .../Autocomplete/RecurrenceController.php | 21 +++++++++++-------- .../Autocomplete/RuleController.php | 3 +++ .../Autocomplete/RuleGroupController.php | 3 +++ .../Autocomplete/TagController.php | 3 +++ .../Autocomplete/TransactionController.php | 6 ++++++ .../TransactionTypeController.php | 3 +++ .../Controllers/Chart/AccountController.php | 5 +++++ .../Data/Bulk/AccountController.php | 2 ++ .../Data/Bulk/TransactionController.php | 9 +++++--- .../Data/Bulk/MoveTransactionsRequest.php | 2 +- .../Bulk/ValidatesBulkTransactionQuery.php | 17 ++++++++------- frontend/src/components/accounts/Delete.vue | 4 ++-- routes/api.php | 8 ------- 20 files changed, 90 insertions(+), 32 deletions(-) diff --git a/app/Api/V1/Controllers/Autocomplete/AccountController.php b/app/Api/V1/Controllers/Autocomplete/AccountController.php index dbe91e2566..e9a6cfd232 100644 --- a/app/Api/V1/Controllers/Autocomplete/AccountController.php +++ b/app/Api/V1/Controllers/Autocomplete/AccountController.php @@ -25,12 +25,14 @@ namespace FireflyIII\Api\V1\Controllers\Autocomplete; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\User; use Illuminate\Http\JsonResponse; +use JsonException; /** * Class AccountController @@ -62,9 +64,14 @@ class AccountController extends Controller } /** + * Documentation for this endpoint: + * https://api-docs.firefly-iii.org/#/autocomplete/getAccountsAC + * * @param AutocompleteRequest $request * * @return JsonResponse + * @throws FireflyException + * @throws JsonException */ public function accounts(AutocompleteRequest $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Autocomplete/BillController.php b/app/Api/V1/Controllers/Autocomplete/BillController.php index 6369629f30..6033d7f6e3 100644 --- a/app/Api/V1/Controllers/Autocomplete/BillController.php +++ b/app/Api/V1/Controllers/Autocomplete/BillController.php @@ -56,6 +56,9 @@ class BillController extends Controller } /** + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getBillsAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/BudgetController.php b/app/Api/V1/Controllers/Autocomplete/BudgetController.php index 62c12b7a4a..c1ddc3e638 100644 --- a/app/Api/V1/Controllers/Autocomplete/BudgetController.php +++ b/app/Api/V1/Controllers/Autocomplete/BudgetController.php @@ -56,6 +56,9 @@ class BudgetController extends Controller } /** + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getBudgetsAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/CategoryController.php b/app/Api/V1/Controllers/Autocomplete/CategoryController.php index 9798c8579b..4bf324f815 100644 --- a/app/Api/V1/Controllers/Autocomplete/CategoryController.php +++ b/app/Api/V1/Controllers/Autocomplete/CategoryController.php @@ -56,6 +56,9 @@ class CategoryController extends Controller } /** + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getCategoriesAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/CurrencyController.php b/app/Api/V1/Controllers/Autocomplete/CurrencyController.php index e9abdbf128..a9d6d11cc4 100644 --- a/app/Api/V1/Controllers/Autocomplete/CurrencyController.php +++ b/app/Api/V1/Controllers/Autocomplete/CurrencyController.php @@ -56,6 +56,9 @@ class CurrencyController extends Controller } /** + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getCurrenciesAC + * * @param AutocompleteRequest $request * * @return JsonResponse @@ -81,8 +84,11 @@ class CurrencyController extends Controller } /** - * @param AutocompleteRequest $request + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getCurrenciesCodeAC * + * @param AutocompleteRequest $request + * @deprecated * @return JsonResponse */ public function currenciesWithCode(AutocompleteRequest $request): JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php b/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php index 00342d21a4..61d9ba3dc0 100644 --- a/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php +++ b/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php @@ -56,6 +56,8 @@ class ObjectGroupController extends Controller } /** + * Documentation for this endpoint is at: + * https://api-docs.firefly-iii.org/#/autocomplete/getObjectGroupsAC * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/PiggyBankController.php b/app/Api/V1/Controllers/Autocomplete/PiggyBankController.php index 403cdf71c4..2a903e1318 100644 --- a/app/Api/V1/Controllers/Autocomplete/PiggyBankController.php +++ b/app/Api/V1/Controllers/Autocomplete/PiggyBankController.php @@ -36,7 +36,7 @@ use Illuminate\Http\JsonResponse; */ class PiggyBankController extends Controller { - private AccountRepositoryInterface $accountRepository; + private AccountRepositoryInterface $accountRepository; private PiggyBankRepositoryInterface $piggyRepository; /** @@ -60,6 +60,9 @@ class PiggyBankController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getPiggiesAC + * * @param AutocompleteRequest $request * * @return JsonResponse @@ -80,6 +83,7 @@ class PiggyBankController extends Controller 'currency_id' => $currency->id, 'currency_name' => $currency->name, 'currency_code' => $currency->code, + 'currency_symbol' => $currency->symbol, 'currency_decimal_places' => $currency->decimal_places, ]; } @@ -88,6 +92,9 @@ class PiggyBankController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getPiggiesBalanceAC + * * @param AutocompleteRequest $request * * @return JsonResponse @@ -112,6 +119,7 @@ class PiggyBankController extends Controller 'currency_id' => $currency->id, 'currency_name' => $currency->name, 'currency_code' => $currency->code, + 'currency_symbol' => $currency->symbol, 'currency_decimal_places' => $currency->decimal_places, ]; } diff --git a/app/Api/V1/Controllers/Autocomplete/RecurrenceController.php b/app/Api/V1/Controllers/Autocomplete/RecurrenceController.php index 7569c1e4e6..aa133d7192 100644 --- a/app/Api/V1/Controllers/Autocomplete/RecurrenceController.php +++ b/app/Api/V1/Controllers/Autocomplete/RecurrenceController.php @@ -25,7 +25,7 @@ namespace FireflyIII\Api\V1\Controllers\Autocomplete; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest; -use FireflyIII\Models\Rule; +use FireflyIII\Models\Recurrence; use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface; use Illuminate\Http\JsonResponse; @@ -53,22 +53,25 @@ class RecurrenceController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getRecurringAC + * * @param AutocompleteRequest $request * * @return JsonResponse */ public function recurring(AutocompleteRequest $request): JsonResponse { - $data = $request->getData(); - $rules = $this->repository->searchRecurrence($data['query'], $data['limit']); - $response = []; + $data = $request->getData(); + $recurrences = $this->repository->searchRecurrence($data['query'], $data['limit']); + $response = []; - /** @var Rule $rule */ - foreach ($rules as $rule) { + /** @var Recurrence $recurrence */ + foreach ($recurrences as $recurrence) { $response[] = [ - 'id' => (string)$rule->id, - 'name' => $rule->title, - 'description' => $rule->description, + 'id' => (string)$recurrence->id, + 'name' => $recurrence->title, + 'description' => $recurrence->description, ]; } diff --git a/app/Api/V1/Controllers/Autocomplete/RuleController.php b/app/Api/V1/Controllers/Autocomplete/RuleController.php index 8d64b4ef65..dadfd66d75 100644 --- a/app/Api/V1/Controllers/Autocomplete/RuleController.php +++ b/app/Api/V1/Controllers/Autocomplete/RuleController.php @@ -53,6 +53,9 @@ class RuleController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getRulesAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/RuleGroupController.php b/app/Api/V1/Controllers/Autocomplete/RuleGroupController.php index bc269f20f8..a4fc1cf437 100644 --- a/app/Api/V1/Controllers/Autocomplete/RuleGroupController.php +++ b/app/Api/V1/Controllers/Autocomplete/RuleGroupController.php @@ -53,6 +53,9 @@ class RuleGroupController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getRuleGroupsAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/TagController.php b/app/Api/V1/Controllers/Autocomplete/TagController.php index 47b51e43a4..12e3498415 100644 --- a/app/Api/V1/Controllers/Autocomplete/TagController.php +++ b/app/Api/V1/Controllers/Autocomplete/TagController.php @@ -56,6 +56,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getTagAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/TransactionController.php b/app/Api/V1/Controllers/Autocomplete/TransactionController.php index 5ce1debfb6..923d9d1602 100644 --- a/app/Api/V1/Controllers/Autocomplete/TransactionController.php +++ b/app/Api/V1/Controllers/Autocomplete/TransactionController.php @@ -61,6 +61,9 @@ class TransactionController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getTransactionsAC + * * @param AutocompleteRequest $request * * @return JsonResponse @@ -88,6 +91,9 @@ class TransactionController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/autocomplete/getTransactionsIDAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Autocomplete/TransactionTypeController.php b/app/Api/V1/Controllers/Autocomplete/TransactionTypeController.php index 6143d0db36..2318c5fdb3 100644 --- a/app/Api/V1/Controllers/Autocomplete/TransactionTypeController.php +++ b/app/Api/V1/Controllers/Autocomplete/TransactionTypeController.php @@ -52,6 +52,9 @@ class TransactionTypeController extends Controller } /** + * This endpoint is documented at + * https://api-docs.firefly-iii.org/#/autocomplete/getTransactionTypesAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php index 22472602a7..7fd8b1864e 100644 --- a/app/Api/V1/Controllers/Chart/AccountController.php +++ b/app/Api/V1/Controllers/Chart/AccountController.php @@ -27,6 +27,7 @@ namespace FireflyIII\Api\V1\Controllers\Chart; use Carbon\Carbon; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Data\DateRequest; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -69,9 +70,13 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/charts/getChartAccountOverview + * * @param DateRequest $request * * @return JsonResponse + * @throws FireflyException */ public function overview(DateRequest $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Data/Bulk/AccountController.php b/app/Api/V1/Controllers/Data/Bulk/AccountController.php index a3584e1ed6..3508c9393e 100644 --- a/app/Api/V1/Controllers/Data/Bulk/AccountController.php +++ b/app/Api/V1/Controllers/Data/Bulk/AccountController.php @@ -57,6 +57,8 @@ class AccountController extends Controller } /** + * This endpoint is deprecated and not documented. + * @deprecated * @param MoveTransactionsRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Data/Bulk/TransactionController.php b/app/Api/V1/Controllers/Data/Bulk/TransactionController.php index 1138b4838c..79435f58b8 100644 --- a/app/Api/V1/Controllers/Data/Bulk/TransactionController.php +++ b/app/Api/V1/Controllers/Data/Bulk/TransactionController.php @@ -61,6 +61,8 @@ class TransactionController extends Controller } /** + * This endpoint is documented at: + * * @param TransactionRequest $request * * @return JsonResponse @@ -69,12 +71,13 @@ class TransactionController extends Controller { $query = $request->getAll(); $params = $query['query']; + // this deserves better code, but for now a loop of basic if-statements // to respond to what is in the $query. // this is OK because only one thing can be in the query at the moment. if ($this->updatesTransactionAccount($params)) { - $original = $this->repository->find((int)$params['where']['source_account_id']); - $destination = $this->repository->find((int)$params['update']['destination_account_id']); + $original = $this->repository->find((int)$params['where']['account_id']); + $destination = $this->repository->find((int)$params['update']['account_id']); /** @var AccountDestroyService $service */ $service = app(AccountDestroyService::class); @@ -91,7 +94,7 @@ class TransactionController extends Controller */ private function updatesTransactionAccount(array $params): bool { - return array_key_exists('source_account_id', $params['where']) && array_key_exists('destination_account_id', $params['update']); + return array_key_exists('account_id', $params['where']) && array_key_exists('account_id', $params['update']); } } diff --git a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php index e343066d47..f28790f0dd 100644 --- a/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php +++ b/app/Api/V1/Requests/Data/Bulk/MoveTransactionsRequest.php @@ -63,7 +63,7 @@ class MoveTransactionsRequest extends FormRequest * Configure the validator instance with special rules for after the basic validation rules. * * @param Validator $validator -* See reference nr. 74 + * See reference nr. 74 * * @return void */ diff --git a/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php b/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php index 7f5f21839d..71c88d91d9 100644 --- a/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php +++ b/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php @@ -26,6 +26,7 @@ namespace FireflyIII\Validation\Api\Data\Bulk; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Validation\Validator; +use JsonException; /** * @@ -34,30 +35,32 @@ trait ValidatesBulkTransactionQuery { /** * @param Validator $validator + * + * @throws JsonException */ protected function validateTransactionQuery(Validator $validator): void { $data = $validator->getData(); // assumption is all validation has already taken place // and the query key exists. - $json = json_decode($data['query'], true, 8); + $json = json_decode($data['query'], true, 8, JSON_THROW_ON_ERROR); - if (array_key_exists('source_account_id', $json['where']) - && array_key_exists('destination_account_id', $json['update']) + if (array_key_exists('account_id', $json['where']) + && array_key_exists('account_id', $json['update']) ) { // find both accounts // must be same type. // already validated: belongs to this user. $repository = app(AccountRepositoryInterface::class); - $source = $repository->find((int)$json['where']['source_account_id']); - $dest = $repository->find((int)$json['update']['destination_account_id']); + $source = $repository->find((int)$json['where']['account_id']); + $dest = $repository->find((int)$json['update']['account_id']); if (null === $source) { - $validator->errors()->add('query', sprintf((string)trans('validation.invalid_query_data'), 'where', 'source_account_id')); + $validator->errors()->add('query', sprintf((string)trans('validation.invalid_query_data'), 'where', 'account_id')); return; } if (null === $dest) { - $validator->errors()->add('query', sprintf((string)trans('validation.invalid_query_data'), 'update', 'destination_account_id')); + $validator->errors()->add('query', sprintf((string)trans('validation.invalid_query_data'), 'update', 'account_id')); return; } diff --git a/frontend/src/components/accounts/Delete.vue b/frontend/src/components/accounts/Delete.vue index fd77045e32..f8eb09a831 100644 --- a/frontend/src/components/accounts/Delete.vue +++ b/frontend/src/components/accounts/Delete.vue @@ -110,8 +110,8 @@ export default { let query = { - where: {source_account_id: this.accountId}, - update: {destination_account_id: this.moveToAccount} + where: {account_id: this.accountId}, + update: {account_id: this.moveToAccount} }; axios.post('./api/v1/data/bulk/transactions', {query: JSON.stringify(query)}).then(response => { diff --git a/routes/api.php b/routes/api.php index 83b658f039..88d0a3c982 100644 --- a/routes/api.php +++ b/routes/api.php @@ -98,14 +98,6 @@ Route::group( Route::post('transactions', ['uses' => 'TransactionController@update', 'as' => 'transactions']); } ); -//Route::group( -// ['namespace' => 'FireflyIII\Api\V1\Controllers\Data\Bulk', 'prefix' => 'data/bulk', -// 'as' => 'api.v1.data.bulk.',], -// static function () { -// Route::post('transactions', ['uses' => 'AccountController@moveTransactions', 'as' => 'accounts.move-transactions']); -// } -//); - /** * INSIGHTS ROUTES From 4f27ca28c33f20cbbbf4b12a94c5b675c0466e3c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 05:58:22 +0200 Subject: [PATCH 02/30] Update various endpoints. --- .../V1/Controllers/Data/DestroyController.php | 3 ++ .../Data/Export/ExportController.php | 51 ++++++++++++++----- .../Insight/Expense/AccountController.php | 8 ++- .../Insight/Expense/BillController.php | 6 +++ .../Insight/Expense/BudgetController.php | 6 +++ .../Insight/Expense/CategoryController.php | 6 +++ .../Insight/Expense/PeriodController.php | 3 ++ .../Insight/Expense/TagController.php | 6 +++ .../Insight/Income/AccountController.php | 6 +++ .../Insight/Income/CategoryController.php | 6 +++ .../Insight/Income/PeriodController.php | 3 ++ .../Insight/Income/TagController.php | 6 +++ .../Insight/Transfer/AccountController.php | 2 + .../Insight/Transfer/CategoryController.php | 6 +++ .../Insight/Transfer/PeriodController.php | 3 ++ .../Insight/Transfer/TagController.php | 6 ++- 16 files changed, 113 insertions(+), 14 deletions(-) diff --git a/app/Api/V1/Controllers/Data/DestroyController.php b/app/Api/V1/Controllers/Data/DestroyController.php index df724abe71..adba823dbc 100644 --- a/app/Api/V1/Controllers/Data/DestroyController.php +++ b/app/Api/V1/Controllers/Data/DestroyController.php @@ -52,6 +52,9 @@ use Illuminate\Http\JsonResponse; class DestroyController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/destroyData + * * @param DestroyRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Data/Export/ExportController.php b/app/Api/V1/Controllers/Data/Export/ExportController.php index 72786554b4..4eb6343b41 100644 --- a/app/Api/V1/Controllers/Data/Export/ExportController.php +++ b/app/Api/V1/Controllers/Data/Export/ExportController.php @@ -26,9 +26,11 @@ namespace FireflyIII\Api\V1\Controllers\Data\Export; use FireflyIII\Api\V1\Controllers\Controller; 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 @@ -54,10 +56,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportAccounts + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function accounts(ExportRequest $request): LaravelResponse { @@ -71,9 +76,7 @@ class ExportController extends Controller * @param string $key * * @return LaravelResponse - * @throws CannotInsertRecord - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \League\Csv\Exception + * @throws FireflyException */ private function returnExport(string $key): LaravelResponse { @@ -98,10 +101,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportBills + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function bills(ExportRequest $request): LaravelResponse { @@ -111,10 +117,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportBudgets + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function budgets(ExportRequest $request): LaravelResponse { @@ -124,10 +133,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportCategories + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function categories(ExportRequest $request): LaravelResponse { @@ -137,10 +149,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportPiggies + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function piggyBanks(ExportRequest $request): LaravelResponse { @@ -150,10 +165,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportRecurring + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function recurring(ExportRequest $request): LaravelResponse { @@ -163,10 +181,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportRules + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function rules(ExportRequest $request): LaravelResponse { @@ -176,10 +197,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportTags + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function tags(ExportRequest $request): LaravelResponse { @@ -189,10 +213,13 @@ class ExportController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/data/exportTransactions + * * @param ExportRequest $request * * @return LaravelResponse - * @throws CannotInsertRecord + * @throws FireflyException */ public function transactions(ExportRequest $request): LaravelResponse { diff --git a/app/Api/V1/Controllers/Insight/Expense/AccountController.php b/app/Api/V1/Controllers/Insight/Expense/AccountController.php index 03d3c2418d..af32ae9e60 100644 --- a/app/Api/V1/Controllers/Insight/Expense/AccountController.php +++ b/app/Api/V1/Controllers/Insight/Expense/AccountController.php @@ -37,7 +37,7 @@ use Illuminate\Http\JsonResponse; * Class AccountController * * Shows expense information grouped or limited by date. - * Ie. all expenses grouped by account + currency. + * I.e. all expenses grouped by account + currency. */ class AccountController extends Controller { @@ -73,6 +73,9 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseAsset + * * @param GenericRequest $request * * @return JsonResponse @@ -101,6 +104,9 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseExpense + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Expense/BillController.php b/app/Api/V1/Controllers/Insight/Expense/BillController.php index c73cc8e1b8..e79633d264 100644 --- a/app/Api/V1/Controllers/Insight/Expense/BillController.php +++ b/app/Api/V1/Controllers/Insight/Expense/BillController.php @@ -56,6 +56,9 @@ class BillController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseBill + * * Expenses per bill, possibly filtered by bill and account. * * @param GenericRequest $request @@ -116,6 +119,9 @@ class BillController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseNoBill + * * Expenses for no bill filtered by account. * * @param GenericRequest $request diff --git a/app/Api/V1/Controllers/Insight/Expense/BudgetController.php b/app/Api/V1/Controllers/Insight/Expense/BudgetController.php index e21d072fff..dac96322a7 100644 --- a/app/Api/V1/Controllers/Insight/Expense/BudgetController.php +++ b/app/Api/V1/Controllers/Insight/Expense/BudgetController.php @@ -65,6 +65,9 @@ class BudgetController extends Controller } /** + * This endpoint is documented at: + * http://10.0.0.15/FF3/api/api-docs/#/insight/insightExpenseBudget + * * @param GenericRequest $request * * @return JsonResponse @@ -99,6 +102,9 @@ class BudgetController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseNoBudget + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Expense/CategoryController.php b/app/Api/V1/Controllers/Insight/Expense/CategoryController.php index c32e800655..db8f31a2c3 100644 --- a/app/Api/V1/Controllers/Insight/Expense/CategoryController.php +++ b/app/Api/V1/Controllers/Insight/Expense/CategoryController.php @@ -66,6 +66,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferCategory + * * @param GenericRequest $request * * @return JsonResponse @@ -100,6 +103,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferNoCategory + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Expense/PeriodController.php b/app/Api/V1/Controllers/Insight/Expense/PeriodController.php index ec06e0436b..a83f6ca66a 100644 --- a/app/Api/V1/Controllers/Insight/Expense/PeriodController.php +++ b/app/Api/V1/Controllers/Insight/Expense/PeriodController.php @@ -36,6 +36,9 @@ class PeriodController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseTotal + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Expense/TagController.php b/app/Api/V1/Controllers/Insight/Expense/TagController.php index d9e16fba55..d856d01c3d 100644 --- a/app/Api/V1/Controllers/Insight/Expense/TagController.php +++ b/app/Api/V1/Controllers/Insight/Expense/TagController.php @@ -55,6 +55,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseNoTag + * * Expenses for no tag filtered by account. * * @param GenericRequest $request @@ -105,6 +108,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightExpenseTag + * * Expenses per tag, possibly filtered by tag and account. * * @param GenericRequest $request diff --git a/app/Api/V1/Controllers/Insight/Income/AccountController.php b/app/Api/V1/Controllers/Insight/Income/AccountController.php index 30e6b3a9e5..719a77ab6c 100644 --- a/app/Api/V1/Controllers/Insight/Income/AccountController.php +++ b/app/Api/V1/Controllers/Insight/Income/AccountController.php @@ -73,6 +73,9 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeAsset + * * @param GenericRequest $request * * @return JsonResponse @@ -100,6 +103,9 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeRevenue + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Income/CategoryController.php b/app/Api/V1/Controllers/Insight/Income/CategoryController.php index ffc84536fb..47007f432f 100644 --- a/app/Api/V1/Controllers/Insight/Income/CategoryController.php +++ b/app/Api/V1/Controllers/Insight/Income/CategoryController.php @@ -66,6 +66,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeCategory + * * @param GenericRequest $request * * @return JsonResponse @@ -100,6 +103,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeNoCategory + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Income/PeriodController.php b/app/Api/V1/Controllers/Insight/Income/PeriodController.php index f443cdc81d..4ec6c12acb 100644 --- a/app/Api/V1/Controllers/Insight/Income/PeriodController.php +++ b/app/Api/V1/Controllers/Insight/Income/PeriodController.php @@ -36,6 +36,9 @@ class PeriodController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeTotal + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.php index 37eb525a60..8e58fbf01d 100644 --- a/app/Api/V1/Controllers/Insight/Income/TagController.php +++ b/app/Api/V1/Controllers/Insight/Income/TagController.php @@ -56,6 +56,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeTag + * * Expenses for no tag filtered by account. * * @param GenericRequest $request @@ -108,6 +111,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightIncomeNoTag + * * Expenses per tag, possibly filtered by tag and account. * * @param GenericRequest $request diff --git a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php b/app/Api/V1/Controllers/Insight/Transfer/AccountController.php index f20716ab84..141daf143e 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/AccountController.php @@ -58,6 +58,8 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransfers * * @param GenericRequest $request * diff --git a/app/Api/V1/Controllers/Insight/Transfer/CategoryController.php b/app/Api/V1/Controllers/Insight/Transfer/CategoryController.php index b575bbc93a..43b77675ed 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/CategoryController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/CategoryController.php @@ -65,6 +65,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferCategory + * * @param GenericRequest $request * * @return JsonResponse @@ -99,6 +102,9 @@ class CategoryController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferNoCategory + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Transfer/PeriodController.php b/app/Api/V1/Controllers/Insight/Transfer/PeriodController.php index dfa12c7132..ecb42d4a9f 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/PeriodController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/PeriodController.php @@ -36,6 +36,9 @@ class PeriodController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferTotal + * * @param GenericRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Insight/Transfer/TagController.php b/app/Api/V1/Controllers/Insight/Transfer/TagController.php index e67b01ac9c..59404dcbbb 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php @@ -55,7 +55,8 @@ class TagController extends Controller } /** - * Expenses for no tag filtered by account. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferNoTag * * @param GenericRequest $request * @@ -107,6 +108,9 @@ class TagController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/insight/insightTransferTag + * * Transfers per tag, possibly filtered by tag and account. * * @param GenericRequest $request From d18e9da4688229c14524bab1267fa7a871d99851 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 07:02:11 +0200 Subject: [PATCH 03/30] Bad hash checking found in #4997 --- app/Factory/TransactionJournalFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php index 8a7025b376..8937adec07 100644 --- a/app/Factory/TransactionJournalFactory.php +++ b/app/Factory/TransactionJournalFactory.php @@ -333,7 +333,8 @@ class TransactionJournalFactory if ($this->errorOnHash) { Log::debug('Will verify duplicate!'); /** @var TransactionJournalMeta $result */ - $result = TransactionJournalMeta::where('data', json_encode($hash, JSON_THROW_ON_ERROR)) + $result = TransactionJournalMeta::withTrashed() + ->where('data', json_encode($hash, JSON_THROW_ON_ERROR)) ->with(['transactionJournal', 'transactionJournal.transactionGroup']) ->first(); } From b3a98d707978e31879724a6094d2a4a40383c9b6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:07:45 +0200 Subject: [PATCH 04/30] Update API endpoints. --- .../Models/Account/DestroyController.php | 3 +++ .../Controllers/Models/Account/ListController.php | 14 +++++++++++--- .../Controllers/Models/Account/ShowController.php | 6 ++++++ .../Controllers/Models/Account/StoreController.php | 3 +++ .../Models/Account/UpdateController.php | 3 +++ .../Models/Attachment/DestroyController.php | 3 +++ .../Models/Attachment/ShowController.php | 9 +++++++++ .../Models/Attachment/StoreController.php | 3 +++ .../Models/Attachment/UpdateController.php | 3 +++ .../Models/AvailableBudget/DestroyController.php | 3 +++ .../Models/AvailableBudget/ShowController.php | 6 +++++- 11 files changed, 52 insertions(+), 4 deletions(-) diff --git a/app/Api/V1/Controllers/Models/Account/DestroyController.php b/app/Api/V1/Controllers/Models/Account/DestroyController.php index 308d8b9669..7819d78003 100644 --- a/app/Api/V1/Controllers/Models/Account/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Account/DestroyController.php @@ -56,6 +56,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/deleteAccount + * * Remove the specified resource from storage. * * @param Account $account diff --git a/app/Api/V1/Controllers/Models/Account/ListController.php b/app/Api/V1/Controllers/Models/Account/ListController.php index 40712fa649..4af6ff0e74 100644 --- a/app/Api/V1/Controllers/Models/Account/ListController.php +++ b/app/Api/V1/Controllers/Models/Account/ListController.php @@ -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\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -69,11 +70,14 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/listAttachmentByAccount + * * @param Account $account * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException * @codeCoverageIgnore + * @throws FireflyException */ public function attachments(Account $account): JsonResponse { @@ -99,12 +103,13 @@ class ListController extends Controller } /** - * List all piggies. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/listPiggyBankByAccount * * @param Account $account * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException * @codeCoverageIgnore */ public function piggyBanks(Account $account): JsonResponse @@ -136,6 +141,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/listTransactionByAccount + * * Show all transaction groups related to the account. * * @codeCoverageIgnore diff --git a/app/Api/V1/Controllers/Models/Account/ShowController.php b/app/Api/V1/Controllers/Models/Account/ShowController.php index da92bbb9fa..21558e14a1 100644 --- a/app/Api/V1/Controllers/Models/Account/ShowController.php +++ b/app/Api/V1/Controllers/Models/Account/ShowController.php @@ -65,6 +65,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/listAccount + * * Display a listing of the resource. * * @param Request $request @@ -108,6 +111,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/getAccount + * * Show single instance. * * @param Account $account diff --git a/app/Api/V1/Controllers/Models/Account/StoreController.php b/app/Api/V1/Controllers/Models/Account/StoreController.php index db5226a614..c18f94be4c 100644 --- a/app/Api/V1/Controllers/Models/Account/StoreController.php +++ b/app/Api/V1/Controllers/Models/Account/StoreController.php @@ -58,6 +58,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/storeAccount + * * Store a new instance. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Account/UpdateController.php b/app/Api/V1/Controllers/Models/Account/UpdateController.php index e200977673..65221bbeda 100644 --- a/app/Api/V1/Controllers/Models/Account/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Account/UpdateController.php @@ -61,6 +61,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/accounts/updateAccount + * * Update account. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Attachment/DestroyController.php b/app/Api/V1/Controllers/Models/Attachment/DestroyController.php index 9e52a073ec..3fad5d77bd 100644 --- a/app/Api/V1/Controllers/Models/Attachment/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Attachment/DestroyController.php @@ -59,6 +59,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/deleteAttachment + * * Remove the specified resource from storage. * * @codeCoverageIgnore diff --git a/app/Api/V1/Controllers/Models/Attachment/ShowController.php b/app/Api/V1/Controllers/Models/Attachment/ShowController.php index 85affcfddd..e724d80d52 100644 --- a/app/Api/V1/Controllers/Models/Attachment/ShowController.php +++ b/app/Api/V1/Controllers/Models/Attachment/ShowController.php @@ -66,6 +66,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/downloadAttachment + * * Download an attachment. * * @param Attachment $attachment @@ -108,6 +111,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/listAttachment + * * Display a listing of the resource. * * @return JsonResponse @@ -141,6 +147,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/getAttachment + * * Display the specified resource. * * @param Attachment $attachment diff --git a/app/Api/V1/Controllers/Models/Attachment/StoreController.php b/app/Api/V1/Controllers/Models/Attachment/StoreController.php index eba7ead400..2469b68938 100644 --- a/app/Api/V1/Controllers/Models/Attachment/StoreController.php +++ b/app/Api/V1/Controllers/Models/Attachment/StoreController.php @@ -66,6 +66,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/uploadAttachment + * * Store a newly created resource in storage. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Attachment/UpdateController.php b/app/Api/V1/Controllers/Models/Attachment/UpdateController.php index e560fbb084..f5d350b1e4 100644 --- a/app/Api/V1/Controllers/Models/Attachment/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Attachment/UpdateController.php @@ -62,6 +62,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/attachments/updateAttachment + * * Update the specified resource in storage. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php b/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php index 27ca1d5608..0297e839c7 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php @@ -57,6 +57,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/available_budgets/listAvailableBudget + * * Remove the specified resource from storage. * * @param AvailableBudget $availableBudget diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php b/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php index eeaa2ab5fd..212178597d 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Api\V1\Controllers\Models\AvailableBudget; use FireflyIII\Api\V1\Controllers\Controller; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\AvailableBudget; use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface; use FireflyIII\Transformers\AvailableBudgetTransformer; @@ -62,10 +63,13 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/available_budgets/getAvailableBudget + * * Display a listing of the resource. * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException * @codeCoverageIgnore */ public function index(): JsonResponse From 481a6bdd5f36374f6433bdeef622f3d18cef16c7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:08:10 +0200 Subject: [PATCH 05/30] Add meta data to models. --- app/Models/Account.php | 2 ++ app/Models/Attachment.php | 2 ++ app/Models/AvailableBudget.php | 2 ++ app/Models/Bill.php | 2 ++ app/Models/Budget.php | 2 ++ app/Models/Category.php | 2 ++ app/Models/GroupMembership.php | 22 ++++++++++++++++++++++ app/Models/Recurrence.php | 2 ++ app/Models/Rule.php | 2 ++ app/Models/RuleGroup.php | 2 ++ app/Models/Tag.php | 2 ++ app/Models/TransactionGroup.php | 2 ++ app/Models/TransactionJournal.php | 2 ++ app/Models/UserGroup.php | 17 +++++++++++++++++ app/Models/UserRole.php | 17 +++++++++++++++++ app/Models/Webhook.php | 2 ++ app/User.php | 5 +++++ 17 files changed, 87 insertions(+) diff --git a/app/Models/Account.php b/app/Models/Account.php index 5e9d93d8cc..ececd3cca9 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -99,6 +99,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property string $location * @property string $liability_direction * @property string $current_debt + * @property int|null $user_group_id + * @method static EloquentBuilder|Account whereUserGroupId($value) */ class Account extends Model { diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php index 6b2284ca20..ab1a324ea6 100644 --- a/app/Models/Attachment.php +++ b/app/Models/Attachment.php @@ -78,6 +78,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Attachment withTrashed() * @method static Builder|Attachment withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserGroupId($value) */ class Attachment extends Model { diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php index 20a4241fb1..05e89eb4cd 100644 --- a/app/Models/AvailableBudget.php +++ b/app/Models/AvailableBudget.php @@ -61,6 +61,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|AvailableBudget withTrashed() * @method static Builder|AvailableBudget withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserGroupId($value) */ class AvailableBudget extends Model { diff --git a/app/Models/Bill.php b/app/Models/Bill.php index 34fd41804d..6581eb2312 100644 --- a/app/Models/Bill.php +++ b/app/Models/Bill.php @@ -94,6 +94,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Bill withTrashed() * @method static Builder|Bill withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserGroupId($value) */ class Bill extends Model { diff --git a/app/Models/Budget.php b/app/Models/Budget.php index 184b37d57c..6d07df3d48 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -75,6 +75,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Budget withoutTrashed() * @mixin Eloquent * @property string $email + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value) */ class Budget extends Model { diff --git a/app/Models/Category.php b/app/Models/Category.php index c23eb0cd5e..2623e25009 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -69,6 +69,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Category withTrashed() * @method static Builder|Category withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Category whereUserGroupId($value) */ class Category extends Model { diff --git a/app/Models/GroupMembership.php b/app/Models/GroupMembership.php index 6dcf50c4b7..4f328ba998 100644 --- a/app/Models/GroupMembership.php +++ b/app/Models/GroupMembership.php @@ -30,6 +30,28 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; /** * Class GroupMembership + * + * @property int $id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property string|null $deleted_at + * @property int $user_id + * @property int $user_group_id + * @property int $user_role_id + * @property-read User $user + * @property-read \FireflyIII\Models\UserGroup $userGroup + * @property-read \FireflyIII\Models\UserRole $userRole + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership query() + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserGroupId($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserRoleId($value) + * @mixin \Eloquent */ class GroupMembership extends Model { diff --git a/app/Models/Recurrence.php b/app/Models/Recurrence.php index ff2e99a395..2dca75f241 100644 --- a/app/Models/Recurrence.php +++ b/app/Models/Recurrence.php @@ -86,6 +86,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Recurrence withTrashed() * @method static Builder|Recurrence withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserGroupId($value) */ class Recurrence extends Model { diff --git a/app/Models/Rule.php b/app/Models/Rule.php index 4d37bd6f9f..f8bbd75b2a 100644 --- a/app/Models/Rule.php +++ b/app/Models/Rule.php @@ -74,6 +74,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Rule withTrashed() * @method static Builder|Rule withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserGroupId($value) */ class Rule extends Model { diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php index 04aa7b4108..8481c2de12 100644 --- a/app/Models/RuleGroup.php +++ b/app/Models/RuleGroup.php @@ -66,6 +66,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|RuleGroup withTrashed() * @method static Builder|RuleGroup withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserGroupId($value) */ class RuleGroup extends Model { diff --git a/app/Models/Tag.php b/app/Models/Tag.php index 7546cfd5ab..6297365cea 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -75,6 +75,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Tag withTrashed() * @method static Builder|Tag withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|Tag whereUserGroupId($value) */ class Tag extends Model { diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.php index 53cdb3a815..d29a0ef693 100644 --- a/app/Models/TransactionGroup.php +++ b/app/Models/TransactionGroup.php @@ -58,6 +58,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|TransactionGroup withTrashed() * @method static Builder|TransactionGroup withoutTrashed() * @mixin Eloquent + * @property int|null $user_group_id + * @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserGroupId($value) */ class TransactionGroup extends Model { diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index ed1635f8d9..70963b2ad4 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -116,6 +116,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property-read Collection|Location[] $locations * @property-read int|null $locations_count * @property int $the_count + * @property int|null $user_group_id + * @method static EloquentBuilder|TransactionJournal whereUserGroupId($value) */ class TransactionJournal extends Model { diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.php index ba20e0deca..f47d81c061 100644 --- a/app/Models/UserGroup.php +++ b/app/Models/UserGroup.php @@ -29,6 +29,23 @@ use Illuminate\Database\Eloquent\Relations\HasMany; /** * Class UserGroup + * + * @property int $id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property string|null $deleted_at + * @property string $title + * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup query() + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereUpdatedAt($value) + * @mixin \Eloquent */ class UserGroup extends Model { diff --git a/app/Models/UserRole.php b/app/Models/UserRole.php index 4600abaea0..d4be7c292f 100644 --- a/app/Models/UserRole.php +++ b/app/Models/UserRole.php @@ -29,6 +29,23 @@ use Illuminate\Database\Eloquent\Relations\HasMany; /** * Class UserRole + * + * @property int $id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property string|null $deleted_at + * @property string $title + * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count + * @method static \Illuminate\Database\Eloquent\Builder|UserRole newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserRole newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserRole query() + * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereUpdatedAt($value) + * @mixin \Eloquent */ class UserRole extends Model { diff --git a/app/Models/Webhook.php b/app/Models/Webhook.php index 05d6781e43..e4963677e9 100644 --- a/app/Models/Webhook.php +++ b/app/Models/Webhook.php @@ -71,6 +71,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property string $secret * @method static Builder|Webhook whereSecret($value) * @method static Builder|Webhook whereTitle($value) + * @property int|null $user_group_id + * @method static Builder|Webhook whereUserGroupId($value) */ class Webhook extends Model { diff --git a/app/User.php b/app/User.php index 6fc8901162..875f950a6b 100644 --- a/app/User.php +++ b/app/User.php @@ -151,6 +151,11 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|User whereGuid($value) * @method static Builder|User whereTwoFactorRecoveryCodes($value) * @method static Builder|User whereTwoFactorSecret($value) + * @property int|null $user_group_id + * @property-read \Illuminate\Database\Eloquent\Collection|GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count + * @property-read UserGroup|null $userGroup + * @method static Builder|User whereUserGroupId($value) */ class User extends Authenticatable { From 3589c9f60f6bac13e8ec21dc91f351dac6e65c9c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:20:19 +0200 Subject: [PATCH 06/30] Various code cleanup. --- .../Data/Export/ExportController.php | 2 - .../Models/Account/ListController.php | 2 +- .../Models/Account/ShowController.php | 3 +- .../Models/Bill/DestroyController.php | 1 - .../Models/Bill/ListController.php | 7 ++-- .../Models/Bill/ShowController.php | 4 +- .../Models/Bill/StoreController.php | 1 - .../Models/Bill/UpdateController.php | 1 - .../Models/Budget/ListController.php | 7 ++-- .../Models/Budget/ShowController.php | 3 +- .../Models/BudgetLimit/ListController.php | 3 +- .../Models/BudgetLimit/StoreController.php | 1 - .../Models/Category/DestroyController.php | 1 - .../Models/Category/ListController.php | 5 ++- .../Models/Category/ShowController.php | 4 +- .../Models/Category/StoreController.php | 1 - .../Models/Category/UpdateController.php | 1 - .../Models/ObjectGroup/ListController.php | 5 ++- .../Models/ObjectGroup/ShowController.php | 3 +- .../Models/PiggyBank/ListController.php | 5 ++- .../Models/PiggyBank/ShowController.php | 3 +- .../Models/Recurrence/DestroyController.php | 1 - .../Models/Recurrence/ListController.php | 3 +- .../Models/Recurrence/ShowController.php | 4 +- .../Models/Recurrence/StoreController.php | 1 - .../Models/Recurrence/UpdateController.php | 1 - .../Models/Rule/ShowController.php | 3 +- .../Models/RuleGroup/ListController.php | 3 +- .../Models/RuleGroup/ShowController.php | 3 +- .../Models/RuleGroup/TriggerController.php | 1 - .../Controllers/Models/Tag/ListController.php | 5 ++- .../Controllers/Models/Tag/ShowController.php | 3 +- .../Models/Transaction/ListController.php | 7 ++-- .../Models/Transaction/ShowController.php | 3 +- .../TransactionCurrency/ListController.php | 15 ++++---- .../TransactionCurrency/ShowController.php | 4 +- .../TransactionCurrency/StoreController.php | 1 - .../TransactionCurrency/UpdateController.php | 4 +- .../Models/TransactionLink/ShowController.php | 3 +- .../TransactionLinkType/ListController.php | 3 +- .../TransactionLinkType/ShowController.php | 3 +- .../Search/TransactionController.php | 3 +- .../System/ConfigurationController.php | 9 +++-- .../User/PreferencesController.php | 1 + .../Controllers/Webhook/AttemptController.php | 1 - .../Controllers/Webhook/DestroyController.php | 1 - .../Controllers/Webhook/MessageController.php | 1 - .../V1/Controllers/Webhook/ShowController.php | 4 +- .../Controllers/Webhook/StoreController.php | 1 - .../Controllers/Webhook/UpdateController.php | 1 - .../V1/Requests/Insight/GenericRequest.php | 4 +- .../Models/Recurrence/StoreRequest.php | 1 - .../Models/Transaction/UpdateRequest.php | 1 + .../CorrectOpeningBalanceCurrencies.php | 2 +- .../Commands/Correction/DeleteZeroAmount.php | 1 - app/Console/Commands/Export/ExportData.php | 3 -- .../Commands/Upgrade/AccountCurrencies.php | 6 ++- .../Upgrade/AppendBudgetLimitPeriods.php | 4 +- .../Commands/Upgrade/BackToJournals.php | 6 ++- .../Commands/Upgrade/BudgetLimitCurrency.php | 6 ++- .../Commands/Upgrade/CCLiabilities.php | 6 ++- .../Upgrade/CreateGroupMemberships.php | 1 + .../Commands/Upgrade/MigrateAttachments.php | 4 +- .../Commands/Upgrade/MigrateJournalNotes.php | 4 +- .../Upgrade/MigrateRecurrenceMeta.php | 10 +++-- .../Upgrade/MigrateRecurrenceType.php | 4 +- .../Commands/Upgrade/MigrateTagLocations.php | 4 +- .../Commands/Upgrade/MigrateToGroups.php | 3 +- .../Upgrade/OtherCurrenciesCorrections.php | 4 +- .../Commands/Upgrade/RenameAccountMeta.php | 4 +- .../Upgrade/TransactionIdentifier.php | 4 +- .../Upgrade/TransferCurrenciesCorrections.php | 7 ++-- .../Commands/Upgrade/UpgradeLiabilities.php | 4 +- .../Commands/UpgradeFireflyInstructions.php | 2 - app/Console/Commands/VerifySecurityAlerts.php | 1 + app/Events/RequestedReportOnJournals.php | 1 - app/Events/StoredTransactionGroup.php | 1 + app/Events/UpdatedTransactionGroup.php | 1 + app/Exceptions/GracefulNotFoundHandler.php | 5 ++- app/Factory/AccountFactory.php | 8 +++- app/Factory/RecurrenceFactory.php | 6 +-- app/Factory/TransactionJournalFactory.php | 7 ++-- app/Handlers/Events/APIEventHandler.php | 3 +- app/Handlers/Events/AdminEventHandler.php | 3 +- app/Handlers/Events/AutomationHandler.php | 3 +- .../Events/VersionCheckEventHandler.php | 5 ++- app/Helpers/Help/Help.php | 3 +- app/Helpers/Update/UpdateTrait.php | 3 +- .../Controllers/Account/EditController.php | 1 + .../Admin/ConfigurationController.php | 3 +- app/Http/Controllers/AttachmentController.php | 3 +- app/Http/Controllers/Auth/LoginController.php | 12 +++--- .../Controllers/Auth/RegisterController.php | 3 +- .../Controllers/Auth/TwoFactorController.php | 4 +- .../Controllers/Budget/CreateController.php | 3 +- .../Controllers/Category/CreateController.php | 3 +- .../Controllers/Export/IndexController.php | 6 ++- .../ObjectGroup/DeleteController.php | 4 +- .../ObjectGroup/EditController.php | 10 ++++- .../ObjectGroup/IndexController.php | 3 +- .../PiggyBank/CreateController.php | 3 +- .../Controllers/PiggyBank/EditController.php | 8 +--- app/Http/Controllers/ProfileController.php | 12 ++++-- .../Controllers/Report/BillController.php | 3 +- app/Http/Controllers/ReportController.php | 3 +- .../Controllers/System/CronController.php | 5 ++- app/Http/Controllers/TagController.php | 3 +- .../Transaction/BulkController.php | 5 ++- .../Transaction/DeleteController.php | 4 +- .../Transaction/MassController.php | 9 +++-- app/Jobs/CreateRecurringTransactions.php | 6 ++- app/Models/GroupMembership.php | 29 ++++++++------- app/Models/UserGroup.php | 28 ++++++++------ app/Models/UserRole.php | 28 ++++++++------ .../Account/AccountRepository.php | 8 +--- .../Journal/JournalRepository.php | 4 +- .../LinkType/LinkTypeRepository.php | 2 +- .../PiggyBank/ModifiesPiggyBanks.php | 4 +- .../Recurring/RecurringRepository.php | 3 +- app/Repositories/User/UserRepository.php | 3 +- app/Rules/BelongsUser.php | 37 +++++++------------ .../Support/RecurringTransactionTrait.php | 2 +- .../Internal/Update/AccountUpdateService.php | 5 ++- .../Internal/Update/GroupUpdateService.php | 3 +- .../Internal/Update/JournalUpdateService.php | 2 +- .../Authentication/RemoteUserGuard.php | 2 +- app/Support/Binder/CLIToken.php | 3 +- app/Support/Export/ExportDataGenerator.php | 20 +++++----- app/Support/ParseDateString.php | 8 ++-- app/Support/Search/AccountSearch.php | 3 +- app/Support/Search/OperatorQuerySearch.php | 13 +++---- app/Support/Steam.php | 6 ++- app/Transformers/PiggyBankTransformer.php | 4 +- app/Transformers/RecurrenceTransformer.php | 4 +- app/Transformers/TagTransformer.php | 2 +- .../TransactionGroupTransformer.php | 2 +- app/Validation/FireflyValidator.php | 9 +++-- 137 files changed, 369 insertions(+), 282 deletions(-) diff --git a/app/Api/V1/Controllers/Data/Export/ExportController.php b/app/Api/V1/Controllers/Data/Export/ExportController.php index 4eb6343b41..781f118768 100644 --- a/app/Api/V1/Controllers/Data/Export/ExportController.php +++ b/app/Api/V1/Controllers/Data/Export/ExportController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Account/ListController.php b/app/Api/V1/Controllers/Models/Account/ListController.php index 4af6ff0e74..9731129957 100644 --- a/app/Api/V1/Controllers/Models/Account/ListController.php +++ b/app/Api/V1/Controllers/Models/Account/ListController.php @@ -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 { diff --git a/app/Api/V1/Controllers/Models/Account/ShowController.php b/app/Api/V1/Controllers/Models/Account/ShowController.php index 21558e14a1..71d3c53803 100644 --- a/app/Api/V1/Controllers/Models/Account/ShowController.php +++ b/app/Api/V1/Controllers/Models/Account/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Bill/DestroyController.php b/app/Api/V1/Controllers/Models/Bill/DestroyController.php index 7e5c0ac4d8..271c593d1f 100644 --- a/app/Api/V1/Controllers/Models/Bill/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Bill/DestroyController.php @@ -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; /** diff --git a/app/Api/V1/Controllers/Models/Bill/ListController.php b/app/Api/V1/Controllers/Models/Bill/ListController.php index d5c7973532..e9f5996fae 100644 --- a/app/Api/V1/Controllers/Models/Bill/ListController.php +++ b/app/Api/V1/Controllers/Models/Bill/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Bill/ShowController.php b/app/Api/V1/Controllers/Models/Bill/ShowController.php index ed085f4e66..58b0de32b4 100644 --- a/app/Api/V1/Controllers/Models/Bill/ShowController.php +++ b/app/Api/V1/Controllers/Models/Bill/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Bill/StoreController.php b/app/Api/V1/Controllers/Models/Bill/StoreController.php index 5ef3bc4bb5..4383e8279c 100644 --- a/app/Api/V1/Controllers/Models/Bill/StoreController.php +++ b/app/Api/V1/Controllers/Models/Bill/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Bill/UpdateController.php b/app/Api/V1/Controllers/Models/Bill/UpdateController.php index 2240463648..f61e6e3b28 100644 --- a/app/Api/V1/Controllers/Models/Bill/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Bill/UpdateController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Budget/ListController.php b/app/Api/V1/Controllers/Models/Budget/ListController.php index 2b34ffa094..3130c016f6 100644 --- a/app/Api/V1/Controllers/Models/Budget/ListController.php +++ b/app/Api/V1/Controllers/Models/Budget/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Budget/ShowController.php b/app/Api/V1/Controllers/Models/Budget/ShowController.php index 414abb658e..e6a9020fb6 100644 --- a/app/Api/V1/Controllers/Models/Budget/ShowController.php +++ b/app/Api/V1/Controllers/Models/Budget/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php b/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php index 4f49b8beaa..4ac3877315 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php b/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php index 801c8a1684..697c950aeb 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Category/DestroyController.php b/app/Api/V1/Controllers/Models/Category/DestroyController.php index 4e609fdb5e..2890584cbb 100644 --- a/app/Api/V1/Controllers/Models/Category/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Category/DestroyController.php @@ -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; /** diff --git a/app/Api/V1/Controllers/Models/Category/ListController.php b/app/Api/V1/Controllers/Models/Category/ListController.php index 980859926a..d4be312707 100644 --- a/app/Api/V1/Controllers/Models/Category/ListController.php +++ b/app/Api/V1/Controllers/Models/Category/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Category/ShowController.php b/app/Api/V1/Controllers/Models/Category/ShowController.php index b4731864d6..3b4d6418b2 100644 --- a/app/Api/V1/Controllers/Models/Category/ShowController.php +++ b/app/Api/V1/Controllers/Models/Category/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Category/StoreController.php b/app/Api/V1/Controllers/Models/Category/StoreController.php index c799d9eee7..161987545d 100644 --- a/app/Api/V1/Controllers/Models/Category/StoreController.php +++ b/app/Api/V1/Controllers/Models/Category/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Category/UpdateController.php b/app/Api/V1/Controllers/Models/Category/UpdateController.php index bcab8b0778..ddfdf9f653 100644 --- a/app/Api/V1/Controllers/Models/Category/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Category/UpdateController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php index e9f1c27c87..b3c3f8e603 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php b/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php index 4ca72304a3..15e97c5798 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/PiggyBank/ListController.php b/app/Api/V1/Controllers/Models/PiggyBank/ListController.php index d5bf62d9eb..a4d771e8de 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/ListController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php b/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php index bdd6ef2637..24b9e5b1ab 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php b/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php index 6c44dd1e60..59ebdf7b0c 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php @@ -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; /** diff --git a/app/Api/V1/Controllers/Models/Recurrence/ListController.php b/app/Api/V1/Controllers/Models/Recurrence/ListController.php index 0205632fc9..6e96436048 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/ListController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Recurrence/ShowController.php b/app/Api/V1/Controllers/Models/Recurrence/ShowController.php index 33375d56c5..71a66bca59 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/ShowController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php index 2c53478ec3..7573abedd2 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php index 2f15eb071f..b67a34b634 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Rule/ShowController.php b/app/Api/V1/Controllers/Models/Rule/ShowController.php index a47ee76d23..38e6e60cbc 100644 --- a/app/Api/V1/Controllers/Models/Rule/ShowController.php +++ b/app/Api/V1/Controllers/Models/Rule/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/RuleGroup/ListController.php b/app/Api/V1/Controllers/Models/RuleGroup/ListController.php index 52fea146e0..73b8780155 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/ListController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php b/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php index a8e75734a1..3f053495a9 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php index 88bba7205c..8b332a0e79 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/Tag/ListController.php b/app/Api/V1/Controllers/Models/Tag/ListController.php index 2dde4bfee8..3bde6c175b 100644 --- a/app/Api/V1/Controllers/Models/Tag/ListController.php +++ b/app/Api/V1/Controllers/Models/Tag/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Tag/ShowController.php b/app/Api/V1/Controllers/Models/Tag/ShowController.php index 0e42eab15d..162936208f 100644 --- a/app/Api/V1/Controllers/Models/Tag/ShowController.php +++ b/app/Api/V1/Controllers/Models/Tag/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Transaction/ListController.php b/app/Api/V1/Controllers/Models/Transaction/ListController.php index 3ecd73aba4..2903499ebe 100644 --- a/app/Api/V1/Controllers/Models/Transaction/ListController.php +++ b/app/Api/V1/Controllers/Models/Transaction/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/Transaction/ShowController.php b/app/Api/V1/Controllers/Models/Transaction/ShowController.php index 9007e8fb30..d14e6245f7 100644 --- a/app/Api/V1/Controllers/Models/Transaction/ShowController.php +++ b/app/Api/V1/Controllers/Models/Transaction/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php index c175c11044..c782690af0 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php index 2f89446932..bdf8630082 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php index 16ef964dfc..bbab73e2e1 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php index 219620621f..0a7f12f85e 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php @@ -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 { diff --git a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php index 781e34ab2c..7eb31482f6 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php index bf5579d716..0964dbd90d 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php @@ -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 diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php index 23ecd14e8e..081eff43f6 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Search/TransactionController.php b/app/Api/V1/Controllers/Search/TransactionController.php index 210e8f311c..1916b8ba31 100644 --- a/app/Api/V1/Controllers/Search/TransactionController.php +++ b/app/Api/V1/Controllers/Search/TransactionController.php @@ -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 { diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php index 0ffbb1fc04..c15d499943 100644 --- a/app/Api/V1/Controllers/System/ConfigurationController.php +++ b/app/Api/V1/Controllers/System/ConfigurationController.php @@ -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 { diff --git a/app/Api/V1/Controllers/User/PreferencesController.php b/app/Api/V1/Controllers/User/PreferencesController.php index 5c7b1df7c7..f9cced2fe4 100644 --- a/app/Api/V1/Controllers/User/PreferencesController.php +++ b/app/Api/V1/Controllers/User/PreferencesController.php @@ -98,6 +98,7 @@ class PreferencesController extends Controller * @param PreferenceStoreRequest $request * * @return JsonResponse + * @throws FireflyException */ public function store(PreferenceStoreRequest $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Webhook/AttemptController.php b/app/Api/V1/Controllers/Webhook/AttemptController.php index 24797c6b38..775821dbbd 100644 --- a/app/Api/V1/Controllers/Webhook/AttemptController.php +++ b/app/Api/V1/Controllers/Webhook/AttemptController.php @@ -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; diff --git a/app/Api/V1/Controllers/Webhook/DestroyController.php b/app/Api/V1/Controllers/Webhook/DestroyController.php index f989821351..8832c342ea 100644 --- a/app/Api/V1/Controllers/Webhook/DestroyController.php +++ b/app/Api/V1/Controllers/Webhook/DestroyController.php @@ -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; /** diff --git a/app/Api/V1/Controllers/Webhook/MessageController.php b/app/Api/V1/Controllers/Webhook/MessageController.php index 68d1df03f8..e98d9a05a5 100644 --- a/app/Api/V1/Controllers/Webhook/MessageController.php +++ b/app/Api/V1/Controllers/Webhook/MessageController.php @@ -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; diff --git a/app/Api/V1/Controllers/Webhook/ShowController.php b/app/Api/V1/Controllers/Webhook/ShowController.php index bb52400725..9707cc326b 100644 --- a/app/Api/V1/Controllers/Webhook/ShowController.php +++ b/app/Api/V1/Controllers/Webhook/ShowController.php @@ -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 diff --git a/app/Api/V1/Controllers/Webhook/StoreController.php b/app/Api/V1/Controllers/Webhook/StoreController.php index f61620e769..9db3f162c7 100644 --- a/app/Api/V1/Controllers/Webhook/StoreController.php +++ b/app/Api/V1/Controllers/Webhook/StoreController.php @@ -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; diff --git a/app/Api/V1/Controllers/Webhook/UpdateController.php b/app/Api/V1/Controllers/Webhook/UpdateController.php index d69dccf7b7..bb245102e7 100644 --- a/app/Api/V1/Controllers/Webhook/UpdateController.php +++ b/app/Api/V1/Controllers/Webhook/UpdateController.php @@ -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; diff --git a/app/Api/V1/Requests/Insight/GenericRequest.php b/app/Api/V1/Requests/Insight/GenericRequest.php index 26f8135e53..8583d837b3 100644 --- a/app/Api/V1/Requests/Insight/GenericRequest.php +++ b/app/Api/V1/Requests/Insight/GenericRequest.php @@ -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); } } diff --git a/app/Api/V1/Requests/Models/Recurrence/StoreRequest.php b/app/Api/V1/Requests/Models/Recurrence/StoreRequest.php index 6432808af9..1d0c7f3aa1 100644 --- a/app/Api/V1/Requests/Models/Recurrence/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Recurrence/StoreRequest.php @@ -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; diff --git a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php index 23e775bf87..25e274634b 100644 --- a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php @@ -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 */ diff --git a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php index 7d8a31ddfd..b34bf0f296 100644 --- a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php +++ b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php @@ -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 { diff --git a/app/Console/Commands/Correction/DeleteZeroAmount.php b/app/Console/Commands/Correction/DeleteZeroAmount.php index 60a26160bf..28ff944370 100644 --- a/app/Console/Commands/Correction/DeleteZeroAmount.php +++ b/app/Console/Commands/Correction/DeleteZeroAmount.php @@ -27,7 +27,6 @@ use Exception; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; -use Illuminate\Support\Collection; /** * Class DeleteZeroAmount diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php index 547b225125..9d5f2b9d74 100644 --- a/app/Console/Commands/Export/ExportData.php +++ b/app/Console/Commands/Export/ExportData.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php index 81151a2b0b..4cad1423e6 100644 --- a/app/Console/Commands/Upgrade/AccountCurrencies.php +++ b/app/Console/Commands/Upgrade/AccountCurrencies.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php index 5ea5705b65..e4e15ac63a 100644 --- a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php +++ b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php index 45fca43d34..ab66fda7b7 100644 --- a/app/Console/Commands/Upgrade/BackToJournals.php +++ b/app/Console/Commands/Upgrade/BackToJournals.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php index 6620861e1b..d849f5c02c 100644 --- a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php +++ b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/CCLiabilities.php b/app/Console/Commands/Upgrade/CCLiabilities.php index 6637c2292c..4b3fb4028e 100644 --- a/app/Console/Commands/Upgrade/CCLiabilities.php +++ b/app/Console/Commands/Upgrade/CCLiabilities.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/CreateGroupMemberships.php b/app/Console/Commands/Upgrade/CreateGroupMemberships.php index 491a640faf..43cbc71429 100644 --- a/app/Console/Commands/Upgrade/CreateGroupMemberships.php +++ b/app/Console/Commands/Upgrade/CreateGroupMemberships.php @@ -76,6 +76,7 @@ class CreateGroupMemberships extends Command /** * @return bool + * @throws FireflyException */ private function isExecuted(): bool { diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php index 2e4edc48e4..2776779fc8 100644 --- a/app/Console/Commands/Upgrade/MigrateAttachments.php +++ b/app/Console/Commands/Upgrade/MigrateAttachments.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php index 54d27a70c0..93534d2a92 100644 --- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php +++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php index 2fc939b958..2980cc2a17 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php index 3e956f417b..3f30915260 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php index 67633f3b49..765f0f874b 100644 --- a/app/Console/Commands/Upgrade/MigrateTagLocations.php +++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index 4e04318156..8f537ecdf8 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php index 07118054ce..30fc3efe17 100644 --- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/RenameAccountMeta.php b/app/Console/Commands/Upgrade/RenameAccountMeta.php index 9e7f6cd172..c1a6aee640 100644 --- a/app/Console/Commands/Upgrade/RenameAccountMeta.php +++ b/app/Console/Commands/Upgrade/RenameAccountMeta.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php index f3fbb06409..90634bf560 100644 --- a/app/Console/Commands/Upgrade/TransactionIdentifier.php +++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php @@ -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 { diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 777b671b1b..37f94051a4 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -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); } diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php index 87b72a934a..da7eeb5cea 100644 --- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php +++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php @@ -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 { diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php index 98cb37688d..2257339e50 100644 --- a/app/Console/Commands/UpgradeFireflyInstructions.php +++ b/app/Console/Commands/UpgradeFireflyInstructions.php @@ -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. diff --git a/app/Console/Commands/VerifySecurityAlerts.php b/app/Console/Commands/VerifySecurityAlerts.php index 4d4bdd33bf..e49872b909 100644 --- a/app/Console/Commands/VerifySecurityAlerts.php +++ b/app/Console/Commands/VerifySecurityAlerts.php @@ -51,6 +51,7 @@ class VerifySecurityAlerts extends Command * Execute the console command. * * @return int + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function handle(): int { diff --git a/app/Events/RequestedReportOnJournals.php b/app/Events/RequestedReportOnJournals.php index 3152c9b969..8790d696aa 100644 --- a/app/Events/RequestedReportOnJournals.php +++ b/app/Events/RequestedReportOnJournals.php @@ -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; diff --git a/app/Events/StoredTransactionGroup.php b/app/Events/StoredTransactionGroup.php index 3c497e37bd..880c6b8de7 100644 --- a/app/Events/StoredTransactionGroup.php +++ b/app/Events/StoredTransactionGroup.php @@ -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) { diff --git a/app/Events/UpdatedTransactionGroup.php b/app/Events/UpdatedTransactionGroup.php index 0f5e00f6fa..89ba4e1378 100644 --- a/app/Events/UpdatedTransactionGroup.php +++ b/app/Events/UpdatedTransactionGroup.php @@ -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) { diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php index a5d5a0b71b..ae3f64868c 100644 --- a/app/Exceptions/GracefulNotFoundHandler.php +++ b/app/Exceptions/GracefulNotFoundHandler.php @@ -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) diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php index f506f96233..990631364a 100644 --- a/app/Factory/AccountFactory.php +++ b/app/Factory/AccountFactory.php @@ -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 { diff --git a/app/Factory/RecurrenceFactory.php b/app/Factory/RecurrenceFactory.php index 5622cfafcc..3de96669e5 100644 --- a/app/Factory/RecurrenceFactory.php +++ b/app/Factory/RecurrenceFactory.php @@ -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, diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php index 8937adec07..3c893a9839 100644 --- a/app/Factory/TransactionJournalFactory.php +++ b/app/Factory/TransactionJournalFactory.php @@ -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 { diff --git a/app/Handlers/Events/APIEventHandler.php b/app/Handlers/Events/APIEventHandler.php index c775b37b0c..e871fd26cb 100644 --- a/app/Handlers/Events/APIEventHandler.php +++ b/app/Handlers/Events/APIEventHandler.php @@ -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 { diff --git a/app/Handlers/Events/AdminEventHandler.php b/app/Handlers/Events/AdminEventHandler.php index 22d8036175..5ed7953a67 100644 --- a/app/Handlers/Events/AdminEventHandler.php +++ b/app/Handlers/Events/AdminEventHandler.php @@ -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 { diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php index 5c6361c096..463b5681a1 100644 --- a/app/Handlers/Events/AutomationHandler.php +++ b/app/Handlers/Events/AutomationHandler.php @@ -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 { diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 5cd4b62e40..2fd9f6558f 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -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 { diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 163995d6a5..30f21d68a1 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -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 { diff --git a/app/Helpers/Update/UpdateTrait.php b/app/Helpers/Update/UpdateTrait.php index 8f72da4775..fc144807eb 100644 --- a/app/Helpers/Update/UpdateTrait.php +++ b/app/Helpers/Update/UpdateTrait.php @@ -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 { diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 16e02e6403..78acef21d2 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -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); diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index bcd31ac1ee..f4dac83d88 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -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() { diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 27a146bf5e..5def400852 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -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 { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 27a8cb866d..5ef0774785 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -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) { diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 22e49777ee..c41172d317 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -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) { diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index 7b7f104223..f574a0978e 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -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() { diff --git a/app/Http/Controllers/Budget/CreateController.php b/app/Http/Controllers/Budget/CreateController.php index 03c6fd26e6..557f5ce739 100644 --- a/app/Http/Controllers/Budget/CreateController.php +++ b/app/Http/Controllers/Budget/CreateController.php @@ -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 { diff --git a/app/Http/Controllers/Category/CreateController.php b/app/Http/Controllers/Category/CreateController.php index 8ef6825105..678509283c 100644 --- a/app/Http/Controllers/Category/CreateController.php +++ b/app/Http/Controllers/Category/CreateController.php @@ -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) { diff --git a/app/Http/Controllers/Export/IndexController.php b/app/Http/Controllers/Export/IndexController.php index cb7e570c4b..8e8b201e0e 100644 --- a/app/Http/Controllers/Export/IndexController.php +++ b/app/Http/Controllers/Export/IndexController.php @@ -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 { diff --git a/app/Http/Controllers/ObjectGroup/DeleteController.php b/app/Http/Controllers/ObjectGroup/DeleteController.php index e5efc8b58c..16af643222 100644 --- a/app/Http/Controllers/ObjectGroup/DeleteController.php +++ b/app/Http/Controllers/ObjectGroup/DeleteController.php @@ -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) { diff --git a/app/Http/Controllers/ObjectGroup/EditController.php b/app/Http/Controllers/ObjectGroup/EditController.php index 397dfc0437..d4e866ee52 100644 --- a/app/Http/Controllers/ObjectGroup/EditController.php +++ b/app/Http/Controllers/ObjectGroup/EditController.php @@ -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) { diff --git a/app/Http/Controllers/ObjectGroup/IndexController.php b/app/Http/Controllers/ObjectGroup/IndexController.php index dafa324fb9..0d159d4754 100644 --- a/app/Http/Controllers/ObjectGroup/IndexController.php +++ b/app/Http/Controllers/ObjectGroup/IndexController.php @@ -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) { diff --git a/app/Http/Controllers/PiggyBank/CreateController.php b/app/Http/Controllers/PiggyBank/CreateController.php index 7d888b0f75..6ac60fc4da 100644 --- a/app/Http/Controllers/PiggyBank/CreateController.php +++ b/app/Http/Controllers/PiggyBank/CreateController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\PiggyBank; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\PiggyBankStoreRequest; @@ -88,7 +89,7 @@ class CreateController extends Controller * @param PiggyBankStoreRequest $request * * @return RedirectResponse|Redirector - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function store(PiggyBankStoreRequest $request) { diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index 783a6b1b78..e160a74f7f 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -79,12 +79,8 @@ class EditController extends Controller $startDate = null; $note = $piggyBank->notes()->first(); // Flash some data to fill the form. - if (null !== $piggyBank->targetdate) { - $targetDate = $piggyBank->targetdate->format('Y-m-d'); - } - if (null !== $piggyBank->startdate) { - $startDate = $piggyBank->startdate->format('Y-m-d'); - } + $targetDate = $piggyBank->targetdate?->format('Y-m-d'); + $startDate = $piggyBank->startdate?->format('Y-m-d'); $preFilled = ['name' => $piggyBank->name, 'account_id' => $piggyBank->account_id, diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 49df2a6b08..890708eb06 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -38,6 +38,7 @@ use FireflyIII\Support\Http\Controllers\CreateStuff; use FireflyIII\User; use Google2FA; use Hash; +use Illuminate\Auth\AuthenticationException; use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -48,6 +49,9 @@ use Illuminate\Support\Collection; use Illuminate\View\View; use Laravel\Passport\ClientRepository; use Log; +use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; +use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; +use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException; use PragmaRX\Recovery\Recovery; /** @@ -107,7 +111,7 @@ class ProfileController extends Controller * @param Request $request * * @return Application|RedirectResponse|Redirector - * @throws \Illuminate\Auth\AuthenticationException + * @throws AuthenticationException */ public function postLogoutOtherSessions(Request $request) { @@ -183,9 +187,9 @@ class ProfileController extends Controller * @param Request $request * * @return Factory|View - * @throws \PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException - * @throws \PragmaRX\Google2FA\Exceptions\InvalidCharactersException - * @throws \PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException + * @throws IncompatibleWithGoogleAuthenticatorException + * @throws InvalidCharactersException + * @throws SecretKeyTooShortException */ public function code(Request $request) { diff --git a/app/Http/Controllers/Report/BillController.php b/app/Http/Controllers/Report/BillController.php index 6663b071ae..961dadd074 100644 --- a/app/Http/Controllers/Report/BillController.php +++ b/app/Http/Controllers/Report/BillController.php @@ -28,6 +28,7 @@ use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; use Log; use Throwable; @@ -42,7 +43,7 @@ class BillController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function overview(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 174ab8ac34..ad67bb0ede 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\Http\Controllers\RenderPartialViews; use Illuminate\Contracts\View\Factory; +use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; @@ -299,7 +300,7 @@ class ReportController extends Controller * * @param string $reportType * - * @return \Illuminate\Http\JsonResponse + * @return JsonResponse * */ public function options(string $reportType) diff --git a/app/Http/Controllers/System/CronController.php b/app/Http/Controllers/System/CronController.php index e75f33f836..fe711c5844 100644 --- a/app/Http/Controllers/System/CronController.php +++ b/app/Http/Controllers/System/CronController.php @@ -23,6 +23,9 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\System; +use Illuminate\Contracts\Foundation\Application; +use Illuminate\Contracts\Routing\ResponseFactory; +use Illuminate\Http\Response; use Log; /** @@ -31,7 +34,7 @@ use Log; class CronController { /** - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response + * @return Application|ResponseFactory|Response */ public function cron() { diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 61c21aba75..50d03d9407 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Requests\TagFormRequest; @@ -228,7 +229,7 @@ class TagController extends Controller * @param Carbon|null $end * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function show(Request $request, Tag $tag, Carbon $start = null, Carbon $end = null) { diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 550f9f2d6d..8eee5404e5 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -28,7 +28,10 @@ use FireflyIII\Http\Requests\BulkEditJournalRequest; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; +use Illuminate\Http\RedirectResponse; +use Illuminate\Routing\Redirector; use Illuminate\View\View; use Log; @@ -90,7 +93,7 @@ class BulkController extends Controller * * @param BulkEditJournalRequest $request * - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * @return Application|RedirectResponse|Redirector */ public function update(BulkEditJournalRequest $request) { diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index 1ee1b81a90..24f0bb1e47 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -26,6 +26,8 @@ namespace FireflyIII\Http\Controllers\Transaction; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionGroup; use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface; +use Illuminate\Contracts\View\Factory; +use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Log; @@ -66,7 +68,7 @@ class DeleteController extends Controller * * @param TransactionGroup $group * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse + * @return Factory|View|Redirector|RedirectResponse */ public function delete(TransactionGroup $group) { diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index f17684bcd4..6a616aa312 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Services\Internal\Update\JournalUpdateService; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\View\View as IlluminateView; @@ -91,7 +92,7 @@ class MassController extends Controller * * @param MassDeleteJournalRequest $request * - * @return \Illuminate\Contracts\Foundation\Application|Redirector|RedirectResponse + * @return Application|Redirector|RedirectResponse * */ public function destroy(MassDeleteJournalRequest $request) @@ -229,14 +230,14 @@ class MassController extends Controller /** * @param MassEditJournalRequest $request * @param int $journalId - * @param string $string + * @param string $key * * @return Carbon|null * @codeCoverageIgnore */ - private function getDateFromRequest(MassEditJournalRequest $request, int $journalId, string $string): ?Carbon + private function getDateFromRequest(MassEditJournalRequest $request, int $journalId, string $key): ?Carbon { - $value = $request->get($string); + $value = $request->get($key); if (!is_array($value)) { return null; } diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php index c72079e99f..86254f57eb 100644 --- a/app/Jobs/CreateRecurringTransactions.php +++ b/app/Jobs/CreateRecurringTransactions.php @@ -27,6 +27,8 @@ namespace FireflyIII\Jobs; use Carbon\Carbon; use FireflyIII\Events\RequestedReportOnJournals; use FireflyIII\Events\StoredTransactionGroup; +use FireflyIII\Exceptions\DuplicateTransactionException; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Recurrence; use FireflyIII\Models\RecurrenceRepetition; use FireflyIII\Models\RecurrenceTransaction; @@ -347,8 +349,8 @@ class CreateRecurringTransactions implements ShouldQueue * @param Carbon $date * * @return TransactionGroup|null - * @throws \FireflyIII\Exceptions\DuplicateTransactionException - * @throws \FireflyIII\Exceptions\FireflyException + * @throws DuplicateTransactionException + * @throws FireflyException */ private function handleOccurrence(Recurrence $recurrence, RecurrenceRepetition $repetition, Carbon $date): ?TransactionGroup { diff --git a/app/Models/GroupMembership.php b/app/Models/GroupMembership.php index 4f328ba998..93ab42b00d 100644 --- a/app/Models/GroupMembership.php +++ b/app/Models/GroupMembership.php @@ -24,16 +24,19 @@ declare(strict_types=1); namespace FireflyIII\Models; +use Eloquent; use FireflyIII\User; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Support\Carbon; /** * Class GroupMembership * * @property int $id - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at * @property string|null $deleted_at * @property int $user_id * @property int $user_group_id @@ -41,17 +44,17 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; * @property-read User $user * @property-read \FireflyIII\Models\UserGroup $userGroup * @property-read \FireflyIII\Models\UserRole $userRole - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership newModelQuery() - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership newQuery() - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership query() - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereDeletedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUpdatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserGroupId($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserId($value) - * @method static \Illuminate\Database\Eloquent\Builder|GroupMembership whereUserRoleId($value) - * @mixin \Eloquent + * @method static Builder|GroupMembership newModelQuery() + * @method static Builder|GroupMembership newQuery() + * @method static Builder|GroupMembership query() + * @method static Builder|GroupMembership whereCreatedAt($value) + * @method static Builder|GroupMembership whereDeletedAt($value) + * @method static Builder|GroupMembership whereId($value) + * @method static Builder|GroupMembership whereUpdatedAt($value) + * @method static Builder|GroupMembership whereUserGroupId($value) + * @method static Builder|GroupMembership whereUserId($value) + * @method static Builder|GroupMembership whereUserRoleId($value) + * @mixin Eloquent */ class GroupMembership extends Model { diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.php index f47d81c061..f5d247c6f8 100644 --- a/app/Models/UserGroup.php +++ b/app/Models/UserGroup.php @@ -24,28 +24,32 @@ declare(strict_types=1); namespace FireflyIII\Models; +use Eloquent; +use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Support\Carbon; /** * Class UserGroup * * @property int $id - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at * @property string|null $deleted_at * @property string $title - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships + * @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships * @property-read int|null $group_memberships_count - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup newModelQuery() - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup newQuery() - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup query() - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereDeletedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereTitle($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserGroup whereUpdatedAt($value) - * @mixin \Eloquent + * @method static Builder|UserGroup newModelQuery() + * @method static Builder|UserGroup newQuery() + * @method static Builder|UserGroup query() + * @method static Builder|UserGroup whereCreatedAt($value) + * @method static Builder|UserGroup whereDeletedAt($value) + * @method static Builder|UserGroup whereId($value) + * @method static Builder|UserGroup whereTitle($value) + * @method static Builder|UserGroup whereUpdatedAt($value) + * @mixin Eloquent */ class UserGroup extends Model { diff --git a/app/Models/UserRole.php b/app/Models/UserRole.php index d4be7c292f..b8e49ad67b 100644 --- a/app/Models/UserRole.php +++ b/app/Models/UserRole.php @@ -24,28 +24,32 @@ declare(strict_types=1); namespace FireflyIII\Models; +use Eloquent; +use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Support\Carbon; /** * Class UserRole * * @property int $id - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at * @property string|null $deleted_at * @property string $title - * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships + * @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships * @property-read int|null $group_memberships_count - * @method static \Illuminate\Database\Eloquent\Builder|UserRole newModelQuery() - * @method static \Illuminate\Database\Eloquent\Builder|UserRole newQuery() - * @method static \Illuminate\Database\Eloquent\Builder|UserRole query() - * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereCreatedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereDeletedAt($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereId($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereTitle($value) - * @method static \Illuminate\Database\Eloquent\Builder|UserRole whereUpdatedAt($value) - * @mixin \Eloquent + * @method static Builder|UserRole newModelQuery() + * @method static Builder|UserRole newQuery() + * @method static Builder|UserRole query() + * @method static Builder|UserRole whereCreatedAt($value) + * @method static Builder|UserRole whereDeletedAt($value) + * @method static Builder|UserRole whereId($value) + * @method static Builder|UserRole whereTitle($value) + * @method static Builder|UserRole whereUpdatedAt($value) + * @mixin Eloquent */ class UserRole extends Model { diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index f36ce1636e..096545ff0d 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -452,9 +452,7 @@ class AccountRepository implements AccountRepositoryInterface { $journal = $this->getOpeningBalance($account); $group = null; - if (null !== $journal) { - $group = $journal->transactionGroup; - } + $group = $journal?->transactionGroup; return $group; } @@ -598,9 +596,7 @@ class AccountRepository implements AccountRepositoryInterface { $result = null; $journal = $this->oldestJournal($account); - if (null !== $journal) { - $result = $journal->date; - } + $result = $journal?->date; return $result; } diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index db2586aba2..8bb0e7c0a2 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -228,9 +228,7 @@ class JournalRepository implements JournalRepositoryInterface { /** @var TransactionJournal $journal */ $journal = $this->user->transactionJournals()->find($journalId); - if (null !== $journal) { - $journal->transactions()->update(['reconciled' => true]); - } + $journal?->transactions()->update(['reconciled' => true]); } /** diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index c2196efa41..9f19877476 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -331,7 +331,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface public function updateLink(TransactionJournalLink $journalLink, array $data): TransactionJournalLink { $journalLink->source_id = $data['inward_id'] ?: $journalLink->source_id; - $journalLink->destination_id = $data['outward_id'] ? $data['outward_id'] : $journalLink->destination_id; + $journalLink->destination_id = $data['outward_id'] ?: $journalLink->destination_id; $journalLink->save(); if (array_key_exists('link_type_name', $data)) { $linkType = LinkType::whereName($data['link_type_name'])->first(); diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index d5ee174820..94056fc3ae 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -267,7 +267,7 @@ trait ModifiesPiggyBanks if ($newOrder > $oldOrder) { $this->user->piggyBanks()->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) ->where('piggy_banks.id', '!=', $piggyBank->id) - ->decrement('piggy_banks.order', 1); + ->decrement('piggy_banks.order'); $piggyBank->order = $newOrder; Log::debug(sprintf('Order of piggy #%d ("%s") is now %d', $piggyBank->id, $piggyBank->name, $newOrder)); $piggyBank->save(); @@ -277,7 +277,7 @@ trait ModifiesPiggyBanks $this->user->piggyBanks()->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) ->where('piggy_banks.id', '!=', $piggyBank->id) - ->increment('piggy_banks.order', 1); + ->increment('piggy_banks.order'); $piggyBank->order = $newOrder; Log::debug(sprintf('Order of piggy #%d ("%s") is now %d', $piggyBank->id, $piggyBank->name, $newOrder)); $piggyBank->save(); diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index b9709176ee..7cddb6a474 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -45,6 +45,7 @@ use FireflyIII\Support\Repositories\Recurring\FiltersWeekends; use FireflyIII\User; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -290,7 +291,7 @@ class RecurringRepository implements RecurringRepositoryInterface * @param RecurrenceTransaction $transaction * * @return array - * @throws \JsonException + * @throws JsonException */ public function getTags(RecurrenceTransaction $transaction): array { diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 1e22c24e06..7eb42fe1e6 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Repositories\User; use Exception; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\Role; use FireflyIII\User; @@ -375,7 +376,7 @@ class UserRepository implements UserRepositoryInterface * @param string $newEmail * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException * @see changeEmail */ public function updateEmail(User $user, string $newEmail): bool diff --git a/app/Rules/BelongsUser.php b/app/Rules/BelongsUser.php index cc71d832dd..f740aab087 100644 --- a/app/Rules/BelongsUser.php +++ b/app/Rules/BelongsUser.php @@ -74,31 +74,22 @@ class BelongsUser implements Rule { $attribute = $this->parseAttribute($attribute); if (!auth()->check()) { - return true; + return true; } $attribute = (string)$attribute; Log::debug(sprintf('Going to validate %s', $attribute)); - switch ($attribute) { - case 'piggy_bank_id': - return $this->validatePiggyBankId((int)$value); - case 'piggy_bank_name': - return $this->validatePiggyBankName($value); - case 'bill_id': - return $this->validateBillId((int)$value); - case 'bill_name': - return $this->validateBillName($value); - case 'budget_id': - return $this->validateBudgetId((int)$value); - case 'category_id': - return $this->validateCategoryId((int)$value); - case 'budget_name': - return $this->validateBudgetName($value); - case 'source_id': - case 'destination_id': - return $this->validateAccountId((int)$value); - default: - throw new FireflyException(sprintf('Rule BelongUser cannot handle "%s"', $attribute)); - } + + return match ($attribute) { + 'piggy_bank_id' => $this->validatePiggyBankId((int)$value), + 'piggy_bank_name' => $this->validatePiggyBankName($value), + 'bill_id' => $this->validateBillId((int)$value), + 'bill_name' => $this->validateBillName($value), + 'budget_id' => $this->validateBudgetId((int)$value), + 'category_id' => $this->validateCategoryId((int)$value), + 'budget_name' => $this->validateBudgetName($value), + 'source_id', 'destination_id' => $this->validateAccountId((int)$value), + default => throw new FireflyException(sprintf('Rule BelongUser cannot handle "%s"', $attribute)), + }; } /** @@ -116,7 +107,7 @@ class BelongsUser implements Rule return $parts[2]; } - return $attribute; + return $attribute; } /** diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.php index 433111735f..316ada2b88 100644 --- a/app/Services/Internal/Support/RecurringTransactionTrait.php +++ b/app/Services/Internal/Support/RecurringTransactionTrait.php @@ -151,7 +151,7 @@ trait RecurringTransactionTrait [ 'recurrence_id' => $recurrence->id, 'transaction_currency_id' => $currency->id, - 'foreign_currency_id' => null === $foreignCurrency ? null : $foreignCurrency->id, + 'foreign_currency_id' => $foreignCurrency?->id, 'source_id' => $source->id, 'destination_id' => $destination->id, 'amount' => $array['amount'], diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index bc9b9fbe31..e9341d8f7b 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -31,6 +31,7 @@ use FireflyIII\Models\Location; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Support\AccountServiceTrait; use FireflyIII\User; +use JsonException; use Log; /** @@ -78,7 +79,7 @@ class AccountUpdateService * * @return Account * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function update(Account $account, array $data): Account { @@ -215,7 +216,7 @@ class AccountUpdateService $newOrder = $data['order']; Log::debug(sprintf('Order is set to be updated from %s to %s', $oldOrder, $newOrder)); $list = $this->getTypeIds([AccountType::MORTGAGE, AccountType::LOAN, AccountType::DEBT]); - if (in_array($type, [AccountType::ASSET], true)) { + if ($type === AccountType::ASSET) { $list = $this->getTypeIds([AccountType::ASSET]); } diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.php index 9648b38c22..d15c4c5984 100644 --- a/app/Services/Internal/Update/GroupUpdateService.php +++ b/app/Services/Internal/Update/GroupUpdateService.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Services\Internal\Update; +use FireflyIII\Exceptions\DuplicateTransactionException; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Factory\TransactionJournalFactory; use FireflyIII\Models\TransactionGroup; @@ -168,7 +169,7 @@ class GroupUpdateService * @param array $data * * @throws FireflyException - * @throws \FireflyIII\Exceptions\DuplicateTransactionException + * @throws DuplicateTransactionException */ private function createTransactionJournal(TransactionGroup $transactionGroup, array $data): void { diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php index 0a18d2f21e..021690345e 100644 --- a/app/Services/Internal/Update/JournalUpdateService.php +++ b/app/Services/Internal/Update/JournalUpdateService.php @@ -475,7 +475,7 @@ class JournalUpdateService $billId = (int)($this->data['bill_id'] ?? 0); $billName = (string)($this->data['bill_name'] ?? ''); $bill = $this->billRepository->findBill($billId, $billName); - $this->transactionJournal->bill_id = null === $bill ? null : $bill->id; + $this->transactionJournal->bill_id = $bill?->id; Log::debug('Updated bill ID'); } } diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index c2adae662c..61fda41a26 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -82,7 +82,7 @@ class RemoteUserGuard implements Guard if (null !== $header) { $emailAddress = (string)(request()->server($header) ?? null); - $preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email', null); + $preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email'); if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) { app('preferences')->setForUser($retrievedUser, 'remote_guard_alt_email', $emailAddress); diff --git a/app/Support/Binder/CLIToken.php b/app/Support/Binder/CLIToken.php index 1ec5574fd6..4e14c59d0f 100644 --- a/app/Support/Binder/CLIToken.php +++ b/app/Support/Binder/CLIToken.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Binder; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Repositories\User\UserRepositoryInterface; use Illuminate\Routing\Route; use Log; @@ -39,7 +40,7 @@ class CLIToken implements BinderInterface * @param Route $route * * @return mixed - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public static function routeBinder(string $value, Route $route) { diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php index 3035e458b5..4ccc0be661 100644 --- a/app/Support/Export/ExportDataGenerator.php +++ b/app/Support/Export/ExportDataGenerator.php @@ -160,7 +160,7 @@ class ExportDataGenerator $account->iban, $account->account_number, $account->active, - $currency ? $currency->code : null, + $currency?->code, $repository->getMetaValue($account, 'account_role'), $repository->getMetaValue($account, 'cc_type'), $repository->getMetaValue($account, 'cc_monthly_payment_date'), @@ -391,11 +391,11 @@ class ExportDataGenerator $piggy->account->name, $piggy->account->accountType->type, $piggy->name, - $currency ? $currency->code : null, + $currency?->code, $piggy->targetamount, - $repetition ? $repetition->currentamount : null, - $piggy->startdate ? $piggy->startdate->format('Y-m-d') : null, - $piggy->targetdate ? $piggy->targetdate->format('Y-m-d') : null, + $repetition?->currentamount, + $piggy->startdate?->format('Y-m-d'), + $piggy->targetdate?->format('Y-m-d'), $piggy->order, $piggy->active, ]; @@ -457,9 +457,9 @@ class ExportDataGenerator $recurrence->transactionType->type, $recurrence->title, $recurrence->description, - null !== $recurrence->first_date ? $recurrence->first_date->format('Y-m-d') : null, - $recurrence->repeat_until ? $recurrence->repeat_until->format('Y-m-d') : null, - $recurrence->latest_date ? $recurrence->latest_date->format('Y-m-d') : null, + $recurrence->first_date?->format('Y-m-d'), + $recurrence->repeat_until?->format('Y-m-d'), + $recurrence->latest_date?->format('Y-m-d'), $recurrence->repetitions, $recurrence->apply_rules, $recurrence->active, @@ -492,7 +492,7 @@ class ExportDataGenerator null, null, null, null, // transaction: - $transaction->transactionCurrency->code, $transaction->foreignCurrency ? $transaction->foreignCurrency->code : null, + $transaction->transactionCurrency->code, $transaction->foreignCurrency?->code, $transaction->sourceAccount->name, $transaction->sourceAccount->accountType->type, $transaction->destinationAccount->name, $transaction->destinationAccount->accountType->type, $transaction->amount, $transaction->foreign_amount, $categoryName, $budgetId, $piggyBankId, implode(',', $tags), @@ -608,7 +608,7 @@ class ExportDataGenerator $tag->created_at->toAtomString(), $tag->updated_at->toAtomString(), $tag->tag, - $tag->date ? $tag->date->format('Y-m-d') : null, + $tag->date?->format('Y-m-d'), $tag->description, $tag->latitude, $tag->longitude, diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.php index ae1f566064..3fd64fe68c 100644 --- a/app/Support/ParseDateString.php +++ b/app/Support/ParseDateString.php @@ -67,7 +67,7 @@ class ParseDateString } // if + or -: - if (0 === strpos($date, '+') || 0 === strpos($date, '-')) { + if (str_starts_with($date, '+') || str_starts_with($date, '-')) { return $this->parseRelativeDate($date); } @@ -81,7 +81,7 @@ class ParseDateString } // maybe a date range - if (10 === strlen($date) && (false !== strpos($date, 'xx') || false !== strpos($date, 'xxxx'))) { + if (10 === strlen($date) && (str_contains($date, 'xx') || str_contains($date, 'xxxx'))) { Log::debug(sprintf('[c]Detected a date range ("%s"), return a fake date.', $date)); // very lazy way to parse the date without parsing it, because this specific function // cant handle date ranges. @@ -112,7 +112,7 @@ class ParseDateString return false; } // no x'es - if (false === strpos($date, 'xx') && false === strpos($date, 'xxxx')) { + if (!str_contains($date, 'xx') && !str_contains($date, 'xxxx')) { return false; } @@ -383,7 +383,7 @@ class ParseDateString Log::error(sprintf('Part "%s" does not match regular expression. Will be skipped.', $part)); continue; } - $direction = 0 === strpos($part, '+') ? 1 : 0; + $direction = str_starts_with($part, '+') ? 1 : 0; $period = $part[strlen($part) - 1]; $number = (int) substr($part, 1, -1); if (!array_key_exists($period, $functions[$direction])) { diff --git a/app/Support/Search/AccountSearch.php b/app/Support/Search/AccountSearch.php index 66e8a7074d..62b4c9a3bd 100644 --- a/app/Support/Search/AccountSearch.php +++ b/app/Support/Search/AccountSearch.php @@ -26,6 +26,7 @@ namespace FireflyIII\Support\Search; use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; +use JsonException; /** * Class AccountSearch @@ -55,7 +56,7 @@ class AccountSearch implements GenericSearchInterface /** * @return Collection - * @throws \JsonException + * @throws JsonException */ public function search(): Collection { diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index 8238c104d6..6a11e6a14a 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -71,10 +71,8 @@ class OperatorQuerySearch implements SearchInterface private int $limit; private Collection $operators; private int $page; - private ParsedQuery $query; private float $startTime; private TagRepositoryInterface $tagRepository; - private User $user; private array $validOperators; private array $words; private array $invalidOperators; @@ -146,11 +144,11 @@ class OperatorQuerySearch implements SearchInterface public function parseQuery(string $query) { Log::debug(sprintf('Now in parseQuery(%s)', $query)); - $parser = new QueryParser(); - $this->query = $parser->parse($query); + $parser = new QueryParser(); + $query1 = $parser->parse($query); - Log::debug(sprintf('Found %d node(s)', count($this->query->getNodes()))); - foreach ($this->query->getNodes() as $searchNode) { + Log::debug(sprintf('Found %d node(s)', count($query1->getNodes()))); + foreach ($query1->getNodes() as $searchNode) { $this->handleSearchNode($searchNode); } @@ -220,14 +218,13 @@ class OperatorQuerySearch implements SearchInterface */ public function setUser(User $user): void { - $this->user = $user; $this->accountRepository->setUser($user); $this->billRepository->setUser($user); $this->categoryRepository->setUser($user); $this->budgetRepository->setUser($user); $this->tagRepository->setUser($user); $this->collector = app(GroupCollectorInterface::class); - $this->collector->setUser($this->user); + $this->collector->setUser($user); $this->collector->withAccountInformation()->withCategoryInformation()->withBudgetInformation(); $this->setLimit((int)app('preferences')->getForUser($user, 'listPageSize', 50)->data); diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 9ed9edecc9..62a0108b63 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -24,11 +24,13 @@ namespace FireflyIII\Support; use Carbon\Carbon; use DB; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Support\Collection; +use JsonException; use stdClass; /** @@ -47,8 +49,8 @@ class Steam * @param TransactionCurrency|null $currency * * @return string - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string { diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php index a82dc61320..b1bc03a70b 100644 --- a/app/Transformers/PiggyBankTransformer.php +++ b/app/Transformers/PiggyBankTransformer.php @@ -89,8 +89,8 @@ class PiggyBankTransformer extends AbstractTransformer // left to save: $leftToSave = bcsub($piggyBank->targetamount, $currentAmountStr); - $startDate = null === $piggyBank->startdate ? null : $piggyBank->startdate->toAtomString(); - $targetDate = null === $piggyBank->targetdate ? null : $piggyBank->targetdate->toAtomString(); + $startDate = $piggyBank->startdate?->toAtomString(); + $targetDate = $piggyBank->targetdate?->toAtomString(); // target and percentage: $targetAmount = $piggyBank->targetamount; diff --git a/app/Transformers/RecurrenceTransformer.php b/app/Transformers/RecurrenceTransformer.php index 19a14d4a98..77c4394dc3 100644 --- a/app/Transformers/RecurrenceTransformer.php +++ b/app/Transformers/RecurrenceTransformer.php @@ -94,8 +94,8 @@ class RecurrenceTransformer extends AbstractTransformer 'title' => $recurrence->title, 'description' => $recurrence->description, 'first_date' => $recurrence->first_date->toAtomString(), - 'latest_date' => null === $recurrence->latest_date ? null : $recurrence->latest_date->toAtomString(), - 'repeat_until' => null === $recurrence->repeat_until ? null : $recurrence->repeat_until->toAtomString(), + 'latest_date' => $recurrence->latest_date?->toAtomString(), + 'repeat_until' => $recurrence->repeat_until?->toAtomString(), 'apply_rules' => $recurrence->apply_rules, 'active' => $recurrence->active, 'nr_of_repetitions' => $reps, diff --git a/app/Transformers/TagTransformer.php b/app/Transformers/TagTransformer.php index b65ca5e461..0f3e00d862 100644 --- a/app/Transformers/TagTransformer.php +++ b/app/Transformers/TagTransformer.php @@ -42,7 +42,7 @@ class TagTransformer extends AbstractTransformer */ public function transform(Tag $tag): array { - $date = null === $tag->date ? null : $tag->date->toAtomString(); + $date = $tag->date?->toAtomString(); /** @var Location $location */ $location = $tag->locations()->first(); $latitude = null; diff --git a/app/Transformers/TransactionGroupTransformer.php b/app/Transformers/TransactionGroupTransformer.php index 2429718425..60795e2e8d 100644 --- a/app/Transformers/TransactionGroupTransformer.php +++ b/app/Transformers/TransactionGroupTransformer.php @@ -138,7 +138,7 @@ class TransactionGroupTransformer extends AbstractTransformer return [ 'user' => (string)$row['user_id'], - 'transaction_journal_id' => (int)$row['transaction_journal_id'], + 'transaction_journal_id' => (string)$row['transaction_journal_id'], 'type' => strtolower($type), 'date' => $row['date']->toAtomString(), 'order' => $row['order'], diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 49404c9320..a20be34865 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -42,6 +42,9 @@ use Google2FA; use Illuminate\Support\Collection; use Illuminate\Validation\Validator; use Log; +use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; +use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; +use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException; use ValueError; use function is_string; @@ -55,9 +58,9 @@ class FireflyValidator extends Validator * @param mixed $value * * @return bool - * @throws \PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException - * @throws \PragmaRX\Google2FA\Exceptions\InvalidCharactersException - * @throws \PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException + * @throws IncompatibleWithGoogleAuthenticatorException + * @throws InvalidCharactersException + * @throws SecretKeyTooShortException */ public function validate2faCode($attribute, $value): bool { From e829d795893edad1572280638b2d189c82bb9292 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:21:29 +0200 Subject: [PATCH 07/30] Various code cleanup. --- app/Factory/TransactionJournalFactory.php | 15 +++--- .../Report/Audit/MonthReportGenerator.php | 4 +- .../Events/UpdatedAccountEventHandler.php | 1 - app/Handlers/Events/UserEventHandler.php | 12 ++--- .../Events/VersionCheckEventHandler.php | 1 - app/Helpers/Fiscal/FiscalHelper.php | 1 + app/Helpers/Report/NetWorth.php | 1 + .../Controllers/Account/CreateController.php | 1 + .../Controllers/Account/IndexController.php | 1 + app/Http/Controllers/Admin/HomeController.php | 1 + .../Controllers/Admin/UpdateController.php | 2 - app/Http/Controllers/Auth/LoginController.php | 2 +- .../Controllers/Auth/RegisterController.php | 2 +- .../Controllers/Bill/CreateController.php | 2 - app/Http/Controllers/Bill/EditController.php | 2 - app/Http/Controllers/Bill/IndexController.php | 3 +- app/Http/Controllers/Bill/ShowController.php | 2 +- .../Budget/AvailableBudgetController.php | 2 +- .../Controllers/Budget/IndexController.php | 1 + .../Controllers/Budget/ShowController.php | 3 ++ .../Controllers/Category/IndexController.php | 1 + .../Category/NoCategoryController.php | 2 + .../Controllers/Category/ShowController.php | 2 + .../Controllers/Chart/AccountController.php | 10 ++++ app/Http/Controllers/Chart/BillController.php | 2 + .../Controllers/Chart/BudgetController.php | 9 +++- .../Controllers/Chart/CategoryController.php | 17 ++++-- .../Chart/ExpenseReportController.php | 4 +- .../Controllers/Chart/PiggyBankController.php | 5 +- .../Controllers/Chart/ReportController.php | 2 + .../Chart/TransactionController.php | 4 ++ app/Http/Controllers/CurrencyController.php | 5 +- .../Controllers/Export/IndexController.php | 2 - app/Http/Controllers/HelpController.php | 1 + app/Http/Controllers/HomeController.php | 5 -- app/Http/Controllers/JavascriptController.php | 2 + .../Json/AutoCompleteController.php | 4 -- app/Http/Controllers/Json/BoxController.php | 2 + app/Http/Controllers/Json/IntroController.php | 2 + .../Controllers/Json/ReconcileController.php | 3 +- app/Http/Controllers/NewUserController.php | 1 + .../ObjectGroup/IndexController.php | 2 - .../Controllers/Popup/ReportController.php | 28 +++------- .../Controllers/PreferencesController.php | 3 +- app/Http/Controllers/ProfileController.php | 7 ++- .../Controllers/Report/AccountController.php | 2 +- .../Controllers/Report/BudgetController.php | 1 + .../Controllers/Report/CategoryController.php | 4 +- .../Report/OperationsController.php | 3 ++ app/Http/Controllers/ReportController.php | 54 ++++++------------- app/Http/Controllers/Rule/IndexController.php | 2 - app/Http/Controllers/TagController.php | 2 +- .../Transaction/CreateController.php | 2 +- app/Http/Middleware/InstallationId.php | 1 - app/Http/Middleware/TrustProxies.php | 1 - app/Jobs/CreateRecurringTransactions.php | 2 + app/Models/GroupMembership.php | 20 +++---- app/Models/TransactionJournal.php | 1 - app/Models/UserGroup.php | 14 ++--- app/Models/UserRole.php | 14 ++--- .../Account/AccountRepository.php | 2 + app/Repositories/Bill/BillRepository.php | 2 + .../Budget/AvailableBudgetRepository.php | 1 - .../Category/CategoryRepository.php | 1 + .../Currency/CurrencyRepository.php | 1 + .../Journal/JournalCLIRepository.php | 2 + .../Journal/JournalRepository.php | 2 + .../ObjectGroup/CreatesObjectGroups.php | 1 - app/Repositories/User/UserRepository.php | 1 + app/Rules/IsValidBulkClause.php | 2 + .../FireflyIIIOrg/Update/UpdateRequest.php | 1 - .../Internal/Destroy/BillDestroyService.php | 1 - .../Internal/Destroy/BudgetDestroyService.php | 1 - .../Destroy/CategoryDestroyService.php | 1 - .../Destroy/CurrencyDestroyService.php | 1 - .../Destroy/RecurrenceDestroyService.php | 1 - .../Internal/Support/AccountServiceTrait.php | 1 - .../Internal/Support/BillServiceTrait.php | 1 - .../Support/CreditRecalculateService.php | 4 +- .../Internal/Update/AccountUpdateService.php | 1 - .../Internal/Update/GroupUpdateService.php | 1 + app/Support/Amount.php | 4 ++ .../Authentication/RemoteUserGuard.php | 3 +- app/Support/CacheProperties.php | 1 - app/Support/Cronjobs/AbstractCronjob.php | 2 - app/Support/Http/Controllers/AugumentData.php | 1 + .../Http/Controllers/ChartGeneration.php | 3 +- .../Http/Controllers/GetConfigurationData.php | 2 +- .../Http/Controllers/PeriodOverview.php | 6 +++ .../Http/Controllers/RequestInformation.php | 1 + .../Http/Controllers/RuleManagement.php | 1 - app/Support/ParseDateString.php | 41 ++++++-------- app/Support/Preferences.php | 3 +- app/Support/Request/ConvertsDataTypes.php | 1 - app/Support/Search/OperatorQuerySearch.php | 1 - app/Support/Steam.php | 10 +++- app/TransactionRules/Actions/ClearBudget.php | 1 - .../Actions/ClearCategory.php | 1 - app/TransactionRules/Actions/ClearNotes.php | 1 - .../Actions/SetDestinationAccount.php | 1 - .../Engine/SearchRuleEngine.php | 1 + app/Transformers/AccountTransformer.php | 2 + app/Transformers/AttachmentTransformer.php | 4 +- app/Transformers/PiggyBankTransformer.php | 1 - .../TransactionGroupTransformer.php | 2 +- app/Validation/FireflyValidator.php | 1 - app/Validation/TransactionValidation.php | 14 ++--- 107 files changed, 225 insertions(+), 220 deletions(-) diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php index 3c893a9839..8c624acfeb 100644 --- a/app/Factory/TransactionJournalFactory.php +++ b/app/Factory/TransactionJournalFactory.php @@ -95,8 +95,9 @@ class TransactionJournalFactory * @param array $data * * @return Collection - * @throws FireflyException * @throws DuplicateTransactionException + * @throws FireflyException + * @throws JsonException */ public function create(array $data): Collection { @@ -388,15 +389,11 @@ class TransactionJournalFactory private function getCurrencyByAccount(string $type, ?TransactionCurrency $currency, Account $source, Account $destination): TransactionCurrency { Log::debug('Now ingetCurrencyByAccount()'); - switch ($type) { - default: - case TransactionType::WITHDRAWAL: - case TransactionType::TRANSFER: - return $this->getCurrency($currency, $source); - case TransactionType::DEPOSIT: - return $this->getCurrency($currency, $destination); - } + return match ($type) { + default => $this->getCurrency($currency, $source), + TransactionType::DEPOSIT => $this->getCurrency($currency, $destination), + }; } /** diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index 55ac3508a1..d12efb5eb9 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -48,7 +48,6 @@ class MonthReportGenerator implements ReportGeneratorInterface * Generates the report. * * @return string - * @throws FireflyException * @codeCoverageIgnore */ public function generate(): string @@ -195,7 +194,8 @@ class MonthReportGenerator implements ReportGeneratorInterface * @param Carbon $date * * @return array - * + * @throws FireflyException + * @throws \JsonException */ #[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string", 'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array diff --git a/app/Handlers/Events/UpdatedAccountEventHandler.php b/app/Handlers/Events/UpdatedAccountEventHandler.php index ec070538ff..096ab5f99c 100644 --- a/app/Handlers/Events/UpdatedAccountEventHandler.php +++ b/app/Handlers/Events/UpdatedAccountEventHandler.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace FireflyIII\Handlers\Events; -use FireflyIII\Events\StoredAccount; use FireflyIII\Events\UpdatedAccount; use FireflyIII\Services\Internal\Support\CreditRecalculateService; diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 5662c34328..cdd587ddd9 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -114,7 +114,7 @@ class UserEventHandler * @param Login $event * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function demoUserBackToEnglish(Login $event): bool { @@ -136,7 +136,7 @@ class UserEventHandler /** * @param DetectedNewIPAddress $event * - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function notifyNewIPAddress(DetectedNewIPAddress $event): void { @@ -178,7 +178,7 @@ class UserEventHandler * @param UserChangedEmail $event * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool { @@ -204,7 +204,7 @@ class UserEventHandler * @param UserChangedEmail $event * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function sendEmailChangeUndoMail(UserChangedEmail $event): bool { @@ -286,7 +286,7 @@ class UserEventHandler * @param RegisteredUser $event * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function sendRegistrationMail(RegisteredUser $event): bool { @@ -319,7 +319,7 @@ class UserEventHandler /** * @param Login $event * - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function storeUserIPAddress(Login $event): void { diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 2fd9f6558f..40307cf453 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Update\UpdateTrait; use FireflyIII\Models\Configuration; use FireflyIII\Repositories\User\UserRepositoryInterface; -use FireflyIII\User; use Log; /** diff --git a/app/Helpers/Fiscal/FiscalHelper.php b/app/Helpers/Fiscal/FiscalHelper.php index 15a92d3c83..ea52ce1074 100644 --- a/app/Helpers/Fiscal/FiscalHelper.php +++ b/app/Helpers/Fiscal/FiscalHelper.php @@ -67,6 +67,7 @@ class FiscalHelper implements FiscalHelperInterface * @param Carbon $date * * @return Carbon date object + * @throws \FireflyIII\Exceptions\FireflyException */ public function startOfFiscalYear(Carbon $date): Carbon { diff --git a/app/Helpers/Report/NetWorth.php b/app/Helpers/Report/NetWorth.php index 10f62cfc15..0fda556332 100644 --- a/app/Helpers/Report/NetWorth.php +++ b/app/Helpers/Report/NetWorth.php @@ -62,6 +62,7 @@ class NetWorth implements NetWorthInterface * @param Carbon $date * * @return array + * @throws \JsonException */ public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array { diff --git a/app/Http/Controllers/Account/CreateController.php b/app/Http/Controllers/Account/CreateController.php index a01febc004..1a5a3c5f96 100644 --- a/app/Http/Controllers/Account/CreateController.php +++ b/app/Http/Controllers/Account/CreateController.php @@ -135,6 +135,7 @@ class CreateController extends Controller * @param AccountFormRequest $request * * @return RedirectResponse|Redirector + * @throws \FireflyIII\Exceptions\FireflyException */ public function store(AccountFormRequest $request) { diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php index 2d008188bc..11566bfe0f 100644 --- a/app/Http/Controllers/Account/IndexController.php +++ b/app/Http/Controllers/Account/IndexController.php @@ -72,6 +72,7 @@ class IndexController extends Controller * @param string $objectType * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function inactive(Request $request, string $objectType) { diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index c4da989f2c..718d112b1f 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -53,6 +53,7 @@ class HomeController extends Controller * Index of the admin. * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function index() { diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.php index 13a21a6988..5e509db1c9 100644 --- a/app/Http/Controllers/Admin/UpdateController.php +++ b/app/Http/Controllers/Admin/UpdateController.php @@ -31,8 +31,6 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; /** * Class HomeController. diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 5ef0774785..92fcc56271 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -194,7 +194,7 @@ class LoginController extends Controller * * @param Request $request * - * @return Factory|Response|View + * @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Routing\Redirector|RedirectResponse * @throws FireflyException */ public function showLoginForm(Request $request) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index c41172d317..c5b3ce425d 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -78,7 +78,7 @@ class RegisterController extends Controller * * @param Request $request * - * @return Factory|RedirectResponse|Redirector|View + * @return \Illuminate\Contracts\Foundation\Application|Redirector|RedirectResponse * @throws FireflyException * @throws ValidationException */ diff --git a/app/Http/Controllers/Bill/CreateController.php b/app/Http/Controllers/Bill/CreateController.php index 17d1dcde7a..8015319b45 100644 --- a/app/Http/Controllers/Bill/CreateController.php +++ b/app/Http/Controllers/Bill/CreateController.php @@ -29,11 +29,9 @@ use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\BillStoreRequest; use FireflyIII\Repositories\Bill\BillRepositoryInterface; -use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\View\View; use Log; /** diff --git a/app/Http/Controllers/Bill/EditController.php b/app/Http/Controllers/Bill/EditController.php index f713d87dde..7959115862 100644 --- a/app/Http/Controllers/Bill/EditController.php +++ b/app/Http/Controllers/Bill/EditController.php @@ -29,11 +29,9 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\BillUpdateRequest; use FireflyIII\Models\Bill; use FireflyIII\Repositories\Bill\BillRepositoryInterface; -use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\View\View; /** * Class EditController diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index ba627833e1..f87f80baca 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -24,10 +24,8 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Bill; -use Carbon\Carbon; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Bill; -use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\ObjectGroup\OrganisesObjectGroups; use FireflyIII\Transformers\BillTransformer; @@ -145,6 +143,7 @@ class IndexController extends Controller * @param array $bills * * @return array + * @throws \FireflyIII\Exceptions\FireflyException */ private function getSums(array $bills): array { diff --git a/app/Http/Controllers/Bill/ShowController.php b/app/Http/Controllers/Bill/ShowController.php index 6a871b05a3..87b3638957 100644 --- a/app/Http/Controllers/Bill/ShowController.php +++ b/app/Http/Controllers/Bill/ShowController.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Bill; use Carbon\Carbon; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Attachment; @@ -124,6 +123,7 @@ class ShowController extends Controller * @param Bill $bill * * @return Factory|View + * @throws FireflyException */ public function show(Request $request, Bill $bill) { diff --git a/app/Http/Controllers/Budget/AvailableBudgetController.php b/app/Http/Controllers/Budget/AvailableBudgetController.php index 323f0d3d6a..b2f82e9036 100644 --- a/app/Http/Controllers/Budget/AvailableBudgetController.php +++ b/app/Http/Controllers/Budget/AvailableBudgetController.php @@ -133,7 +133,7 @@ class AvailableBudgetController extends Controller } /** - * @param AvailableBudget $availableBudget + * @param Request $request * * @return RedirectResponse|Redirector */ diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index f478cb9e3f..9f1caa1de7 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -90,6 +90,7 @@ class IndexController extends Controller * @param Carbon|null $end * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function index(Request $request, Carbon $start = null, Carbon $end = null) { diff --git a/app/Http/Controllers/Budget/ShowController.php b/app/Http/Controllers/Budget/ShowController.php index f7f8583f28..6716256a10 100644 --- a/app/Http/Controllers/Budget/ShowController.php +++ b/app/Http/Controllers/Budget/ShowController.php @@ -78,6 +78,7 @@ class ShowController extends Controller * @param Carbon|null $end * * @return Factory|View + * @throws FireflyException */ public function noBudget(Request $request, Carbon $start = null, Carbon $end = null) { @@ -113,6 +114,7 @@ class ShowController extends Controller * @param Request $request * * @return Factory|View + * @throws FireflyException */ public function noBudgetAll(Request $request) { @@ -141,6 +143,7 @@ class ShowController extends Controller * @param Budget $budget * * @return Factory|View + * @throws FireflyException */ public function show(Request $request, Budget $budget) { diff --git a/app/Http/Controllers/Category/IndexController.php b/app/Http/Controllers/Category/IndexController.php index 9b75383272..fb93dd652d 100644 --- a/app/Http/Controllers/Category/IndexController.php +++ b/app/Http/Controllers/Category/IndexController.php @@ -66,6 +66,7 @@ class IndexController extends Controller * @param Request $request * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function index(Request $request) { diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php index 9ae41cebb2..4ec98fbe81 100644 --- a/app/Http/Controllers/Category/NoCategoryController.php +++ b/app/Http/Controllers/Category/NoCategoryController.php @@ -74,6 +74,7 @@ class NoCategoryController extends Controller * @param Carbon|null $end * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function show(Request $request, Carbon $start = null, Carbon $end = null) { @@ -111,6 +112,7 @@ class NoCategoryController extends Controller * @param Request $request * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function showAll(Request $request) { diff --git a/app/Http/Controllers/Category/ShowController.php b/app/Http/Controllers/Category/ShowController.php index 67c21af5b4..5a530d19cc 100644 --- a/app/Http/Controllers/Category/ShowController.php +++ b/app/Http/Controllers/Category/ShowController.php @@ -76,6 +76,7 @@ class ShowController extends Controller * @param Carbon|null $end * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null) { @@ -115,6 +116,7 @@ class ShowController extends Controller * @param Category $category * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function showAll(Request $request, Category $category) { diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index cc0b950288..68f98a29aa 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -83,6 +83,7 @@ class AccountController extends Controller * This chart is (multi) currency aware. * * @return JsonResponse + * @throws \JsonException */ public function expenseAccounts(): JsonResponse { @@ -194,6 +195,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -268,6 +270,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -322,6 +325,7 @@ class AccountController extends Controller * @param AccountRepositoryInterface $repository * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException */ public function frontpage(AccountRepositoryInterface $repository): JsonResponse { @@ -364,6 +368,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -421,6 +426,8 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function period(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -458,6 +465,8 @@ class AccountController extends Controller * @param TransactionCurrency $currency * * @return array + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array { @@ -528,6 +537,7 @@ class AccountController extends Controller * This chart is multi-currency aware. * * @return JsonResponse + * @throws \JsonException */ public function revenueAccounts(): JsonResponse { diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 9b28269dc3..8fe9467b4f 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -57,6 +57,7 @@ class BillController extends Controller * @param BillRepositoryInterface $repository * * @return JsonResponse + * @throws \JsonException */ public function frontpage(BillRepositoryInterface $repository): JsonResponse { @@ -102,6 +103,7 @@ class BillController extends Controller * @param Bill $bill * * @return JsonResponse + * @throws \JsonException */ public function single(Bill $bill): JsonResponse { diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index 77ac926f9a..400e137710 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -84,6 +84,7 @@ class BudgetController extends Controller * @param Budget $budget * * @return JsonResponse + * @throws \JsonException */ public function budget(Budget $budget): JsonResponse { @@ -152,6 +153,7 @@ class BudgetController extends Controller * @return JsonResponse * * @throws FireflyException + * @throws \JsonException */ public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse { @@ -202,6 +204,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse + * @throws \JsonException */ public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -270,6 +273,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse + * @throws \JsonException */ public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -334,6 +338,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse + * @throws \JsonException */ public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -397,7 +402,7 @@ class BudgetController extends Controller * Shows a budget list with spent/left/overspent. * * @return JsonResponse - * + * @throws \JsonException */ public function frontpage(): JsonResponse { @@ -435,6 +440,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -510,6 +516,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index f8fd2e6f59..7e1cf1239f 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -63,11 +63,13 @@ class CategoryController extends Controller /** * Show an overview for a category for all time, per month/week/year. -* See reference nr. 59 + * See reference nr. 59 * * @param Category $category * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function all(Category $category): JsonResponse { @@ -111,9 +113,10 @@ class CategoryController extends Controller /** * Shows the category chart on the front page. -* See reference nr. 60 + * See reference nr. 60 * * @return JsonResponse + * @throws \JsonException */ public function frontPage(): JsonResponse { @@ -138,7 +141,7 @@ class CategoryController extends Controller /** * Chart report. -* See reference nr. 61 + * See reference nr. 61 * * @param Category $category * @param Collection $accounts @@ -146,6 +149,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -254,13 +258,14 @@ class CategoryController extends Controller /** * Chart for period for transactions without a category. -* See reference nr. 62 + * See reference nr. 62 * * @param Collection $accounts * @param Carbon $start * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -281,12 +286,14 @@ class CategoryController extends Controller /** * Chart for a specific period. -* See reference nr. 63 + * See reference nr. 63 * * @param Category $category * @param Carbon $date * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function specificPeriod(Category $category, Carbon $date): JsonResponse { diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php index 12e450d3c0..dd1541143a 100644 --- a/app/Http/Controllers/Chart/ExpenseReportController.php +++ b/app/Http/Controllers/Chart/ExpenseReportController.php @@ -69,7 +69,7 @@ class ExpenseReportController extends Controller /** * Main chart that shows income and expense for a combination of expense/revenue accounts. * -* See reference nr. 58 + * See reference nr. 58 * * @param Collection $accounts * @param Collection $expense @@ -77,7 +77,7 @@ class ExpenseReportController extends Controller * @param Carbon $end * * @return JsonResponse - * + * @throws \JsonException */ public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index be6ba88848..a7d1684d90 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -31,7 +31,6 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Support\CacheProperties; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; -use Illuminate\Support\Collection; /** * Class PiggyBankController. @@ -58,13 +57,13 @@ class PiggyBankController extends Controller /** * Shows the piggy bank history. * -* See reference nr. 53 + * See reference nr. 53 * * @param PiggyBankRepositoryInterface $repository * @param PiggyBank $piggyBank * * @return JsonResponse - * + * @throws \JsonException */ public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse { diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 304d5ea347..31efe7921a 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -68,6 +68,7 @@ class ReportController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -142,6 +143,7 @@ class ReportController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { diff --git a/app/Http/Controllers/Chart/TransactionController.php b/app/Http/Controllers/Chart/TransactionController.php index c57fcc2be7..27c5daea39 100644 --- a/app/Http/Controllers/Chart/TransactionController.php +++ b/app/Http/Controllers/Chart/TransactionController.php @@ -56,6 +56,7 @@ class TransactionController extends Controller * @param Carbon $end * * @return JsonResponse + * @throws \JsonException */ public function budgets(Carbon $start, Carbon $end) { @@ -100,6 +101,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException + * @throws \JsonException */ public function categories(string $objectType, Carbon $start, Carbon $end) { @@ -158,6 +160,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException + * @throws \JsonException */ public function destinationAccounts(string $objectType, Carbon $start, Carbon $end) { @@ -215,6 +218,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException + * @throws \JsonException */ public function sourceAccounts(string $objectType, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 3b04b612b9..22cd0a8cba 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -99,10 +99,10 @@ class CurrencyController extends Controller /** * Make currency the default currency. * - * @param Request $request - * @param TransactionCurrency $currency + * @param Request $request * * @return RedirectResponse|Redirector + * @throws FireflyException */ public function defaultCurrency(Request $request) { @@ -328,6 +328,7 @@ class CurrencyController extends Controller * @param Request $request * * @return Factory|View + * @throws FireflyException */ public function index(Request $request) { diff --git a/app/Http/Controllers/Export/IndexController.php b/app/Http/Controllers/Export/IndexController.php index 8e8b201e0e..04d7d56322 100644 --- a/app/Http/Controllers/Export/IndexController.php +++ b/app/Http/Controllers/Export/IndexController.php @@ -67,9 +67,7 @@ class IndexController extends Controller /** * @return LaravelResponse - * @throws CannotInsertRecord * @throws FireflyException - * @throws Exception */ public function export(): LaravelResponse { diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index f14958df16..ecd2205c86 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -35,6 +35,7 @@ class HelpController extends Controller * @param string $route * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException */ public function show(string $route): JsonResponse { diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index cc5f6c3bdf..1a402722c1 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -28,17 +28,12 @@ use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Middleware\Installer; use FireflyIII\Models\AccountType; -use FireflyIII\Models\GroupMembership; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\User; -use Illuminate\Contracts\View\Factory; use Illuminate\Http\JsonResponse; -use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; -use Illuminate\View\View; use Log; /** diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php index 33b15b8fcf..c457ba4042 100644 --- a/app/Http/Controllers/JavascriptController.php +++ b/app/Http/Controllers/JavascriptController.php @@ -46,6 +46,7 @@ class JavascriptController extends Controller * @param CurrencyRepositoryInterface $currencyRepository * * @return Response + * @throws \FireflyIII\Exceptions\FireflyException */ public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response { @@ -128,6 +129,7 @@ class JavascriptController extends Controller * @param CurrencyRepositoryInterface $currencyRepository * * @return Response + * @throws \FireflyIII\Exceptions\FireflyException */ public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response { diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 98d6fa09a4..86bd5603b2 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -23,10 +23,6 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Json; use FireflyIII\Http\Controllers\Controller; -use FireflyIII\Repositories\Journal\JournalRepositoryInterface; -use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface; -use Illuminate\Http\JsonResponse; -use Illuminate\Http\Request; /** * Class AutoCompleteController. diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php index 03c6c9b020..ad12df6ad3 100644 --- a/app/Http/Controllers/Json/BoxController.php +++ b/app/Http/Controllers/Json/BoxController.php @@ -51,6 +51,7 @@ class BoxController extends Controller * 2) if the user has no available amount set this period: spent per day * * @return JsonResponse + * @throws \JsonException */ public function available(): JsonResponse { @@ -129,6 +130,7 @@ class BoxController extends Controller * @param CurrencyRepositoryInterface $repository * * @return JsonResponse + * @throws \JsonException */ public function balance(CurrencyRepositoryInterface $repository): JsonResponse { diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index 18c259a3d5..d7164428c8 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -103,6 +103,7 @@ class IntroController extends Controller * @param string|null $specialPage * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException */ public function postEnable(string $route, string $specialPage = null): JsonResponse { @@ -126,6 +127,7 @@ class IntroController extends Controller * @param string|null $specialPage * * @return JsonResponse + * @throws \FireflyIII\Exceptions\FireflyException */ public function postFinished(string $route, string $specialPage = null): JsonResponse { diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php index 66ea1b5256..2b328a7d62 100644 --- a/app/Http/Controllers/Json/ReconcileController.php +++ b/app/Http/Controllers/Json/ReconcileController.php @@ -215,7 +215,8 @@ class ReconcileController extends Controller * @param Carbon $end * * @return JsonResponse - * + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function transactions(Account $account, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index 9b6d005cce..8aa942ec82 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -86,6 +86,7 @@ class NewUserController extends Controller * @param CurrencyRepositoryInterface $currencyRepository * * @return RedirectResponse|Redirector + * @throws \FireflyIII\Exceptions\FireflyException */ public function submit(NewUserFormRequest $request, CurrencyRepositoryInterface $currencyRepository) { diff --git a/app/Http/Controllers/ObjectGroup/IndexController.php b/app/Http/Controllers/ObjectGroup/IndexController.php index 0d159d4754..6bc9805282 100644 --- a/app/Http/Controllers/ObjectGroup/IndexController.php +++ b/app/Http/Controllers/ObjectGroup/IndexController.php @@ -27,11 +27,9 @@ namespace FireflyIII\Http\Controllers\ObjectGroup; use FireflyIII\Http\Controllers\Controller; 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; /** diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index b6089d1976..1b4d64d685 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -51,26 +51,14 @@ class ReportController extends Controller app('view')->share('start', $attributes['startDate']); app('view')->share('end', $attributes['endDate']); - switch ($attributes['location']) { - default: - $html = sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']); - break; - case 'budget-spent-amount': - $html = $this->budgetSpentAmount($attributes); - break; - case 'expense-entry': - $html = $this->expenseEntry($attributes); - break; - case 'income-entry': - $html = $this->incomeEntry($attributes); - break; - case 'category-entry': - $html = $this->categoryEntry($attributes); - break; - case 'budget-entry': - $html = $this->budgetEntry($attributes); - break; - } + $html = match ($attributes['location']) { + default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']), + 'budget-spent-amount' => $this->budgetSpentAmount($attributes), + 'expense-entry' => $this->expenseEntry($attributes), + 'income-entry' => $this->incomeEntry($attributes), + 'category-entry' => $this->categoryEntry($attributes), + 'budget-entry' => $this->budgetEntry($attributes), + }; return response()->json(['html' => $html]); } diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index be5de919b9..9cc2850941 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -64,6 +64,7 @@ class PreferencesController extends Controller * @param AccountRepositoryInterface $repository * * @return Factory|View + * @throws \FireflyIII\Exceptions\FireflyException */ public function index(AccountRepositoryInterface $repository) { @@ -144,7 +145,7 @@ class PreferencesController extends Controller * @param Request $request * * @return RedirectResponse|Redirector - * + * @throws \FireflyIII\Exceptions\FireflyException */ public function postIndex(Request $request) { diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 890708eb06..469138d1e0 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -389,7 +389,10 @@ class ProfileController extends Controller } /** + * @param Request $request + * * @return Factory|View + * @throws FireflyException */ public function newBackupCodes(Request $request) { @@ -506,6 +509,7 @@ class ProfileController extends Controller * @param TokenFormRequest $request * * @return RedirectResponse|Redirector + * @throws FireflyException */ public function postCode(TokenFormRequest $request) { @@ -657,9 +661,10 @@ class ProfileController extends Controller } /** -* See reference nr. 64 + * See reference nr. 64 * * @param string $mfaCode + * @throws FireflyException */ private function addToMFAHistory(string $mfaCode): void { diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 2bd37602a3..0f8b992b97 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -44,7 +44,7 @@ class AccountController extends Controller * @param Carbon $end * * @return mixed|string - * + * @throws \JsonException */ public function general(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index b0c17a6ef5..eadfe8866f 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -307,6 +307,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return mixed|string + * @throws \JsonException */ public function period(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 17b2b7e0f9..c8a0fce6c4 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -488,6 +488,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return mixed|string + * @throws \JsonException */ public function expenses(Collection $accounts, Carbon $start, Carbon $end) { @@ -568,6 +569,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return string + * @throws \JsonException */ public function income(Collection $accounts, Carbon $start, Carbon $end): string { @@ -646,7 +648,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return mixed|string - * + * @throws \JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php index 2863f049df..63e5b3bdd9 100644 --- a/app/Http/Controllers/Report/OperationsController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -66,6 +66,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string + * @throws \JsonException */ public function expenses(Collection $accounts, Carbon $start, Carbon $end) { @@ -101,6 +102,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return string + * @throws \JsonException */ public function income(Collection $accounts, Carbon $start, Carbon $end): string { @@ -136,6 +138,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string + * @throws \JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index ad67bb0ede..79c97dbec1 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -260,6 +260,7 @@ class ReportController extends Controller * @param AccountRepositoryInterface $repository * * @return Factory|View + * @throws FireflyException */ public function index(AccountRepositoryInterface $repository) { @@ -305,23 +306,13 @@ class ReportController extends Controller */ public function options(string $reportType) { - switch ($reportType) { - default: - $result = $this->noReportOptions(); - break; - case 'category': - $result = $this->categoryReportOptions(); - break; - case 'budget': - $result = $this->budgetReportOptions(); - break; - case 'tag': - $result = $this->tagReportOptions(); - break; - case 'double': - $result = $this->doubleReportOptions(); - break; - } + $result = match ($reportType) { + default => $this->noReportOptions(), + 'category' => $this->categoryReportOptions(), + 'budget' => $this->budgetReportOptions(), + 'tag' => $this->tagReportOptions(), + 'double' => $this->doubleReportOptions(), + }; return response()->json(['html' => $result]); } @@ -383,27 +374,14 @@ class ReportController extends Controller return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); } - switch ($reportType) { - default: - case 'default': - $uri = route('reports.report.default', [$accounts, $start, $end]); - break; - case 'category': - $uri = route('reports.report.category', [$accounts, $categories, $start, $end]); - break; - case 'audit': - $uri = route('reports.report.audit', [$accounts, $start, $end]); - break; - case 'budget': - $uri = route('reports.report.budget', [$accounts, $budgets, $start, $end]); - break; - case 'tag': - $uri = route('reports.report.tag', [$accounts, $tags, $start, $end]); - break; - case 'double': - $uri = route('reports.report.double', [$accounts, $double, $start, $end]); - break; - } + $uri = match ($reportType) { + default => route('reports.report.default', [$accounts, $start, $end]), + 'category' => route('reports.report.category', [$accounts, $categories, $start, $end]), + 'audit' => route('reports.report.audit', [$accounts, $start, $end]), + 'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]), + 'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]), + 'double' => route('reports.report.double', [$accounts, $double, $start, $end]), + }; return redirect($uri); } diff --git a/app/Http/Controllers/Rule/IndexController.php b/app/Http/Controllers/Rule/IndexController.php index b680cbb134..3826c02cbc 100644 --- a/app/Http/Controllers/Rule/IndexController.php +++ b/app/Http/Controllers/Rule/IndexController.php @@ -22,14 +22,12 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Rule; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Rule; use FireflyIII\Models\RuleGroup; use FireflyIII\Repositories\Rule\RuleRepositoryInterface; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Support\Http\Controllers\RuleManagement; -use FireflyIII\User; use Illuminate\Contracts\View\Factory; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 50d03d9407..8dbba9e584 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -272,7 +272,7 @@ class TagController extends Controller * @param Tag $tag * * @return Factory|View - * + * @throws FireflyException */ public function showAll(Request $request, Tag $tag) { diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php index 3ed7ff63c7..ec36340853 100644 --- a/app/Http/Controllers/Transaction/CreateController.php +++ b/app/Http/Controllers/Transaction/CreateController.php @@ -31,7 +31,6 @@ use FireflyIII\Services\Internal\Update\GroupCloneService; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; -use Illuminate\View\View; /** * Class CreateController @@ -88,6 +87,7 @@ class CreateController extends Controller * @param string|null $objectType * * @return Factory|\Illuminate\Contracts\View\View + * @throws \FireflyIII\Exceptions\FireflyException */ public function create(?string $objectType) { diff --git a/app/Http/Middleware/InstallationId.php b/app/Http/Middleware/InstallationId.php index 10985827d6..7a741e9ea6 100644 --- a/app/Http/Middleware/InstallationId.php +++ b/app/Http/Middleware/InstallationId.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace FireflyIII\Http\Middleware; use Closure; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Support\System\GeneratesInstallationId; use Illuminate\Http\Request; diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 27c60f65b1..77bc9e6256 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -24,7 +24,6 @@ namespace FireflyIII\Http\Middleware; use Fideloper\Proxy\TrustProxies as Middleware; use Illuminate\Contracts\Config\Repository; -use Illuminate\Http\Request; /** * Class TrustProxies diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php index 86254f57eb..081cd65162 100644 --- a/app/Jobs/CreateRecurringTransactions.php +++ b/app/Jobs/CreateRecurringTransactions.php @@ -328,6 +328,8 @@ class CreateRecurringTransactions implements ShouldQueue * @param array $occurrences * * @return Collection + * @throws DuplicateTransactionException + * @throws FireflyException */ private function handleOccurrences(Recurrence $recurrence, RecurrenceRepetition $repetition, array $occurrences): Collection { diff --git a/app/Models/GroupMembership.php b/app/Models/GroupMembership.php index 93ab42b00d..1af5447862 100644 --- a/app/Models/GroupMembership.php +++ b/app/Models/GroupMembership.php @@ -34,16 +34,16 @@ use Illuminate\Support\Carbon; /** * Class GroupMembership * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property string|null $deleted_at - * @property int $user_id - * @property int $user_group_id - * @property int $user_role_id - * @property-read User $user - * @property-read \FireflyIII\Models\UserGroup $userGroup - * @property-read \FireflyIII\Models\UserRole $userRole + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $deleted_at + * @property int $user_id + * @property int $user_group_id + * @property int $user_role_id + * @property-read User $user + * @property-read UserGroup $userGroup + * @property-read UserRole $userRole * @method static Builder|GroupMembership newModelQuery() * @method static Builder|GroupMembership newQuery() * @method static Builder|GroupMembership query() diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index 70963b2ad4..f89805655a 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -156,7 +156,6 @@ class TransactionJournal extends Model * @param string $value * * @return TransactionJournal - * @throws FireflyException * @throws NotFoundHttpException */ public static function routeBinder(string $value): TransactionJournal diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.php index f5d247c6f8..4ebc662242 100644 --- a/app/Models/UserGroup.php +++ b/app/Models/UserGroup.php @@ -34,13 +34,13 @@ use Illuminate\Support\Carbon; /** * Class UserGroup * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property string|null $deleted_at - * @property string $title - * @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships - * @property-read int|null $group_memberships_count + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $deleted_at + * @property string $title + * @property-read Collection|GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count * @method static Builder|UserGroup newModelQuery() * @method static Builder|UserGroup newQuery() * @method static Builder|UserGroup query() diff --git a/app/Models/UserRole.php b/app/Models/UserRole.php index b8e49ad67b..ca51556d1c 100644 --- a/app/Models/UserRole.php +++ b/app/Models/UserRole.php @@ -34,13 +34,13 @@ use Illuminate\Support\Carbon; /** * Class UserRole * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property string|null $deleted_at - * @property string $title - * @property-read Collection|\FireflyIII\Models\GroupMembership[] $groupMemberships - * @property-read int|null $group_memberships_count + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $deleted_at + * @property string $title + * @property-read Collection|GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count * @method static Builder|UserRole newModelQuery() * @method static Builder|UserRole newQuery() * @method static Builder|UserRole query() diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 096545ff0d..4cbd918fbe 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -730,6 +730,8 @@ class AccountRepository implements AccountRepositoryInterface * @param array $data * * @return Account + * @throws FireflyException + * @throws \JsonException */ public function update(Account $account, array $data): Account { diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 725a241203..482448deda 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -623,6 +623,7 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return Carbon + * @throws \JsonException */ public function nextDateMatch(Bill $bill, Carbon $date): Carbon { @@ -651,6 +652,7 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return Carbon + * @throws \JsonException */ public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon { diff --git a/app/Repositories/Budget/AvailableBudgetRepository.php b/app/Repositories/Budget/AvailableBudgetRepository.php index 25afeb262d..690e9ca75b 100644 --- a/app/Repositories/Budget/AvailableBudgetRepository.php +++ b/app/Repositories/Budget/AvailableBudgetRepository.php @@ -30,7 +30,6 @@ use FireflyIII\Models\TransactionCurrency; use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; -use Log; /** * diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index e90246c5c6..30bec9642b 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -309,6 +309,7 @@ class CategoryRepository implements CategoryRepositoryInterface * @param array $data * * @return Category + * @throws Exception */ public function update(Category $category, array $data): Category { diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index ea30208170..456008442b 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -65,6 +65,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * @param TransactionCurrency $currency * * @return bool + * @throws FireflyException */ public function currencyInUse(TransactionCurrency $currency): bool { diff --git a/app/Repositories/Journal/JournalCLIRepository.php b/app/Repositories/Journal/JournalCLIRepository.php index 53d7294f09..fd1dd5aa29 100644 --- a/app/Repositories/Journal/JournalCLIRepository.php +++ b/app/Repositories/Journal/JournalCLIRepository.php @@ -117,6 +117,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface * @param string $field * * @return null|Carbon + * @throws \JsonException */ public function getMetaDate(TransactionJournal $journal, string $field): ?Carbon { @@ -160,6 +161,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface * @param string $field * * @return null|string + * @throws \JsonException */ public function getMetaField(TransactionJournal $journal, string $field): ?string { diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 8bb0e7c0a2..539c63ef59 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -129,6 +129,7 @@ class JournalRepository implements JournalRepositoryInterface * @param TransactionJournal $journal * * @return string + * @throws \JsonException */ public function getJournalTotal(TransactionJournal $journal): string { @@ -185,6 +186,7 @@ class JournalRepository implements JournalRepositoryInterface * @param string $field * * @return null|Carbon + * @throws \JsonException */ public function getMetaDateById(int $journalId, string $field): ?Carbon { diff --git a/app/Repositories/ObjectGroup/CreatesObjectGroups.php b/app/Repositories/ObjectGroup/CreatesObjectGroups.php index 2a25e58ab8..69fadd48d0 100644 --- a/app/Repositories/ObjectGroup/CreatesObjectGroups.php +++ b/app/Repositories/ObjectGroup/CreatesObjectGroups.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace FireflyIII\Repositories\ObjectGroup; use FireflyIII\Models\ObjectGroup; -use FireflyIII\User; /** * Trait CreatesObjectGroups diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 7eb42fe1e6..45232e4af8 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -348,6 +348,7 @@ class UserRepository implements UserRepositoryInterface * @param array $data * * @return User + * @throws FireflyException */ public function update(User $user, array $data): User { diff --git a/app/Rules/IsValidBulkClause.php b/app/Rules/IsValidBulkClause.php index d10b78c0dd..b01201c6c9 100644 --- a/app/Rules/IsValidBulkClause.php +++ b/app/Rules/IsValidBulkClause.php @@ -71,6 +71,8 @@ class IsValidBulkClause implements Rule /** * Does basic rule based validation. * + * @param string $value + * * @return bool */ private function basicValidation(string $value): bool diff --git a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php index f5d1a9a27f..7aed47deb5 100644 --- a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php +++ b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php @@ -25,7 +25,6 @@ declare(strict_types=1); namespace FireflyIII\Services\FireflyIIIOrg\Update; use Carbon\Carbon; -use Exception; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use JsonException; diff --git a/app/Services/Internal/Destroy/BillDestroyService.php b/app/Services/Internal/Destroy/BillDestroyService.php index e9719679bb..bc97716159 100644 --- a/app/Services/Internal/Destroy/BillDestroyService.php +++ b/app/Services/Internal/Destroy/BillDestroyService.php @@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy; use Exception; use FireflyIII\Models\Bill; -use Log; /** * @codeCoverageIgnore diff --git a/app/Services/Internal/Destroy/BudgetDestroyService.php b/app/Services/Internal/Destroy/BudgetDestroyService.php index aa8c4190d8..f1335cd7c1 100644 --- a/app/Services/Internal/Destroy/BudgetDestroyService.php +++ b/app/Services/Internal/Destroy/BudgetDestroyService.php @@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy; use DB; use Exception; use FireflyIII\Models\Budget; -use Log; /** * Class BudgetDestroyService diff --git a/app/Services/Internal/Destroy/CategoryDestroyService.php b/app/Services/Internal/Destroy/CategoryDestroyService.php index e93240f104..adb3f92f2c 100644 --- a/app/Services/Internal/Destroy/CategoryDestroyService.php +++ b/app/Services/Internal/Destroy/CategoryDestroyService.php @@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy; use DB; use Exception; use FireflyIII\Models\Category; -use Log; /** * Class CategoryDestroyService diff --git a/app/Services/Internal/Destroy/CurrencyDestroyService.php b/app/Services/Internal/Destroy/CurrencyDestroyService.php index 53bf9026ff..a655c82919 100644 --- a/app/Services/Internal/Destroy/CurrencyDestroyService.php +++ b/app/Services/Internal/Destroy/CurrencyDestroyService.php @@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy; use Exception; use FireflyIII\Models\TransactionCurrency; -use Log; /** * Class CurrencyDestroyService diff --git a/app/Services/Internal/Destroy/RecurrenceDestroyService.php b/app/Services/Internal/Destroy/RecurrenceDestroyService.php index efa7d95f46..5a4ac788c5 100644 --- a/app/Services/Internal/Destroy/RecurrenceDestroyService.php +++ b/app/Services/Internal/Destroy/RecurrenceDestroyService.php @@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy; use Exception; use FireflyIII\Models\Recurrence; use FireflyIII\Models\RecurrenceTransaction; -use Log; /** * @codeCoverageIgnore diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 3305501129..5fdd24e19e 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -39,7 +39,6 @@ use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService; -use JsonException; use Log; use Validator; diff --git a/app/Services/Internal/Support/BillServiceTrait.php b/app/Services/Internal/Support/BillServiceTrait.php index 9df0a307dc..65c232481c 100644 --- a/app/Services/Internal/Support/BillServiceTrait.php +++ b/app/Services/Internal/Support/BillServiceTrait.php @@ -27,7 +27,6 @@ use Exception; use FireflyIII\Models\Bill; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; -use Illuminate\Support\Collection; use Log; /** diff --git a/app/Services/Internal/Support/CreditRecalculateService.php b/app/Services/Internal/Support/CreditRecalculateService.php index 7c50885384..300fda53ae 100644 --- a/app/Services/Internal/Support/CreditRecalculateService.php +++ b/app/Services/Internal/Support/CreditRecalculateService.php @@ -262,7 +262,7 @@ class CreditRecalculateService // if it's a credit, we don't care, because sending more money // to a credit-liability doesn't increase the amount (yet) if ( - in_array($type, [TransactionType::WITHDRAWAL]) + $type === TransactionType::WITHDRAWAL && (int)$account->id === (int)$transaction->account_id && 1 === bccomp($transaction->amount, '0') && 'credit' === $direction @@ -274,7 +274,7 @@ class CreditRecalculateService // likewise deposit into a credit debt does not change the amount if ( - in_array($type, [TransactionType::DEPOSIT]) + $type === TransactionType::DEPOSIT && (int)$account->id === (int)$transaction->account_id && -1 === bccomp($transaction->amount, '0') && 'credit' === $direction diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index e9341d8f7b..7c45a6a5d7 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -79,7 +79,6 @@ class AccountUpdateService * * @return Account * @throws FireflyException - * @throws JsonException */ public function update(Account $account, array $data): Account { diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.php index d15c4c5984..7b0a196827 100644 --- a/app/Services/Internal/Update/GroupUpdateService.php +++ b/app/Services/Internal/Update/GroupUpdateService.php @@ -122,6 +122,7 @@ class GroupUpdateService * @param array $transactions * * @return array + * @throws DuplicateTransactionException * @throws FireflyException */ private function updateTransactions(TransactionGroup $transactionGroup, array $transactions): array diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 83096f79f2..7bea63e335 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -109,6 +109,8 @@ class Amount /** * @return string + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function getCurrencyCode(): string { @@ -145,6 +147,8 @@ class Amount * @param User $user * * @return TransactionCurrency + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function getDefaultCurrencyByUser(User $user): TransactionCurrency { diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index 61fda41a26..e5cd72cdc9 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -44,8 +44,7 @@ class RemoteUserGuard implements Guard * Create a new authentication guard. * * @param UserProvider $provider - * - * @return void + * @param Application $app */ // @phpstan-ignore-next-line public function __construct(UserProvider $provider, Application $app) // @phpstan-ignore-line diff --git a/app/Support/CacheProperties.php b/app/Support/CacheProperties.php index 7eb90f8927..0d95c386a5 100644 --- a/app/Support/CacheProperties.php +++ b/app/Support/CacheProperties.php @@ -74,7 +74,6 @@ class CacheProperties /** * @return bool - * @throws JsonException */ public function has(): bool { diff --git a/app/Support/Cronjobs/AbstractCronjob.php b/app/Support/Cronjobs/AbstractCronjob.php index 19a5ae44a2..45cdce0a98 100644 --- a/app/Support/Cronjobs/AbstractCronjob.php +++ b/app/Support/Cronjobs/AbstractCronjob.php @@ -24,8 +24,6 @@ declare(strict_types=1); namespace FireflyIII\Support\Cronjobs; use Carbon\Carbon; -use Exception; -use FireflyIII\Exceptions\FireflyException; /** * Class AbstractCronjob diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index 19c28683a4..7ef49e57cf 100644 --- a/app/Support/Http/Controllers/AugumentData.php +++ b/app/Support/Http/Controllers/AugumentData.php @@ -190,6 +190,7 @@ trait AugumentData * @param Carbon $end * * @return Collection + * @throws \JsonException */ protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info { diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index d217867765..373aee5b73 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -45,7 +45,8 @@ trait ChartGeneration * @param Carbon $end * * @return array - * + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method. { diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index eb3d3bb1f2..5493ae41ee 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -85,7 +85,7 @@ trait GetConfigurationData * Get config for date range. * * @return array - * + * @throws \FireflyIII\Exceptions\FireflyException */ protected function getDateRangeConfig(): array // get configuration + get preferences. { diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 90dfed5d71..da65f3bfa4 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -78,6 +78,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array { @@ -269,6 +270,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array { @@ -347,6 +349,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array { @@ -400,6 +403,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getNoCategoryPeriodOverview(Carbon $theDate): array { @@ -480,6 +484,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags. { @@ -554,6 +559,7 @@ trait PeriodOverview * * @return array * @throws FireflyException + * @throws \JsonException */ protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array { diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php index 99ee491d86..280893eb71 100644 --- a/app/Support/Http/Controllers/RequestInformation.php +++ b/app/Support/Http/Controllers/RequestInformation.php @@ -162,6 +162,7 @@ trait RequestInformation * Returns if user has seen demo. * * @return bool + * @throws \FireflyIII\Exceptions\FireflyException */ final protected function hasSeenDemo(): bool // get request info + get preference { diff --git a/app/Support/Http/Controllers/RuleManagement.php b/app/Support/Http/Controllers/RuleManagement.php index 417ca46140..01ab4e63ff 100644 --- a/app/Support/Http/Controllers/RuleManagement.php +++ b/app/Support/Http/Controllers/RuleManagement.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; -use FireflyIII\Repositories\Rule\RuleRepositoryInterface; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Support\Search\OperatorQuerySearch; use Illuminate\Http\Request; diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.php index 3fd64fe68c..3fe2b018fb 100644 --- a/app/Support/ParseDateString.php +++ b/app/Support/ParseDateString.php @@ -51,6 +51,7 @@ class ParseDateString * @param string $date * * @return Carbon + * @throws FireflyException */ public function parseDate(string $date): Carbon { @@ -265,31 +266,20 @@ class ParseDateString protected function parseKeyword(string $keyword): Carbon { $today = Carbon::today()->startOfDay(); - switch ($keyword) { - default: - case 'today': - return $today; - case 'yesterday': - return $today->subDay(); - case 'tomorrow': - return $today->addDay(); - case 'start of this week': - return $today->startOfWeek(); - case 'end of this week': - return $today->endOfWeek(); - case 'start of this month': - return $today->startOfMonth(); - case 'end of this month': - return $today->endOfMonth(); - case 'start of this quarter': - return $today->startOfQuarter(); - case 'end of this quarter': - return $today->endOfQuarter(); - case 'start of this year': - return $today->startOfYear(); - case 'end of this year': - return $today->endOfYear(); - } + + return match ($keyword) { + default => $today, + 'yesterday' => $today->subDay(), + 'tomorrow' => $today->addDay(), + 'start of this week' => $today->startOfWeek(), + 'end of this week' => $today->endOfWeek(), + 'start of this month' => $today->startOfMonth(), + 'end of this month' => $today->endOfMonth(), + 'start of this quarter' => $today->startOfQuarter(), + 'end of this quarter' => $today->endOfQuarter(), + 'start of this year' => $today->startOfYear(), + 'end of this year' => $today->endOfYear(), + }; } /** @@ -371,7 +361,6 @@ class ParseDateString ], ]; - /** @var string $part */ foreach ($parts as $part) { Log::debug(sprintf('Now parsing part "%s"', $part)); $part = trim($part); diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index dabd433bd7..de81c8e269 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -28,7 +28,6 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Preference; use FireflyIII\User; use Illuminate\Support\Collection; -use Log; use PDOException; use Session; @@ -107,6 +106,7 @@ class Preferences * @param mixed $default * * @return Preference|null + * @throws FireflyException */ public function getFresh(string $name, $default = null): ?Preference { @@ -207,6 +207,7 @@ class Preferences /** * @return string + * @throws FireflyException */ public function lastActivity(): string { diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php index 108413f963..880d8ed6f2 100644 --- a/app/Support/Request/ConvertsDataTypes.php +++ b/app/Support/Request/ConvertsDataTypes.php @@ -25,7 +25,6 @@ namespace FireflyIII\Support\Request; use Carbon\Carbon; use Carbon\Exceptions\InvalidFormatException; -use Exception; use Log; /** diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index 6a11e6a14a..002f96cb8e 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -166,7 +166,6 @@ class OperatorQuerySearch implements SearchInterface /** * @inheritDoc - * @throws FireflyException */ public function searchTransactions(): LengthAwarePaginator { diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 62a0108b63..c912b1a556 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -49,7 +49,6 @@ class Steam * @param TransactionCurrency|null $currency * * @return string - * @throws FireflyException * @throws JsonException */ public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string @@ -97,6 +96,7 @@ class Steam * @param Carbon $date * * @return string + * @throws JsonException */ public function balanceIgnoreVirtual(Account $account, Carbon $date): string { @@ -164,6 +164,8 @@ class Steam * @param TransactionCurrency|null $currency * * @return array + * @throws FireflyException + * @throws JsonException */ public function balanceInRange(Account $account, Carbon $start, Carbon $end, ?TransactionCurrency $currency = null): array { @@ -246,6 +248,7 @@ class Steam * @param Carbon $date * * @return array + * @throws JsonException */ public function balancePerCurrency(Account $account, Carbon $date): array { @@ -279,6 +282,8 @@ class Steam * @param Carbon $date * * @return array + * @throws FireflyException + * @throws JsonException */ public function balancesByAccounts(Collection $accounts, Carbon $date): array { @@ -311,6 +316,7 @@ class Steam * @param Carbon $date * * @return array + * @throws JsonException */ public function balancesPerCurrencyByAccounts(Collection $accounts, Carbon $date): array { @@ -444,6 +450,7 @@ class Steam * Get user's language. * * @return string + * @throws FireflyException */ public function getLanguage(): string // get preference { @@ -454,6 +461,7 @@ class Steam * Get user's locale. * * @return string + * @throws FireflyException */ public function getLocale(): string // get preference { diff --git a/app/TransactionRules/Actions/ClearBudget.php b/app/TransactionRules/Actions/ClearBudget.php index 0890a7ff59..c13996bbcd 100644 --- a/app/TransactionRules/Actions/ClearBudget.php +++ b/app/TransactionRules/Actions/ClearBudget.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; use DB; -use FireflyIII\Models\RuleAction; use Log; /** diff --git a/app/TransactionRules/Actions/ClearCategory.php b/app/TransactionRules/Actions/ClearCategory.php index 4650c09196..d32dc222db 100644 --- a/app/TransactionRules/Actions/ClearCategory.php +++ b/app/TransactionRules/Actions/ClearCategory.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; use DB; -use FireflyIII\Models\RuleAction; use Log; /** diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php index 171803f074..d30466cd61 100644 --- a/app/TransactionRules/Actions/ClearNotes.php +++ b/app/TransactionRules/Actions/ClearNotes.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; use DB; -use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use Log; diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php index fe87c4b8a1..bcb1a776a5 100644 --- a/app/TransactionRules/Actions/SetDestinationAccount.php +++ b/app/TransactionRules/Actions/SetDestinationAccount.php @@ -24,7 +24,6 @@ namespace FireflyIII\TransactionRules\Actions; use DB; use FireflyIII\Models\Account; -use FireflyIII\Models\AccountType; use FireflyIII\Models\RuleAction; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.php index 45febf39a1..0604f46076 100644 --- a/app/TransactionRules/Engine/SearchRuleEngine.php +++ b/app/TransactionRules/Engine/SearchRuleEngine.php @@ -527,6 +527,7 @@ class SearchRuleEngine implements RuleEngineInterface * @param RuleGroup $group * * @return bool + * @throws FireflyException */ private function fireGroup(RuleGroup $group): bool { diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php index 466d657e88..438f066229 100644 --- a/app/Transformers/AccountTransformer.php +++ b/app/Transformers/AccountTransformer.php @@ -51,6 +51,8 @@ class AccountTransformer extends AbstractTransformer * @param Account $account * * @return array + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \JsonException */ public function transform(Account $account): array { diff --git a/app/Transformers/AttachmentTransformer.php b/app/Transformers/AttachmentTransformer.php index d1aef15bfa..2d579f01cb 100644 --- a/app/Transformers/AttachmentTransformer.php +++ b/app/Transformers/AttachmentTransformer.php @@ -61,8 +61,8 @@ class AttachmentTransformer extends AbstractTransformer 'attachable_type' => str_replace('FireflyIII\\Models\\', '', $attachment->attachable_type), 'md5' => $attachment->md5, 'filename' => $attachment->filename, - 'download_uri' => route('api.v1.attachments.download', [$attachment->id]), - 'upload_uri' => route('api.v1.attachments.upload', [$attachment->id]), + 'download_url' => route('api.v1.attachments.download', [$attachment->id]), + 'upload_url' => route('api.v1.attachments.upload', [$attachment->id]), 'title' => $attachment->title, 'notes' => $this->repository->getNoteText($attachment), 'mime' => $attachment->mime, diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php index b1bc03a70b..1116f3b63c 100644 --- a/app/Transformers/PiggyBankTransformer.php +++ b/app/Transformers/PiggyBankTransformer.php @@ -22,7 +22,6 @@ declare(strict_types=1); namespace FireflyIII\Transformers; -use FireflyIII\Models\Account; use FireflyIII\Models\ObjectGroup; use FireflyIII\Models\PiggyBank; use FireflyIII\Repositories\Account\AccountRepositoryInterface; diff --git a/app/Transformers/TransactionGroupTransformer.php b/app/Transformers/TransactionGroupTransformer.php index 60795e2e8d..6d88969a3a 100644 --- a/app/Transformers/TransactionGroupTransformer.php +++ b/app/Transformers/TransactionGroupTransformer.php @@ -351,7 +351,7 @@ class TransactionGroupTransformer extends AbstractTransformer $bill = $this->getBill($journal->bill); if (null !== $foreignAmount && null !== $foreignCurrency) { - $foreignAmount = number_format((float)$foreignAmount, $foreignCurrency['decimal_places'], '.', ''); + $foreignAmount = number_format((float)$foreignAmount, $foreignCurrency->decimal_places ?? 0, '.', ''); } $longitude = null; diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index a20be34865..a8febacce8 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -117,7 +117,6 @@ class FireflyValidator extends Validator * @param mixed $value * * @return bool - * @throws FireflyException */ public function validateIban($attribute, $value): bool { diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.php index 34009ab076..14f7ce6912 100644 --- a/app/Validation/TransactionValidation.php +++ b/app/Validation/TransactionValidation.php @@ -518,15 +518,11 @@ trait TransactionValidation */ private function compareAccountData(string $type, array $comparison): bool { - switch ($type) { - default: - case 'withdrawal': - return $this->compareAccountDataWithdrawal($comparison); - case 'deposit': - return $this->compareAccountDataDeposit($comparison); - case 'transfer': - return $this->compareAccountDataTransfer($comparison); - } + return match ($type) { + default => $this->compareAccountDataWithdrawal($comparison), + 'deposit' => $this->compareAccountDataDeposit($comparison), + 'transfer' => $this->compareAccountDataTransfer($comparison), + }; } /** From 9b9d52e99f3ba4762ca5edf6bb5da33a7e7b9da1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:21:46 +0200 Subject: [PATCH 08/30] Update version. --- config/firefly.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/firefly.php b/config/firefly.php index 347f1c25b1..68e75ebe60 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -101,8 +101,8 @@ return [ 'webhooks' => true, 'handle_debts' => true, ], - 'version' => '5.6.0', - 'api_version' => '1.5.3', + 'version' => '5.6.1', + 'api_version' => '1.5.4', 'db_version' => 18, // generic settings From 4003cea75997a724de99cbc9f8dfa03cf44acd53 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Sep 2021 10:26:12 +0200 Subject: [PATCH 09/30] Code reordering and reformatting. I should really start employing style CI. --- .../Autocomplete/CurrencyController.php | 3 +- .../Autocomplete/ObjectGroupController.php | 1 + .../Controllers/Chart/AccountController.php | 4 +- app/Api/V1/Controllers/Controller.php | 4 +- .../Data/Bulk/AccountController.php | 3 +- .../Data/Export/ExportController.php | 4 +- .../Insight/Transfer/AccountController.php | 1 + .../Models/Account/ShowController.php | 4 +- .../Models/Account/UpdateController.php | 6 +- .../Models/Attachment/DestroyController.php | 2 +- .../Models/Attachment/UpdateController.php | 2 +- .../AvailableBudget/DestroyController.php | 2 +- .../Models/Bill/StoreController.php | 4 +- .../Models/Bill/UpdateController.php | 4 +- .../Models/Budget/ShowController.php | 2 +- .../Models/Category/UpdateController.php | 4 +- .../Models/ObjectGroup/DestroyController.php | 2 +- .../Models/ObjectGroup/ListController.php | 2 +- .../Models/ObjectGroup/UpdateController.php | 2 +- .../Models/PiggyBank/UpdateController.php | 2 +- .../Models/Recurrence/StoreController.php | 4 +- .../Models/Recurrence/UpdateController.php | 4 +- .../Models/Rule/StoreController.php | 2 +- .../Models/Rule/UpdateController.php | 4 +- .../Models/RuleGroup/StoreController.php | 2 +- .../Models/RuleGroup/TriggerController.php | 2 +- .../Models/Tag/StoreController.php | 2 +- .../Models/Tag/UpdateController.php | 2 +- .../Models/Transaction/StoreController.php | 6 +- .../Models/Transaction/UpdateController.php | 4 +- .../TransactionCurrency/DestroyController.php | 8 +- .../TransactionCurrency/UpdateController.php | 8 +- .../Models/TransactionLink/ShowController.php | 4 +- .../TransactionLinkType/StoreController.php | 2 +- .../TransactionLinkType/UpdateController.php | 2 +- .../System/ConfigurationController.php | 2 +- .../V1/Controllers/System/UserController.php | 2 +- .../V1/Controllers/Webhook/ShowController.php | 8 +- .../Controllers/Webhook/StoreController.php | 2 +- .../Requests/Models/Account/UpdateRequest.php | 2 +- .../Requests/Models/Budget/UpdateRequest.php | 1 + .../Models/BudgetLimit/UpdateRequest.php | 2 +- .../V1/Requests/Models/Tag/UpdateRequest.php | 2 +- .../Models/Transaction/StoreRequest.php | 3 +- .../TransactionCurrency/UpdateRequest.php | 2 +- app/Api/V1/Requests/System/UpdateRequest.php | 4 +- .../Commands/Correction/CorrectDatabase.php | 2 +- .../Correction/DeleteOrphanedTransactions.php | 2 +- .../Commands/Correction/DeleteZeroAmount.php | 6 +- .../Commands/Correction/EnableCurrencies.php | 4 +- .../Commands/Correction/FixPiggies.php | 2 +- .../Correction/FixPostgresSequences.php | 2 +- .../Commands/Correction/FixUnevenAmount.php | 2 +- app/Console/Commands/Export/ExportData.php | 1 - .../Commands/Upgrade/BudgetLimitCurrency.php | 5 +- .../Commands/Upgrade/CCLiabilities.php | 2 +- .../Commands/Upgrade/MigrateAttachments.php | 2 +- .../Commands/Upgrade/MigrateJournalNotes.php | 4 +- .../Upgrade/MigrateRecurrenceMeta.php | 2 +- .../Upgrade/MigrateRecurrenceType.php | 2 +- .../Commands/Upgrade/MigrateTagLocations.php | 2 +- .../Commands/Upgrade/MigrateToGroups.php | 2 +- .../Commands/Upgrade/MigrateToRules.php | 2 +- .../Upgrade/OtherCurrenciesCorrections.php | 6 +- .../Commands/Upgrade/RenameAccountMeta.php | 2 +- .../Upgrade/TransactionIdentifier.php | 1 + .../Upgrade/TransferCurrenciesCorrections.php | 9 +- .../Commands/Upgrade/UpgradeDatabase.php | 2 +- .../Commands/Upgrade/UpgradeLiabilities.php | 106 ++-- app/Console/Commands/VerifySecurityAlerts.php | 22 +- app/Events/AdminRequestedTestMessage.php | 1 + app/Events/DestroyedTransactionGroup.php | 1 + app/Events/DestroyedTransactionLink.php | 1 + app/Events/DetectedNewIPAddress.php | 1 + app/Events/RegisteredUser.php | 1 + app/Events/RequestedNewPassword.php | 1 + app/Events/RequestedReportOnJournals.php | 1 + app/Events/RequestedSendWebhookMessages.php | 1 + app/Events/RequestedVersionCheckStatus.php | 2 + app/Events/UserChangedEmail.php | 1 + app/Exceptions/GracefulNotFoundHandler.php | 2 +- app/Factory/AccountFactory.php | 2 +- app/Factory/AccountMetaFactory.php | 2 +- app/Factory/AttachmentFactory.php | 2 +- app/Factory/RecurrenceFactory.php | 16 +- app/Factory/TransactionJournalMetaFactory.php | 4 +- .../Report/Audit/MonthReportGenerator.php | 3 +- .../Report/Budget/MonthReportGenerator.php | 2 +- .../Report/Category/MonthReportGenerator.php | 2 +- app/Handlers/Events/AutomationHandler.php | 2 +- .../Events/StoredGroupEventHandler.php | 24 +- .../Events/UpdatedGroupEventHandler.php | 24 +- app/Handlers/Events/UserEventHandler.php | 56 +- .../Events/VersionCheckEventHandler.php | 5 +- .../Extensions/AccountCollection.php | 6 +- app/Helpers/Collector/GroupCollector.php | 20 +- .../Collector/GroupCollectorInterface.php | 28 +- app/Helpers/Fiscal/FiscalHelper.php | 3 +- app/Helpers/Help/Help.php | 2 +- app/Helpers/Report/NetWorth.php | 5 +- .../Controllers/Account/CreateController.php | 3 +- .../Controllers/Account/DeleteController.php | 4 +- .../Controllers/Account/EditController.php | 18 +- .../Controllers/Account/IndexController.php | 9 +- .../Account/ReconcileController.php | 6 +- .../Controllers/Account/ShowController.php | 6 +- .../Admin/ConfigurationController.php | 2 +- app/Http/Controllers/Admin/HomeController.php | 3 +- app/Http/Controllers/Admin/LinkController.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 6 +- .../Controllers/Auth/RegisterController.php | 3 +- .../Controllers/Bill/CreateController.php | 5 +- app/Http/Controllers/Bill/EditController.php | 5 +- app/Http/Controllers/Bill/IndexController.php | 27 +- .../Controllers/Budget/CreateController.php | 2 +- .../Controllers/Budget/EditController.php | 2 +- .../Controllers/Budget/IndexController.php | 3 +- .../Controllers/Budget/ShowController.php | 4 +- .../Controllers/Category/CreateController.php | 2 +- .../Controllers/Category/DeleteController.php | 2 +- .../Controllers/Category/EditController.php | 2 +- .../Controllers/Category/IndexController.php | 3 +- .../Category/NoCategoryController.php | 5 +- .../Controllers/Category/ShowController.php | 5 +- .../Controllers/Chart/AccountController.php | 36 +- app/Http/Controllers/Chart/BillController.php | 9 +- .../Controllers/Chart/BudgetController.php | 31 +- .../Controllers/Chart/CategoryController.php | 16 +- .../Chart/CategoryReportController.php | 2 +- .../Chart/DoubleReportController.php | 4 +- .../Chart/ExpenseReportController.php | 7 +- .../Controllers/Chart/PiggyBankController.php | 5 +- .../Controllers/Chart/ReportController.php | 11 +- .../Controllers/Chart/TagReportController.php | 2 +- .../Chart/TransactionController.php | 17 +- app/Http/Controllers/DebugController.php | 2 +- .../Controllers/Export/IndexController.php | 4 +- app/Http/Controllers/HelpController.php | 3 +- app/Http/Controllers/JavascriptController.php | 93 +-- app/Http/Controllers/Json/BoxController.php | 9 +- app/Http/Controllers/Json/IntroController.php | 5 +- .../Controllers/Json/ReconcileController.php | 7 +- app/Http/Controllers/Json/RuleController.php | 1 + app/Http/Controllers/NewUserController.php | 12 +- .../ObjectGroup/DeleteController.php | 3 +- .../ObjectGroup/IndexController.php | 3 +- .../PiggyBank/CreateController.php | 2 +- .../Controllers/PiggyBank/EditController.php | 2 +- .../Controllers/PiggyBank/IndexController.php | 2 +- .../Controllers/PreferencesController.php | 11 +- app/Http/Controllers/ProfileController.php | 171 +++--- .../Recurring/CreateController.php | 2 +- .../Controllers/Recurring/EditController.php | 2 +- .../Controllers/Recurring/IndexController.php | 4 +- .../Controllers/Report/AccountController.php | 5 +- .../Controllers/Report/BillController.php | 2 +- .../Controllers/Report/BudgetController.php | 5 +- .../Controllers/Report/CategoryController.php | 14 +- .../Controllers/Report/DoubleController.php | 2 +- .../Report/OperationsController.php | 13 +- app/Http/Controllers/ReportController.php | 8 +- .../Controllers/Rule/CreateController.php | 4 +- app/Http/Controllers/Rule/EditController.php | 2 +- app/Http/Controllers/Rule/IndexController.php | 4 +- .../Controllers/Rule/SelectController.php | 10 +- .../RuleGroup/CreateController.php | 2 +- .../RuleGroup/DeleteController.php | 2 +- app/Http/Controllers/TagController.php | 4 +- .../Transaction/BulkController.php | 10 +- .../Transaction/ConvertController.php | 22 +- .../Transaction/CreateController.php | 6 +- .../Transaction/DeleteController.php | 4 +- .../Transaction/EditController.php | 10 +- .../Transaction/IndexController.php | 2 +- .../Transaction/LinkController.php | 2 +- .../Transaction/MassController.php | 8 +- app/Http/Middleware/Binder.php | 2 +- app/Http/Middleware/Installer.php | 3 + app/Http/Middleware/InterestingMessage.php | 102 ++-- app/Http/Middleware/IsDemoUser.php | 2 +- app/Http/Requests/AccountFormRequest.php | 2 +- app/Http/Requests/ObjectGroupFormRequest.php | 2 +- .../Requests/ReconciliationStoreRequest.php | 2 +- app/Http/Requests/TestRuleFormRequest.php | 2 +- app/Jobs/MailError.php | 4 +- app/Models/Account.php | 2 +- app/Models/Attachment.php | 2 +- app/Models/AvailableBudget.php | 24 +- app/Models/Bill.php | 2 +- app/Models/Budget.php | 2 +- app/Models/BudgetLimit.php | 26 +- app/Models/Category.php | 2 +- app/Models/CurrencyExchangeRate.php | 26 +- app/Models/LinkType.php | 6 +- app/Models/ObjectGroup.php | 2 +- app/Models/PiggyBank.php | 10 +- app/Models/PiggyBankEvent.php | 18 +- app/Models/Recurrence.php | 2 +- app/Models/RecurrenceRepetition.php | 20 +- app/Models/RecurrenceTransaction.php | 40 +- app/Models/Rule.php | 2 +- app/Models/RuleAction.php | 16 +- app/Models/RuleGroup.php | 26 +- app/Models/RuleTrigger.php | 16 +- app/Models/Tag.php | 2 +- app/Models/Transaction.php | 52 +- app/Models/TransactionCurrency.php | 6 +- app/Models/TransactionGroup.php | 2 +- app/Models/TransactionJournal.php | 55 +- app/Models/TransactionJournalLink.php | 28 +- app/Models/Webhook.php | 4 +- app/Providers/EventServiceProvider.php | 8 +- .../Account/AccountRepository.php | 107 ++-- .../Account/AccountRepositoryInterface.php | 28 +- .../Account/OperationsRepositoryInterface.php | 36 +- app/Repositories/Bill/BillRepository.php | 5 +- app/Repositories/Budget/BudgetRepository.php | 84 +-- .../Budget/OperationsRepository.php | 22 +- .../Category/CategoryRepository.php | 24 +- .../Category/CategoryRepositoryInterface.php | 18 +- .../Category/NoCategoryRepository.php | 1 + .../NoCategoryRepositoryInterface.php | 1 + .../Category/OperationsRepository.php | 5 +- .../Journal/JournalAPIRepository.php | 4 +- .../Journal/JournalCLIRepository.php | 9 +- .../Journal/JournalRepository.php | 33 +- .../Journal/JournalRepositoryInterface.php | 14 +- .../LinkType/LinkTypeRepository.php | 20 +- .../LinkType/LinkTypeRepositoryInterface.php | 14 +- .../PiggyBank/ModifiesPiggyBanks.php | 2 +- .../PiggyBank/PiggyBankRepository.php | 21 +- .../PiggyBankRepositoryInterface.php | 14 +- .../Recurring/RecurringRepository.php | 16 +- .../RecurringRepositoryInterface.php | 9 +- .../RuleGroup/RuleGroupRepository.php | 26 +- .../RuleGroupRepositoryInterface.php | 18 +- app/Repositories/Tag/TagRepository.php | 20 +- .../Tag/TagRepositoryInterface.php | 14 +- .../TransactionGroupRepository.php | 6 +- app/Repositories/User/UserRepository.php | 20 +- .../User/UserRepositoryInterface.php | 14 +- app/Rules/IsDateOrTime.php | 4 +- app/Rules/IsDuplicateTransaction.php | 1 + app/Rules/IsTransferAccount.php | 1 + app/Rules/IsValidAttachmentModel.php | 1 + app/Rules/IsValidBulkClause.php | 21 +- app/Rules/LessThanPiggyTarget.php | 1 + app/Rules/UniqueAccountNumber.php | 4 +- app/Rules/UniqueIban.php | 4 +- app/Rules/ValidJournals.php | 1 + app/Rules/ValidRecurrenceRepetitionValue.php | 1 + .../Destroy/AccountDestroyService.php | 2 +- .../Internal/Support/AccountServiceTrait.php | 563 +++++++++--------- .../Internal/Support/BillServiceTrait.php | 7 +- .../Support/CreditRecalculateService.php | 101 ++-- .../Internal/Support/JournalServiceTrait.php | 10 +- .../Internal/Support/TransactionTypeTrait.php | 4 +- .../Internal/Update/AccountUpdateService.php | 5 +- .../Internal/Update/CategoryUpdateService.php | 2 + .../Internal/Update/GroupCloneService.php | 1 + .../Internal/Update/JournalUpdateService.php | 30 +- .../Update/RecurrenceUpdateService.php | 6 +- app/Support/Amount.php | 14 +- .../Authentication/RemoteUserGuard.php | 1 + .../Authentication/RemoteUserProvider.php | 7 +- app/Support/Binder/AccountList.php | 2 +- app/Support/Binder/BudgetList.php | 2 +- app/Support/Binder/CategoryList.php | 2 +- app/Support/Binder/DynamicConfigKey.php | 14 +- app/Support/Binder/EitherConfigKey.php | 33 +- app/Support/Binder/JournalList.php | 3 +- .../Category/FrontpageChartGenerator.php | 1 + .../Category/WholePeriodChartGenerator.php | 8 +- app/Support/Cronjobs/AbstractCronjob.php | 12 +- app/Support/Cronjobs/AutoBudgetCronjob.php | 4 +- app/Support/Cronjobs/RecurringCronjob.php | 2 +- app/Support/Export/ExportDataGenerator.php | 7 +- app/Support/FireflyConfig.php | 86 +-- app/Support/Form/AccountForm.php | 6 +- app/Support/Form/CurrencyForm.php | 10 +- app/Support/Form/PiggyBankForm.php | 5 +- app/Support/Form/RuleForm.php | 3 +- app/Support/Http/Controllers/AugumentData.php | 5 +- .../Http/Controllers/ChartGeneration.php | 10 +- app/Support/Http/Controllers/CreateStuff.php | 6 +- .../Http/Controllers/DateCalculation.php | 7 +- .../Http/Controllers/GetConfigurationData.php | 4 +- .../Http/Controllers/ModelInformation.php | 4 +- .../Http/Controllers/PeriodOverview.php | 13 +- .../Http/Controllers/RenderPartialViews.php | 11 +- .../Http/Controllers/RequestInformation.php | 43 +- .../Http/Controllers/RuleManagement.php | 4 +- .../Http/Controllers/UserNavigation.php | 2 +- app/Support/Navigation.php | 148 ++--- app/Support/NullArrayObject.php | 2 + app/Support/ParseDateString.php | 376 ++++++------ app/Support/Preferences.php | 202 +++---- .../Category/CategoryReportGenerator.php | 1 + .../Recurring/CalculateRangeOccurrences.php | 2 + .../Recurring/CalculateXOccurrences.php | 5 + .../Recurring/CalculateXOccurrencesSince.php | 5 + app/Support/Request/ConvertsDataTypes.php | 50 +- app/Support/Search/AccountSearch.php | 11 +- app/Support/Search/GenericSearchInterface.php | 1 + app/Support/Search/OperatorQuerySearch.php | 19 +- app/Support/Search/SearchInterface.php | 10 +- app/Support/Steam.php | 242 ++++---- app/Support/Twig/AmountFormat.php | 2 +- app/Support/Twig/General.php | 2 +- app/Support/Twig/Translation.php | 2 +- .../Actions/ConvertToTransfer.php | 2 +- .../Actions/ConvertToWithdrawal.php | 2 +- .../Actions/SetSourceAccount.php | 4 +- .../Actions/UpdatePiggybank.php | 6 +- .../Engine/SearchRuleEngine.php | 264 ++++---- app/Transformers/AccountTransformer.php | 10 +- app/Transformers/AttachmentTransformer.php | 1 + .../AvailableBudgetTransformer.php | 2 +- app/Transformers/BudgetLimitTransformer.php | 2 +- app/Transformers/BudgetTransformer.php | 1 + app/Transformers/CategoryTransformer.php | 1 + app/Transformers/LinkTypeTransformer.php | 1 + app/Transformers/ObjectGroupTransformer.php | 1 + .../PiggyBankEventTransformer.php | 1 + app/Transformers/PiggyBankTransformer.php | 2 + app/Transformers/PreferenceTransformer.php | 1 + app/Transformers/RecurrenceTransformer.php | 2 +- app/Transformers/RuleTransformer.php | 1 + app/Transformers/TagTransformer.php | 3 +- .../TransactionLinkTransformer.php | 1 + app/Transformers/UserTransformer.php | 1 + .../WebhookAttemptTransformer.php | 1 + app/User.php | 243 ++++---- app/Validation/Account/DepositValidation.php | 32 +- .../Account/LiabilityValidation.php | 50 +- app/Validation/Account/OBValidation.php | 14 +- app/Validation/Account/TransferValidation.php | 32 +- .../Account/WithdrawalValidation.php | 32 +- app/Validation/AccountValidator.php | 32 +- .../Bulk/ValidatesBulkTransactionQuery.php | 3 +- .../AutoBudget/ValidatesAutoBudgetRequest.php | 1 + app/Validation/FireflyValidator.php | 3 +- app/Validation/GroupValidation.php | 14 +- app/Validation/TransactionValidation.php | 2 +- 344 files changed, 2776 insertions(+), 2605 deletions(-) diff --git a/app/Api/V1/Controllers/Autocomplete/CurrencyController.php b/app/Api/V1/Controllers/Autocomplete/CurrencyController.php index a9d6d11cc4..4d1f508d67 100644 --- a/app/Api/V1/Controllers/Autocomplete/CurrencyController.php +++ b/app/Api/V1/Controllers/Autocomplete/CurrencyController.php @@ -88,8 +88,9 @@ class CurrencyController extends Controller * https://api-docs.firefly-iii.org/#/autocomplete/getCurrenciesCodeAC * * @param AutocompleteRequest $request - * @deprecated + * * @return JsonResponse + * @deprecated */ public function currenciesWithCode(AutocompleteRequest $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php b/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php index 61d9ba3dc0..e4328a62ef 100644 --- a/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php +++ b/app/Api/V1/Controllers/Autocomplete/ObjectGroupController.php @@ -58,6 +58,7 @@ class ObjectGroupController extends Controller /** * Documentation for this endpoint is at: * https://api-docs.firefly-iii.org/#/autocomplete/getObjectGroupsAC + * * @param AutocompleteRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php index 7fd8b1864e..27a2a07101 100644 --- a/app/Api/V1/Controllers/Chart/AccountController.php +++ b/app/Api/V1/Controllers/Chart/AccountController.php @@ -105,9 +105,9 @@ class AccountController extends Controller foreach ($accounts as $account) { $currency = $this->repository->getAccountCurrency($account); if (null === $currency) { - $currency = $default; + $currency = $default; } - $currentSet = [ + $currentSet = [ 'label' => $account->name, 'currency_id' => (string)$currency->id, 'currency_code' => $currency->code, diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.php index 5fb3a330dc..9fdc689b61 100644 --- a/app/Api/V1/Controllers/Controller.php +++ b/app/Api/V1/Controllers/Controller.php @@ -46,8 +46,8 @@ abstract class Controller extends BaseController use AuthorizesRequests, DispatchesJobs, ValidatesRequests; protected const CONTENT_TYPE = 'application/vnd.api+json'; - protected ParameterBag $parameters; protected array $allowedSort; + protected ParameterBag $parameters; /** * Controller constructor. @@ -92,7 +92,7 @@ abstract class Controller extends BaseController if (null !== $date) { try { $obj = Carbon::parse($date); - } catch (InvalidDateException|InvalidFormatException $e) { + } catch (InvalidDateException | InvalidFormatException $e) { // don't care Log::error(sprintf('Invalid date exception in API controller: %s', $e->getMessage())); } diff --git a/app/Api/V1/Controllers/Data/Bulk/AccountController.php b/app/Api/V1/Controllers/Data/Bulk/AccountController.php index 3508c9393e..a1fa0fa6a5 100644 --- a/app/Api/V1/Controllers/Data/Bulk/AccountController.php +++ b/app/Api/V1/Controllers/Data/Bulk/AccountController.php @@ -58,10 +58,11 @@ class AccountController extends Controller /** * This endpoint is deprecated and not documented. - * @deprecated + * * @param MoveTransactionsRequest $request * * @return JsonResponse + * @deprecated */ public function moveTransactions(MoveTransactionsRequest $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Data/Export/ExportController.php b/app/Api/V1/Controllers/Data/Export/ExportController.php index 781f118768..58e1ab5090 100644 --- a/app/Api/V1/Controllers/Data/Export/ExportController.php +++ b/app/Api/V1/Controllers/Data/Export/ExportController.php @@ -78,9 +78,9 @@ class ExportController extends Controller */ private function returnExport(string $key): LaravelResponse { - $date = date('Y-m-d-H-i-s'); + $date = date('Y-m-d-H-i-s'); $fileName = sprintf('%s-export-%s.csv', $date, $key); - $data = $this->exporter->export(); + $data = $this->exporter->export(); /** @var LaravelResponse $response */ $response = response($data[$key]); diff --git a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php b/app/Api/V1/Controllers/Insight/Transfer/AccountController.php index 141daf143e..19dc00a0fc 100644 --- a/app/Api/V1/Controllers/Insight/Transfer/AccountController.php +++ b/app/Api/V1/Controllers/Insight/Transfer/AccountController.php @@ -71,6 +71,7 @@ class AccountController extends Controller $end = $request->getEnd(); $assetAccounts = $request->getAssetAccounts(); $transfers = $this->opsRepository->sumTransfers($start, $end, $assetAccounts); + return response()->json($transfers); } } diff --git a/app/Api/V1/Controllers/Models/Account/ShowController.php b/app/Api/V1/Controllers/Models/Account/ShowController.php index 71d3c53803..a5650ebf23 100644 --- a/app/Api/V1/Controllers/Models/Account/ShowController.php +++ b/app/Api/V1/Controllers/Models/Account/ShowController.php @@ -84,7 +84,7 @@ class ShowController extends Controller $this->parameters->set('type', $type); // types to get, page size: - $types = $this->mapAccountTypes($this->parameters->get('type')); + $types = $this->mapAccountTypes($this->parameters->get('type')); $pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data; // get list of accounts. Count it and split it. @@ -95,7 +95,7 @@ class ShowController extends Controller // continue sort: - $accounts = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); + $accounts = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); // make paginator: $paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page')); diff --git a/app/Api/V1/Controllers/Models/Account/UpdateController.php b/app/Api/V1/Controllers/Models/Account/UpdateController.php index 65221bbeda..49a6f2c794 100644 --- a/app/Api/V1/Controllers/Models/Account/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Account/UpdateController.php @@ -74,10 +74,10 @@ class UpdateController extends Controller public function update(UpdateRequest $request, Account $account): JsonResponse { Log::debug(sprintf('Now in %s', __METHOD__)); - $data = $request->getUpdateData(); + $data = $request->getUpdateData(); $data['type'] = config('firefly.shortNamesByFullName.' . $account->accountType->type); - $account = $this->repository->update($account, $data); - $manager = $this->getManager(); + $account = $this->repository->update($account, $data); + $manager = $this->getManager(); $account->refresh(); Preferences::mark(); diff --git a/app/Api/V1/Controllers/Models/Attachment/DestroyController.php b/app/Api/V1/Controllers/Models/Attachment/DestroyController.php index 3fad5d77bd..bbf72975d9 100644 --- a/app/Api/V1/Controllers/Models/Attachment/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Attachment/DestroyController.php @@ -49,7 +49,7 @@ class DestroyController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->repository = app(AttachmentRepositoryInterface::class); $this->repository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/Attachment/UpdateController.php b/app/Api/V1/Controllers/Models/Attachment/UpdateController.php index f5d350b1e4..fda955b2bf 100644 --- a/app/Api/V1/Controllers/Models/Attachment/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Attachment/UpdateController.php @@ -52,7 +52,7 @@ class UpdateController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->repository = app(AttachmentRepositoryInterface::class); $this->repository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php b/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php index 0297e839c7..8eda2dda48 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/DestroyController.php @@ -47,7 +47,7 @@ class DestroyController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->abRepository = app(AvailableBudgetRepositoryInterface::class); $this->abRepository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/Bill/StoreController.php b/app/Api/V1/Controllers/Models/Bill/StoreController.php index 4383e8279c..d3bfd2cc04 100644 --- a/app/Api/V1/Controllers/Models/Bill/StoreController.php +++ b/app/Api/V1/Controllers/Models/Bill/StoreController.php @@ -69,8 +69,8 @@ class StoreController extends Controller */ public function store(StoreRequest $request): JsonResponse { - $data = $request->getAll(); - $bill = $this->repository->store($data); + $data = $request->getAll(); + $bill = $this->repository->store($data); $manager = $this->getManager(); /** @var BillTransformer $transformer */ diff --git a/app/Api/V1/Controllers/Models/Bill/UpdateController.php b/app/Api/V1/Controllers/Models/Bill/UpdateController.php index f61e6e3b28..23e1e92cdf 100644 --- a/app/Api/V1/Controllers/Models/Bill/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Bill/UpdateController.php @@ -66,8 +66,8 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, Bill $bill): JsonResponse { - $data = $request->getAll(); - $bill = $this->repository->update($bill, $data); + $data = $request->getAll(); + $bill = $this->repository->update($bill, $data); $manager = $this->getManager(); /** @var BillTransformer $transformer */ diff --git a/app/Api/V1/Controllers/Models/Budget/ShowController.php b/app/Api/V1/Controllers/Models/Budget/ShowController.php index e6a9020fb6..bfe12fcc3d 100644 --- a/app/Api/V1/Controllers/Models/Budget/ShowController.php +++ b/app/Api/V1/Controllers/Models/Budget/ShowController.php @@ -53,7 +53,7 @@ class ShowController extends Controller parent::__construct(); $this->middleware( function ($request, $next) { - $this->repository = app(BudgetRepositoryInterface::class); + $this->repository = app(BudgetRepositoryInterface::class); $this->blRepository = app(BudgetLimitRepositoryInterface::class); $this->repository->setUser(auth()->user()); $this->blRepository->setUser(auth()->user()); diff --git a/app/Api/V1/Controllers/Models/Category/UpdateController.php b/app/Api/V1/Controllers/Models/Category/UpdateController.php index ddfdf9f653..1c1975a8d4 100644 --- a/app/Api/V1/Controllers/Models/Category/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Category/UpdateController.php @@ -66,9 +66,9 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, Category $category): JsonResponse { - $data = $request->getAll(); + $data = $request->getAll(); $category = $this->repository->update($category, $data); - $manager = $this->getManager(); + $manager = $this->getManager(); /** @var CategoryTransformer $transformer */ $transformer = app(CategoryTransformer::class); diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php b/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php index fa580b6ffc..0fc6447f84 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php @@ -47,7 +47,7 @@ class DestroyController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->repository = app(ObjectGroupRepositoryInterface::class); $this->repository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php index b3c3f8e603..7b3db64c16 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php @@ -53,7 +53,7 @@ class ListController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->repository = app(ObjectGroupRepositoryInterface::class); $this->repository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php b/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php index 85b5e89e96..4f60d9b37e 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php @@ -50,7 +50,7 @@ class UpdateController extends Controller $this->middleware( function ($request, $next) { /** @var User $user */ - $user = auth()->user(); + $user = auth()->user(); $this->repository = app(ObjectGroupRepositoryInterface::class); $this->repository->setUser($user); diff --git a/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php b/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php index b7afab8caa..a48678d439 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php @@ -66,7 +66,7 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, PiggyBank $piggyBank): JsonResponse { - $data = $request->getAll(); + $data = $request->getAll(); $piggyBank = $this->repository->update($piggyBank, $data); if (array_key_exists('current_amount', $data) && '' !== $data['current_amount']) { diff --git a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php index 7573abedd2..fdf2ce0761 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php @@ -66,9 +66,9 @@ class StoreController extends Controller */ public function store(StoreRequest $request): JsonResponse { - $data = $request->getAll(); + $data = $request->getAll(); $recurrence = $this->repository->store($data); - $manager = $this->getManager(); + $manager = $this->getManager(); /** @var RecurrenceTransformer $transformer */ $transformer = app(RecurrenceTransformer::class); diff --git a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php index b67a34b634..2df4087347 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php @@ -66,9 +66,9 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, Recurrence $recurrence): JsonResponse { - $data = $request->getAll(); + $data = $request->getAll(); $recurrence = $this->repository->update($recurrence, $data); - $manager = $this->getManager(); + $manager = $this->getManager(); /** @var RecurrenceTransformer $transformer */ $transformer = app(RecurrenceTransformer::class); diff --git a/app/Api/V1/Controllers/Models/Rule/StoreController.php b/app/Api/V1/Controllers/Models/Rule/StoreController.php index 5f46fd8d90..a51870c668 100644 --- a/app/Api/V1/Controllers/Models/Rule/StoreController.php +++ b/app/Api/V1/Controllers/Models/Rule/StoreController.php @@ -68,7 +68,7 @@ class StoreController extends Controller */ public function store(StoreRequest $request): JsonResponse { - $rule = $this->ruleRepository->store($request->getAll()); + $rule = $this->ruleRepository->store($request->getAll()); $manager = $this->getManager(); /** @var RuleTransformer $transformer */ $transformer = app(RuleTransformer::class); diff --git a/app/Api/V1/Controllers/Models/Rule/UpdateController.php b/app/Api/V1/Controllers/Models/Rule/UpdateController.php index 174226934d..28a25fe7d4 100644 --- a/app/Api/V1/Controllers/Models/Rule/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Rule/UpdateController.php @@ -70,8 +70,8 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, Rule $rule): JsonResponse { - $data = $request->getAll(); - $rule = $this->ruleRepository->update($rule, $data); + $data = $request->getAll(); + $rule = $this->ruleRepository->update($rule, $data); $manager = $this->getManager(); /** @var RuleTransformer $transformer */ diff --git a/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php b/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php index 56ce1cdaf8..cb1319368e 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php @@ -38,7 +38,7 @@ use League\Fractal\Resource\Item; class StoreController extends Controller { - private AccountRepositoryInterface $accountRepository; + private AccountRepositoryInterface $accountRepository; private RuleGroupRepositoryInterface $ruleGroupRepository; /** diff --git a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php index 8b332a0e79..31fccaca88 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Api\V1\Controllers\Models\RuleGroup; +use Exception; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Models\RuleGroup\TestRequest; use FireflyIII\Api\V1\Requests\Models\RuleGroup\TriggerRequest; @@ -36,7 +37,6 @@ use Illuminate\Http\JsonResponse; use Illuminate\Pagination\LengthAwarePaginator; use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Resource\Collection as FractalCollection; -use Exception; /** * Class TriggerController diff --git a/app/Api/V1/Controllers/Models/Tag/StoreController.php b/app/Api/V1/Controllers/Models/Tag/StoreController.php index bceb8e045d..fd8346887f 100644 --- a/app/Api/V1/Controllers/Models/Tag/StoreController.php +++ b/app/Api/V1/Controllers/Models/Tag/StoreController.php @@ -68,7 +68,7 @@ class StoreController extends Controller */ public function store(StoreRequest $request): JsonResponse { - $rule = $this->repository->store($request->getAll()); + $rule = $this->repository->store($request->getAll()); $manager = $this->getManager(); /** @var TagTransformer $transformer */ $transformer = app(TagTransformer::class); diff --git a/app/Api/V1/Controllers/Models/Tag/UpdateController.php b/app/Api/V1/Controllers/Models/Tag/UpdateController.php index 68540de27f..5bc869d5b3 100644 --- a/app/Api/V1/Controllers/Models/Tag/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Tag/UpdateController.php @@ -70,7 +70,7 @@ class UpdateController extends Controller */ public function update(UpdateRequest $request, Tag $tag): JsonResponse { - $rule = $this->repository->update($tag, $request->getAll()); + $rule = $this->repository->update($tag, $request->getAll()); $manager = $this->getManager(); /** @var TagTransformer $transformer */ $transformer = app(TagTransformer::class); diff --git a/app/Api/V1/Controllers/Models/Transaction/StoreController.php b/app/Api/V1/Controllers/Models/Transaction/StoreController.php index 03a866b8d5..486c2eb7e6 100644 --- a/app/Api/V1/Controllers/Models/Transaction/StoreController.php +++ b/app/Api/V1/Controllers/Models/Transaction/StoreController.php @@ -94,16 +94,16 @@ class StoreController extends Controller $validator = Validator::make( ['transactions' => [['description' => $e->getMessage()]]], ['transactions.0.description' => new IsDuplicateTransaction] ); - throw new ValidationException($validator,0, $e); + throw new ValidationException($validator, 0, $e); } catch (FireflyException $e) { Log::warning('Caught an exception. Return error message.'); Log::error($e->getMessage()); $message = sprintf('Internal exception: %s', $e->getMessage()); $validator = Validator::make(['transactions' => [['description' => $message]]], ['transactions.0.description' => new IsDuplicateTransaction]); - throw new ValidationException($validator,0, $e); + throw new ValidationException($validator, 0, $e); } app('preferences')->mark(); - $applyRules = $data['apply_rules'] ?? true; + $applyRules = $data['apply_rules'] ?? true; $fireWebhooks = $data['fire_webhooks'] ?? true; event(new StoredTransactionGroup($transactionGroup, $applyRules, $fireWebhooks)); diff --git a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php index 2741dfaccc..7363895779 100644 --- a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php @@ -80,7 +80,7 @@ class UpdateController extends Controller $manager = $this->getManager(); app('preferences')->mark(); - $applyRules = $data['apply_rules'] ?? true; + $applyRules = $data['apply_rules'] ?? true; $fireWebhooks = $data['fire_webhooks'] ?? true; event(new UpdatedTransactionGroup($transactionGroup, $applyRules, $fireWebhooks)); @@ -98,7 +98,7 @@ class UpdateController extends Controller $selectedGroup = $collector->getGroups()->first(); if (null === $selectedGroup) { - throw new NotFoundHttpException(); + throw new NotFoundHttpException(); } /** @var TransactionGroupTransformer $transformer */ $transformer = app(TransactionGroupTransformer::class); diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php index f933b068b5..e22ee27ecc 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php @@ -50,7 +50,7 @@ class DestroyController extends Controller parent::__construct(); $this->middleware( function ($request, $next) { - $this->repository = app(CurrencyRepositoryInterface::class); + $this->repository = app(CurrencyRepositoryInterface::class); $this->userRepository = app(UserRepositoryInterface::class); $this->repository->setUser(auth()->user()); @@ -75,13 +75,13 @@ class DestroyController extends Controller if (!$this->userRepository->hasRole($admin, 'owner')) { // access denied: - throw new FireflyException('200005: You need the "owner" role to do this.'); + throw new FireflyException('200005: You need the "owner" role to do this.'); } if ($this->repository->currencyInUse($currency)) { - throw new FireflyException('200006: Currency in use.'); + throw new FireflyException('200006: Currency in use.'); } if ($this->repository->isFallbackCurrency($currency)) { - throw new FireflyException('200026: Currency is fallback.'); + throw new FireflyException('200026: Currency is fallback.'); } $this->repository->destroy($currency); diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php index 0a7f12f85e..5f50d1886b 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php @@ -26,6 +26,7 @@ namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\UpdateRequest; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; @@ -33,6 +34,7 @@ use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Transformers\CurrencyTransformer; use Illuminate\Http\JsonResponse; +use JsonException; use League\Fractal\Resource\Item; /** @@ -126,7 +128,7 @@ class UpdateController extends Controller * @param TransactionCurrency $currency * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException * @codeCoverageIgnore */ public function makeDefault(TransactionCurrency $currency): JsonResponse @@ -157,8 +159,8 @@ class UpdateController extends Controller * @param TransactionCurrency $currency * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse { diff --git a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php index 7eb31482f6..c24ac20190 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php @@ -84,8 +84,8 @@ class ShowController extends Controller $linkType = $this->repository->findByName($name); // get list of transaction links. Count it and split it. - $collection = $this->repository->getJournalLinks($linkType); - $count = $collection->count(); + $collection = $this->repository->getJournalLinks($linkType); + $count = $collection->count(); $journalLinks = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); // make paginator: diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php index 087eeae6fd..f7917138e9 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php @@ -80,7 +80,7 @@ class StoreController extends Controller $admin = auth()->user(); if (!$this->userRepository->hasRole($admin, 'owner')) { - throw new FireflyException('200005: You need the "owner" role to do this.'); + throw new FireflyException('200005: You need the "owner" role to do this.'); } $data = $request->getAll(); // if currency ID is 0, find the currency by the code: diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php index d97d6a355a..5ed66ec7e9 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php @@ -86,7 +86,7 @@ class UpdateController extends Controller $admin = auth()->user(); if (!$this->userRepository->hasRole($admin, 'owner')) { - throw new FireflyException('200005: You need the "owner" role to do this.'); + throw new FireflyException('200005: You need the "owner" role to do this.'); } $data = $request->getAll(); diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php index c15d499943..885175837c 100644 --- a/app/Api/V1/Controllers/System/ConfigurationController.php +++ b/app/Api/V1/Controllers/System/ConfigurationController.php @@ -162,7 +162,7 @@ class ConfigurationController extends Controller public function update(UpdateRequest $request, string $name): JsonResponse { if (!$this->repository->hasRole(auth()->user(), 'owner')) { - throw new FireflyException('200005: You need the "owner" role to do this.'); + throw new FireflyException('200005: You need the "owner" role to do this.'); } $data = $request->getAll(); $shortName = str_replace('configuration.', '', $name); diff --git a/app/Api/V1/Controllers/System/UserController.php b/app/Api/V1/Controllers/System/UserController.php index 96574b45f1..368359afe9 100644 --- a/app/Api/V1/Controllers/System/UserController.php +++ b/app/Api/V1/Controllers/System/UserController.php @@ -83,7 +83,7 @@ class UserController extends Controller return response()->json([], 204); } - throw new FireflyException('200025: No access to function.'); + throw new FireflyException('200025: No access to function.'); } /** diff --git a/app/Api/V1/Controllers/Webhook/ShowController.php b/app/Api/V1/Controllers/Webhook/ShowController.php index 9707cc326b..cfa77aef1e 100644 --- a/app/Api/V1/Controllers/Webhook/ShowController.php +++ b/app/Api/V1/Controllers/Webhook/ShowController.php @@ -67,11 +67,11 @@ class ShowController extends Controller */ public function index(): JsonResponse { - $manager = $this->getManager(); + $manager = $this->getManager(); $collection = $this->repository->all(); - $pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data; - $count = $collection->count(); - $webhooks = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); + $pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data; + $count = $collection->count(); + $webhooks = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize); // make paginator: $paginator = new LengthAwarePaginator($webhooks, $count, $pageSize, $this->parameters->get('page')); diff --git a/app/Api/V1/Controllers/Webhook/StoreController.php b/app/Api/V1/Controllers/Webhook/StoreController.php index 9db3f162c7..ffd6c292d0 100644 --- a/app/Api/V1/Controllers/Webhook/StoreController.php +++ b/app/Api/V1/Controllers/Webhook/StoreController.php @@ -61,7 +61,7 @@ class StoreController extends Controller */ public function store(CreateRequest $request): JsonResponse { - $data = $request->getData(); + $data = $request->getData(); $webhook = $this->repository->store($data); $manager = $this->getManager(); /** @var WebhookTransformer $transformer */ diff --git a/app/Api/V1/Requests/Models/Account/UpdateRequest.php b/app/Api/V1/Requests/Models/Account/UpdateRequest.php index b8bcf1fa3e..d2d63e80bf 100644 --- a/app/Api/V1/Requests/Models/Account/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Account/UpdateRequest.php @@ -71,7 +71,7 @@ class UpdateRequest extends FormRequest 'currency_id' => ['currency_id', 'integer'], 'currency_code' => ['currency_code', 'string'], 'liability_direction' => ['liability_direction', 'string'], - 'liability_amount' => ['liability_amount', 'string'], + 'liability_amount' => ['liability_amount', 'string'], 'liability_start_date' => ['liability_start_date', 'date'], ]; /** @var Account $account */ diff --git a/app/Api/V1/Requests/Models/Budget/UpdateRequest.php b/app/Api/V1/Requests/Models/Budget/UpdateRequest.php index 13fe5b0176..8f9ea79f0a 100644 --- a/app/Api/V1/Requests/Models/Budget/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Budget/UpdateRequest.php @@ -78,6 +78,7 @@ class UpdateRequest extends FormRequest public function rules(): array { $budget = $this->route()->parameter('budget'); + return [ 'name' => sprintf('between:1,100|uniqueObjectForUser:budgets,name,%d', $budget->id), 'active' => [new IsBoolean], diff --git a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php index ff54dbb91e..26859034b5 100644 --- a/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/BudgetLimit/UpdateRequest.php @@ -76,7 +76,7 @@ class UpdateRequest extends FormRequest * Configure the validator instance with special rules for after the basic validation rules. * * @param Validator $validator -* See reference nr. 72 + * See reference nr. 72 * * @return void */ diff --git a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php index ec94768db2..9ce9be4676 100644 --- a/app/Api/V1/Requests/Models/Tag/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Tag/UpdateRequest.php @@ -65,7 +65,7 @@ class UpdateRequest extends FormRequest public function rules(): array { $tag = $this->route()->parameter('tagOrId'); -// See reference nr. 73 + // See reference nr. 73 $rules = [ 'tag' => 'min:1|uniqueObjectForUser:tags,tag,' . $tag->id, 'description' => 'min:1|nullable', diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php index fbdec3a18d..aec8941390 100644 --- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php @@ -53,6 +53,7 @@ class StoreRequest extends FormRequest public function getAll(): array { Log::debug('get all data in TransactionStoreRequest'); + return [ 'group_title' => $this->string('group_title'), 'error_if_duplicate_hash' => $this->boolean('error_if_duplicate_hash'), @@ -60,7 +61,7 @@ class StoreRequest extends FormRequest 'fire_webhooks' => $this->boolean('fire_webhooks', true), 'transactions' => $this->getTransactionData(), ]; -// See reference nr. 71 + // See reference nr. 71 } /** diff --git a/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php b/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php index 9b570af6f2..ad183cca80 100644 --- a/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/TransactionCurrency/UpdateRequest.php @@ -55,7 +55,7 @@ class UpdateRequest extends FormRequest ]; return $this->getAllData($fields); -// return $return; + // return $return; } /** diff --git a/app/Api/V1/Requests/System/UpdateRequest.php b/app/Api/V1/Requests/System/UpdateRequest.php index 3386d17165..17c009f9a9 100644 --- a/app/Api/V1/Requests/System/UpdateRequest.php +++ b/app/Api/V1/Requests/System/UpdateRequest.php @@ -57,7 +57,7 @@ class UpdateRequest extends FormRequest return ['value' => $this->integer('value')]; } - return ['value' => $this->string('value')]; + return ['value' => $this->string('value')]; } /** @@ -80,6 +80,6 @@ class UpdateRequest extends FormRequest return ['value' => 'required|numeric|min:464272080']; } - return ['value' => 'required']; + return ['value' => 'required']; } } diff --git a/app/Console/Commands/Correction/CorrectDatabase.php b/app/Console/Commands/Correction/CorrectDatabase.php index ee61a0bb72..6c378372f8 100644 --- a/app/Console/Commands/Correction/CorrectDatabase.php +++ b/app/Console/Commands/Correction/CorrectDatabase.php @@ -76,7 +76,7 @@ class CorrectDatabase extends Command 'firefly-iii:fix-recurring-transactions', 'firefly-iii:restore-oauth-keys', 'firefly-iii:fix-transaction-types', - 'firefly-iii:fix-frontpage-accounts' + 'firefly-iii:fix-frontpage-accounts', ]; foreach ($commands as $command) { $this->line(sprintf('Now executing %s', $command)); diff --git a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php index 114353aff9..359930b51a 100644 --- a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php +++ b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php @@ -106,7 +106,7 @@ class DeleteOrphanedTransactions extends Command private function deleteFromOrphanedAccounts(): void { $set - = Transaction + = Transaction ::leftJoin('accounts', 'transactions.account_id', '=', 'accounts.id') ->whereNotNull('accounts.deleted_at') ->get(['transactions.*']); diff --git a/app/Console/Commands/Correction/DeleteZeroAmount.php b/app/Console/Commands/Correction/DeleteZeroAmount.php index 28ff944370..6ff620ce97 100644 --- a/app/Console/Commands/Correction/DeleteZeroAmount.php +++ b/app/Console/Commands/Correction/DeleteZeroAmount.php @@ -53,9 +53,9 @@ class DeleteZeroAmount extends Command */ public function handle(): int { - $start = microtime(true); - $set = Transaction::where('amount', 0)->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray(); - $set = array_unique($set); + $start = microtime(true); + $set = Transaction::where('amount', 0)->get(['transaction_journal_id'])->pluck('transaction_journal_id')->toArray(); + $set = array_unique($set); $journals = TransactionJournal::whereIn('id', $set)->get(); /** @var TransactionJournal $journal */ foreach ($journals as $journal) { diff --git a/app/Console/Commands/Correction/EnableCurrencies.php b/app/Console/Commands/Correction/EnableCurrencies.php index d88c66bc04..b0046ee6fa 100644 --- a/app/Console/Commands/Correction/EnableCurrencies.php +++ b/app/Console/Commands/Correction/EnableCurrencies.php @@ -85,8 +85,8 @@ class EnableCurrencies extends Command $found[] = (int)$entry->transaction_currency_id; } - $found = array_values(array_unique($found)); - $found = array_values( + $found = array_values(array_unique($found)); + $found = array_values( array_filter( $found, function (int $currencyId) { return $currencyId !== 0; diff --git a/app/Console/Commands/Correction/FixPiggies.php b/app/Console/Commands/Correction/FixPiggies.php index 692493123b..22ea9c0967 100644 --- a/app/Console/Commands/Correction/FixPiggies.php +++ b/app/Console/Commands/Correction/FixPiggies.php @@ -57,7 +57,7 @@ class FixPiggies extends Command { $count = 0; $start = microtime(true); - $set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get(); + $set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get(); /** @var PiggyBankEvent $event */ foreach ($set as $event) { diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php index eec112169d..0b1862e295 100644 --- a/app/Console/Commands/Correction/FixPostgresSequences.php +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -125,7 +125,7 @@ class FixPostgresSequences extends Command $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); - if(null === $nextId) { + if (null === $nextId) { $this->line(sprintf('nextval is NULL for table "%s", go to next table.', $tableToCheck)); continue; } diff --git a/app/Console/Commands/Correction/FixUnevenAmount.php b/app/Console/Commands/Correction/FixUnevenAmount.php index 157e955164..73deae867c 100644 --- a/app/Console/Commands/Correction/FixUnevenAmount.php +++ b/app/Console/Commands/Correction/FixUnevenAmount.php @@ -91,7 +91,7 @@ class FixUnevenAmount extends Command // one of the transactions is bad. $journal = TransactionJournal::find($param); if (!$journal) { - return; + return; } /** @var Transaction $source */ $source = $journal->transactions()->where('amount', '<', 0)->first(); diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php index 9d5f2b9d74..529758e64a 100644 --- a/app/Console/Commands/Export/ExportData.php +++ b/app/Console/Commands/Export/ExportData.php @@ -36,7 +36,6 @@ use FireflyIII\Support\Export\ExportDataGenerator; use Illuminate\Console\Command; use Illuminate\Support\Collection; use InvalidArgumentException; -use League\Csv\CannotInsertRecord; use Log; /** diff --git a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php index d849f5c02c..af7aa203c8 100644 --- a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php +++ b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php @@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands\Upgrade; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\BudgetLimit; use Illuminate\Console\Command; +use JsonException; /** * Class BudgetLimitCurrency @@ -51,7 +52,7 @@ class BudgetLimitCurrency extends Command * * @return int * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function handle(): int { @@ -106,7 +107,7 @@ class BudgetLimitCurrency extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/CCLiabilities.php b/app/Console/Commands/Upgrade/CCLiabilities.php index 4b3fb4028e..0f9f365de6 100644 --- a/app/Console/Commands/Upgrade/CCLiabilities.php +++ b/app/Console/Commands/Upgrade/CCLiabilities.php @@ -104,7 +104,7 @@ class CCLiabilities extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php index 2776779fc8..6d210b95e1 100644 --- a/app/Console/Commands/Upgrade/MigrateAttachments.php +++ b/app/Console/Commands/Upgrade/MigrateAttachments.php @@ -116,7 +116,7 @@ class MigrateAttachments extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php index 93534d2a92..698b696f28 100644 --- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php +++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php @@ -66,7 +66,7 @@ class MigrateJournalNotes extends Command } $count = 0; - $set = TransactionJournalMeta::whereName('notes')->get(); + $set = TransactionJournalMeta::whereName('notes')->get(); /** @var TransactionJournalMeta $meta */ foreach ($set as $meta) { $journal = $meta->transactionJournal; @@ -114,7 +114,7 @@ class MigrateJournalNotes extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php index 2980cc2a17..a4c74d1731 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php @@ -92,7 +92,7 @@ class MigrateRecurrenceMeta extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php index 3f30915260..ad99981512 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceType.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceType.php @@ -85,7 +85,7 @@ class MigrateRecurrenceType extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php index 765f0f874b..e5162cdbf6 100644 --- a/app/Console/Commands/Upgrade/MigrateTagLocations.php +++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php @@ -83,7 +83,7 @@ class MigrateTagLocations extends Command return (bool)$configVar->data; } - return false; + return false; } private function migrateTagLocations(): void diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index 8f537ecdf8..dcf11e2cca 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -137,7 +137,7 @@ class MigrateToGroups extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/MigrateToRules.php b/app/Console/Commands/Upgrade/MigrateToRules.php index 364cb64df0..25f96d8c6e 100644 --- a/app/Console/Commands/Upgrade/MigrateToRules.php +++ b/app/Console/Commands/Upgrade/MigrateToRules.php @@ -128,7 +128,7 @@ class MigrateToRules extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php index 30fc3efe17..e0f86f27fe 100644 --- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php @@ -123,7 +123,7 @@ class OtherCurrenciesCorrections extends Command return (bool)$configVar->data; } - return false; + return false; } /** @@ -248,10 +248,10 @@ class OtherCurrenciesCorrections extends Command { $accountId = $account->id; if (array_key_exists($accountId, $this->accountCurrencies) && 0 === $this->accountCurrencies[$accountId]) { - return null; + return null; } if (array_key_exists($accountId, $this->accountCurrencies) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) { - return $this->accountCurrencies[$accountId]; + return $this->accountCurrencies[$accountId]; } $currency = $this->accountRepos->getAccountCurrency($account); if (null === $currency) { diff --git a/app/Console/Commands/Upgrade/RenameAccountMeta.php b/app/Console/Commands/Upgrade/RenameAccountMeta.php index c1a6aee640..24340ff75c 100644 --- a/app/Console/Commands/Upgrade/RenameAccountMeta.php +++ b/app/Console/Commands/Upgrade/RenameAccountMeta.php @@ -107,7 +107,7 @@ class RenameAccountMeta extends Command return (bool)$configVar->data; } - return false; + return false; } /** diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php index 90634bf560..5ec7c1a576 100644 --- a/app/Console/Commands/Upgrade/TransactionIdentifier.php +++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php @@ -191,6 +191,7 @@ class TransactionIdentifier extends Command return null; } + return $opposing; } diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 37f94051a4..52c9316f3f 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Console\Commands\Upgrade; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionCurrency; @@ -132,7 +133,7 @@ class TransferCurrenciesCorrections extends Command /** * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function isExecuted(): bool { @@ -141,7 +142,7 @@ class TransferCurrenciesCorrections extends Command return (bool)$configVar->data; } - return false; + return false; } /** @@ -271,10 +272,10 @@ class TransferCurrenciesCorrections extends Command { $accountId = $account->id; if (array_key_exists($accountId, $this->accountCurrencies) && 0 === $this->accountCurrencies[$accountId]) { - return null; + return null; } if (array_key_exists($accountId, $this->accountCurrencies) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) { - return $this->accountCurrencies[$accountId]; + return $this->accountCurrencies[$accountId]; } $currency = $this->accountRepos->getAccountCurrency($account); if (null === $currency) { diff --git a/app/Console/Commands/Upgrade/UpgradeDatabase.php b/app/Console/Commands/Upgrade/UpgradeDatabase.php index 9b6aa4c543..c94a6a6cd5 100644 --- a/app/Console/Commands/Upgrade/UpgradeDatabase.php +++ b/app/Console/Commands/Upgrade/UpgradeDatabase.php @@ -106,7 +106,7 @@ class UpgradeDatabase extends Command // instructions 'firefly:instructions update', - 'firefly-iii:verify-security-alerts' + 'firefly-iii:verify-security-alerts', ]; $args = []; if ($this->option('force')) { diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php index da7eeb5cea..d8780ddf9e 100644 --- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php +++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php @@ -92,59 +92,6 @@ class UpgradeLiabilities extends Command return false; } - /** - * @param Account $account - * @param TransactionJournal $openingBalance - */ - private function correctOpeningBalance(Account $account, TransactionJournal $openingBalance): void - { - $source = $this->getSourceTransaction($openingBalance); - $destination = $this->getDestinationTransaction($openingBalance); - if (null === $source || null === $destination) { - return; - } - // source MUST be the liability. - if ((int)$destination->account_id === (int)$account->id) { - Log::debug(sprintf('Must switch around, because account #%d is the destination.', $destination->account_id)); - // so if not, switch things around: - $sourceAccountId = (int)$source->account_id; - $source->account_id = $destination->account_id; - $destination->account_id = $sourceAccountId; - $source->save(); - $destination->save(); - Log::debug(sprintf('Source transaction #%d now has account #%d', $source->id, $source->account_id)); - Log::debug(sprintf('Dest transaction #%d now has account #%d', $destination->id, $destination->account_id)); - } - } - - /** - * @param TransactionJournal $journal - * - * @return Transaction|null - */ - private function getSourceTransaction(TransactionJournal $journal): ?Transaction - { - return $journal->transactions()->where('amount', '<', 0)->first(); - } - - /** - * @param TransactionJournal $journal - * - * @return Transaction|null - */ - private function getDestinationTransaction(TransactionJournal $journal): ?Transaction - { - return $journal->transactions()->where('amount', '>', 0)->first(); - } - - /** - * - */ - private function markAsExecuted(): void - { - app('fireflyconfig')->set(self::CONFIG_NAME, true); - } - /** * */ @@ -200,4 +147,57 @@ class UpgradeLiabilities extends Command $factory->crud($account, 'liability_direction', 'debit'); } + /** + * @param Account $account + * @param TransactionJournal $openingBalance + */ + private function correctOpeningBalance(Account $account, TransactionJournal $openingBalance): void + { + $source = $this->getSourceTransaction($openingBalance); + $destination = $this->getDestinationTransaction($openingBalance); + if (null === $source || null === $destination) { + return; + } + // source MUST be the liability. + if ((int)$destination->account_id === (int)$account->id) { + Log::debug(sprintf('Must switch around, because account #%d is the destination.', $destination->account_id)); + // so if not, switch things around: + $sourceAccountId = (int)$source->account_id; + $source->account_id = $destination->account_id; + $destination->account_id = $sourceAccountId; + $source->save(); + $destination->save(); + Log::debug(sprintf('Source transaction #%d now has account #%d', $source->id, $source->account_id)); + Log::debug(sprintf('Dest transaction #%d now has account #%d', $destination->id, $destination->account_id)); + } + } + + /** + * @param TransactionJournal $journal + * + * @return Transaction|null + */ + private function getSourceTransaction(TransactionJournal $journal): ?Transaction + { + return $journal->transactions()->where('amount', '<', 0)->first(); + } + + /** + * @param TransactionJournal $journal + * + * @return Transaction|null + */ + private function getDestinationTransaction(TransactionJournal $journal): ?Transaction + { + return $journal->transactions()->where('amount', '>', 0)->first(); + } + + /** + * + */ + private function markAsExecuted(): void + { + app('fireflyconfig')->set(self::CONFIG_NAME, true); + } + } diff --git a/app/Console/Commands/VerifySecurityAlerts.php b/app/Console/Commands/VerifySecurityAlerts.php index e49872b909..c0bd37e3b8 100644 --- a/app/Console/Commands/VerifySecurityAlerts.php +++ b/app/Console/Commands/VerifySecurityAlerts.php @@ -25,14 +25,21 @@ declare(strict_types=1); namespace FireflyIII\Console\Commands; use Illuminate\Console\Command; -use Storage; +use Illuminate\Contracts\Filesystem\FileNotFoundException; use Log; +use Storage; /** * Class VerifySecurityAlerts */ class VerifySecurityAlerts extends Command { + /** + * The console command description. + * + * @var string + */ + protected $description = 'Verify security alerts'; /** * The name and signature of the console command. * @@ -40,18 +47,11 @@ class VerifySecurityAlerts extends Command */ protected $signature = 'firefly-iii:verify-security-alerts'; - /** - * The console command description. - * - * @var string - */ - protected $description = 'Verify security alerts'; - /** * Execute the console command. * * @return int - * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException + * @throws FileNotFoundException */ public function handle(): int { @@ -64,6 +64,7 @@ class VerifySecurityAlerts extends Command $disk = Storage::disk('resources'); if (!$disk->has('alerts.json')) { Log::debug('No alerts.json file present.'); + return 0; } $content = $disk->get('alerts.json'); @@ -81,6 +82,7 @@ class VerifySecurityAlerts extends Command if ('info' === $array['level']) { Log::debug('INFO level alert'); $this->info($array['message']); + return 0; } if ('warning' === $array['level']) { @@ -88,6 +90,7 @@ class VerifySecurityAlerts extends Command $this->warn('------------------------ :o'); $this->warn($array['message']); $this->warn('------------------------ :o'); + return 0; } if ('danger' === $array['level']) { @@ -95,6 +98,7 @@ class VerifySecurityAlerts extends Command $this->error('------------------------ :-('); $this->error($array['message']); $this->error('------------------------ :-('); + return 0; } diff --git a/app/Events/AdminRequestedTestMessage.php b/app/Events/AdminRequestedTestMessage.php index 821064065c..78f90858c8 100644 --- a/app/Events/AdminRequestedTestMessage.php +++ b/app/Events/AdminRequestedTestMessage.php @@ -41,6 +41,7 @@ class AdminRequestedTestMessage extends Event public $ipAddress; /** @var User The user */ public $user; + /** * Create a new event instance. * diff --git a/app/Events/DestroyedTransactionGroup.php b/app/Events/DestroyedTransactionGroup.php index baca5a78f5..09c9c66107 100644 --- a/app/Events/DestroyedTransactionGroup.php +++ b/app/Events/DestroyedTransactionGroup.php @@ -37,6 +37,7 @@ class DestroyedTransactionGroup extends Event use SerializesModels; public TransactionGroup $transactionGroup; + /** * Create a new event instance. * diff --git a/app/Events/DestroyedTransactionLink.php b/app/Events/DestroyedTransactionLink.php index fde76cf98c..1c9629f526 100644 --- a/app/Events/DestroyedTransactionLink.php +++ b/app/Events/DestroyedTransactionLink.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Events; + use FireflyIII\Models\TransactionJournalLink; use Illuminate\Queue\SerializesModels; diff --git a/app/Events/DetectedNewIPAddress.php b/app/Events/DetectedNewIPAddress.php index 231f1247d8..567bba32cc 100644 --- a/app/Events/DetectedNewIPAddress.php +++ b/app/Events/DetectedNewIPAddress.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Events; + use FireflyIII\User; use Illuminate\Queue\SerializesModels; diff --git a/app/Events/RegisteredUser.php b/app/Events/RegisteredUser.php index a8a8d59fd7..a49d099f88 100644 --- a/app/Events/RegisteredUser.php +++ b/app/Events/RegisteredUser.php @@ -40,6 +40,7 @@ class RegisteredUser extends Event public $ipAddress; /** @var User The user */ public $user; + /** * Create a new event instance. This event is triggered when a new user registers. * diff --git a/app/Events/RequestedNewPassword.php b/app/Events/RequestedNewPassword.php index 13f04ce363..1706faa15c 100644 --- a/app/Events/RequestedNewPassword.php +++ b/app/Events/RequestedNewPassword.php @@ -42,6 +42,7 @@ class RequestedNewPassword extends Event public $token; /** @var User The user */ public $user; + /** * Create a new event instance. This event is triggered when a users tries to reset his or her password. * diff --git a/app/Events/RequestedReportOnJournals.php b/app/Events/RequestedReportOnJournals.php index 8790d696aa..fc91987d1c 100644 --- a/app/Events/RequestedReportOnJournals.php +++ b/app/Events/RequestedReportOnJournals.php @@ -44,6 +44,7 @@ class RequestedReportOnJournals public $groups; /** @var int The ID of the user. */ public $userId; + /** * Create a new event instance. * diff --git a/app/Events/RequestedSendWebhookMessages.php b/app/Events/RequestedSendWebhookMessages.php index a46fb630e5..86193440c5 100644 --- a/app/Events/RequestedSendWebhookMessages.php +++ b/app/Events/RequestedSendWebhookMessages.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Events; use Illuminate\Queue\SerializesModels; + class RequestedSendWebhookMessages extends Event { use SerializesModels; diff --git a/app/Events/RequestedVersionCheckStatus.php b/app/Events/RequestedVersionCheckStatus.php index cdd1aa4d76..5bc88c617d 100644 --- a/app/Events/RequestedVersionCheckStatus.php +++ b/app/Events/RequestedVersionCheckStatus.php @@ -26,6 +26,7 @@ namespace FireflyIII\Events; use FireflyIII\User; use Illuminate\Queue\SerializesModels; + /** * Class RequestedVersionCheckStatus * @@ -37,6 +38,7 @@ class RequestedVersionCheckStatus extends Event /** @var User The user */ public $user; + /** * Create a new event instance. This event is triggered when Firefly III wants to know * what the deal is with the version checker. diff --git a/app/Events/UserChangedEmail.php b/app/Events/UserChangedEmail.php index c8b3dec0b6..8f4f70090d 100644 --- a/app/Events/UserChangedEmail.php +++ b/app/Events/UserChangedEmail.php @@ -44,6 +44,7 @@ class UserChangedEmail extends Event public $oldEmail; /** @var User The user itself */ public $user; + /** * UserChangedEmail constructor. * diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php index ae3f64868c..cf8f061ca1 100644 --- a/app/Exceptions/GracefulNotFoundHandler.php +++ b/app/Exceptions/GracefulNotFoundHandler.php @@ -166,7 +166,7 @@ class GracefulNotFoundHandler extends ExceptionHandler } /** - * @param Request $request + * @param Request $request * @param Throwable $exception * * @return RedirectResponse|\Illuminate\Http\Response|Redirector|Response diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php index 990631364a..0bd843e5a1 100644 --- a/app/Factory/AccountFactory.php +++ b/app/Factory/AccountFactory.php @@ -49,8 +49,8 @@ class AccountFactory protected array $validAssetFields; protected array $validCCFields; protected array $validFields; - private array $canHaveVirtual; private array $canHaveOpeningBalance; + private array $canHaveVirtual; private User $user; /** diff --git a/app/Factory/AccountMetaFactory.php b/app/Factory/AccountMetaFactory.php index 87133621b6..322d1ea144 100644 --- a/app/Factory/AccountMetaFactory.php +++ b/app/Factory/AccountMetaFactory.php @@ -68,7 +68,7 @@ class AccountMetaFactory try { $entry->delete(); } catch (Exception $e) { // @phpstan-ignore-line - Log::debug(sprintf('Could not delete entry: %s', $e->getMessage())); + Log::debug(sprintf('Could not delete entry: %s', $e->getMessage())); } return null; diff --git a/app/Factory/AttachmentFactory.php b/app/Factory/AttachmentFactory.php index 7c5ecedfb3..771aa695fb 100644 --- a/app/Factory/AttachmentFactory.php +++ b/app/Factory/AttachmentFactory.php @@ -54,7 +54,7 @@ class AttachmentFactory /** @var Transaction $transaction */ $transaction = $this->user->transactions()->find((int)$data['attachable_id']); if (null === $transaction) { - throw new FireflyException('Unexpectedly could not find transaction'); + throw new FireflyException('Unexpectedly could not find transaction'); } $data['attachable_id'] = $transaction->transaction_journal_id; $model = TransactionJournal::class; diff --git a/app/Factory/RecurrenceFactory.php b/app/Factory/RecurrenceFactory.php index 3de96669e5..790c432a6f 100644 --- a/app/Factory/RecurrenceFactory.php +++ b/app/Factory/RecurrenceFactory.php @@ -141,14 +141,6 @@ class RecurrenceFactory return $recurrence; } - /** - * @param User $user - */ - public function setUser(User $user): void - { - $this->user = $user; - } - /** * @return MessageBag */ @@ -157,5 +149,13 @@ class RecurrenceFactory return $this->errors; } + /** + * @param User $user + */ + public function setUser(User $user): void + { + $this->user = $user; + } + } diff --git a/app/Factory/TransactionJournalMetaFactory.php b/app/Factory/TransactionJournalMetaFactory.php index 0fb32095f6..c734664e8f 100644 --- a/app/Factory/TransactionJournalMetaFactory.php +++ b/app/Factory/TransactionJournalMetaFactory.php @@ -50,7 +50,7 @@ class TransactionJournalMetaFactory try { $entry->delete(); } catch (Exception $e) { // @phpstan-ignore-line - Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); + Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); } return null; @@ -68,7 +68,7 @@ class TransactionJournalMetaFactory try { $entry->delete(); } catch (Exception $e) { // @phpstan-ignore-line - Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); + Log::error(sprintf('Could not delete transaction journal meta: %s', $e->getMessage())); } } diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index d12efb5eb9..393c98e782 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -32,6 +32,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Support\Collection; use JetBrains\PhpStorm\ArrayShape; +use JsonException; use Log; use Throwable; @@ -195,7 +196,7 @@ class MonthReportGenerator implements ReportGeneratorInterface * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ #[ArrayShape(['journals' => "array", 'currency' => "mixed", 'exists' => "bool", 'end' => "string", 'endBalance' => "mixed", 'dayBefore' => "string", 'dayBeforeBalance' => "mixed"])] public function getAuditReport(Account $account, Carbon $date): array diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.php index 3b3b64d64a..63bd4ce9e8 100644 --- a/app/Generator/Report/Budget/MonthReportGenerator.php +++ b/app/Generator/Report/Budget/MonthReportGenerator.php @@ -34,7 +34,7 @@ use Throwable; /** * Class MonthReportGenerator. -* See reference nr. 19 + * See reference nr. 19 * * @codeCoverageIgnore */ diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index ac717e2dcb..1a5eebd205 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -35,7 +35,7 @@ use Throwable; /** * Class MonthReportGenerator. -* See reference nr. 18 + * See reference nr. 18 * * @codeCoverageIgnore */ diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php index 463b5681a1..e05d596997 100644 --- a/app/Handlers/Events/AutomationHandler.php +++ b/app/Handlers/Events/AutomationHandler.php @@ -50,7 +50,7 @@ class AutomationHandler $sendReport = config('firefly.send_report_journals'); if (false === $sendReport) { - return true; + return true; } Log::debug('In reportJournals.'); diff --git a/app/Handlers/Events/StoredGroupEventHandler.php b/app/Handlers/Events/StoredGroupEventHandler.php index 8a54064090..ab85c412c3 100644 --- a/app/Handlers/Events/StoredGroupEventHandler.php +++ b/app/Handlers/Events/StoredGroupEventHandler.php @@ -77,6 +77,18 @@ class StoredGroupEventHandler $newRuleEngine->fire(); } + /** + * @param StoredTransactionGroup $event + */ + public function recalculateCredit(StoredTransactionGroup $event): void + { + $group = $event->transactionGroup; + /** @var CreditRecalculateService $object */ + $object = app(CreditRecalculateService::class); + $object->setGroup($group); + $object->recalculate(); + } + /** * This method processes all webhooks that respond to the "stored transaction group" trigger (100) * @@ -108,16 +120,4 @@ class StoredGroupEventHandler event(new RequestedSendWebhookMessages); } - /** - * @param StoredTransactionGroup $event - */ - public function recalculateCredit(StoredTransactionGroup $event): void - { - $group = $event->transactionGroup; - /** @var CreditRecalculateService $object */ - $object = app(CreditRecalculateService::class); - $object->setGroup($group); - $object->recalculate(); - } - } diff --git a/app/Handlers/Events/UpdatedGroupEventHandler.php b/app/Handlers/Events/UpdatedGroupEventHandler.php index b5f9237794..3d70db5d11 100644 --- a/app/Handlers/Events/UpdatedGroupEventHandler.php +++ b/app/Handlers/Events/UpdatedGroupEventHandler.php @@ -77,6 +77,18 @@ class UpdatedGroupEventHandler $newRuleEngine->fire(); } + /** + * @param UpdatedTransactionGroup $event + */ + public function recalculateCredit(UpdatedTransactionGroup $event): void + { + $group = $event->transactionGroup; + /** @var CreditRecalculateService $object */ + $object = app(CreditRecalculateService::class); + $object->setGroup($group); + $object->recalculate(); + } + /** * @param UpdatedTransactionGroup $updatedGroupEvent */ @@ -100,18 +112,6 @@ class UpdatedGroupEventHandler event(new RequestedSendWebhookMessages); } - /** - * @param UpdatedTransactionGroup $event - */ - public function recalculateCredit(UpdatedTransactionGroup $event): void - { - $group = $event->transactionGroup; - /** @var CreditRecalculateService $object */ - $object = app(CreditRecalculateService::class); - $object->setGroup($group); - $object->recalculate(); - } - /** * This method will make sure all source / destination accounts are the same. * diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index cdd587ddd9..279dc95fb3 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -108,6 +108,34 @@ class UserEventHandler return true; } + /** + * @param RegisteredUser $event + * + * @return bool + * @throws FireflyException + */ + public function createGroupMembership(RegisteredUser $event): bool + { + $user = $event->user; + // create a new group. + $group = UserGroup::create(['title' => $user->email]); + $role = UserRole::where('title', UserRole::OWNER)->first(); + if (null === $role) { + throw new FireflyException('The user role is unexpectedly empty. Did you run all migrations?'); + } + GroupMembership::create( + [ + 'user_id' => $user->id, + 'user_group_id' => $group->id, + 'user_role_id' => $role->id, + ] + ); + $user->user_group_id = $group->id; + $user->save(); + + return true; + } + /** * Set the demo user back to English. * @@ -251,34 +279,6 @@ class UserEventHandler return true; } - /** - * @param RegisteredUser $event - * - * @return bool - * @throws FireflyException - */ - public function createGroupMembership(RegisteredUser $event): bool - { - $user = $event->user; - // create a new group. - $group = UserGroup::create(['title' => $user->email]); - $role = UserRole::where('title', UserRole::OWNER)->first(); - if (null === $role) { - throw new FireflyException('The user role is unexpectedly empty. Did you run all migrations?'); - } - GroupMembership::create( - [ - 'user_id' => $user->id, - 'user_group_id' => $group->id, - 'user_role_id' => $role->id, - ] - ); - $user->user_group_id = $group->id; - $user->save(); - - return true; - } - /** * This method will send the user a registration mail, welcoming him or her to Firefly III. * This message is only sent when the configuration of Firefly III says so. diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 40307cf453..f3295ae8bd 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -61,7 +61,7 @@ class VersionCheckEventHandler /** @var UserRepositoryInterface $repository */ $repository = app(UserRepositoryInterface::class); - $user = $event->user; + $user = $event->user; if (!$repository->hasRole($user, 'owner')) { Log::debug('User is not admin, done.'); @@ -88,13 +88,14 @@ class VersionCheckEventHandler /** * @param RequestedVersionCheckStatus $event + * * @throws FireflyException */ protected function warnToCheckForUpdates(RequestedVersionCheckStatus $event): void { /** @var UserRepositoryInterface $repository */ $repository = app(UserRepositoryInterface::class); - $user = $event->user; + $user = $event->user; if (!$repository->hasRole($user, 'owner')) { Log::debug('User is not admin, done.'); diff --git a/app/Helpers/Collector/Extensions/AccountCollection.php b/app/Helpers/Collector/Extensions/AccountCollection.php index 41f3aa35b7..762c47c7a4 100644 --- a/app/Helpers/Collector/Extensions/AccountCollection.php +++ b/app/Helpers/Collector/Extensions/AccountCollection.php @@ -216,9 +216,9 @@ trait AccountCollection $this->query->leftJoin('account_types as dest_account_type', 'dest_account_type.id', '=', 'dest_account.account_type_id'); // and add fields: - $this->fields[] = 'dest_account.name as destination_account_name'; - $this->fields[] = 'dest_account.iban as destination_account_iban'; - $this->fields[] = 'dest_account_type.type as destination_account_type'; + $this->fields[] = 'dest_account.name as destination_account_name'; + $this->fields[] = 'dest_account.iban as destination_account_iban'; + $this->fields[] = 'dest_account_type.type as destination_account_type'; $this->hasAccountInfo = true; } diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php index 3e117082ff..4fbf2e1bb2 100644 --- a/app/Helpers/Collector/GroupCollector.php +++ b/app/Helpers/Collector/GroupCollector.php @@ -198,6 +198,16 @@ class GroupCollector implements GroupCollectorInterface return $this; } + /** + * @inheritDoc + */ + public function findNothing(): GroupCollectorInterface + { + $this->query->where('transaction_groups.id', -1); + + return $this; + } + /** * Return the transaction journals without group information. Is useful in some instances. * @@ -767,14 +777,4 @@ class GroupCollector implements GroupCollectorInterface return $groups; } - - /** - * @inheritDoc - */ - public function findNothing(): GroupCollectorInterface - { - $this->query->where('transaction_groups.id', -1); - - return $this; - } } diff --git a/app/Helpers/Collector/GroupCollectorInterface.php b/app/Helpers/Collector/GroupCollectorInterface.php index 733725be92..3e58f2fa1c 100644 --- a/app/Helpers/Collector/GroupCollectorInterface.php +++ b/app/Helpers/Collector/GroupCollectorInterface.php @@ -57,13 +57,6 @@ interface GroupCollectorInterface */ public function amountLess(string $amount): GroupCollectorInterface; - /** - * Ensure the search will find nothing at all, zero results. - * - * @return GroupCollectorInterface - */ - public function findNothing(): GroupCollectorInterface; - /** * Get transactions where the amount is more than. * @@ -118,6 +111,13 @@ interface GroupCollectorInterface */ public function excludeSourceAccounts(Collection $accounts): GroupCollectorInterface; + /** + * Ensure the search will find nothing at all, zero results. + * + * @return GroupCollectorInterface + */ + public function findNothing(): GroupCollectorInterface; + /** * Return the transaction journals without group information. Is useful in some instances. * @@ -478,6 +478,13 @@ interface GroupCollectorInterface */ public function withAttachmentInformation(): GroupCollectorInterface; + /** + * Limit results to transactions without a bill.. + * + * @return GroupCollectorInterface + */ + public function withBill(): GroupCollectorInterface; + /** * Include bill name + ID. * @@ -527,13 +534,6 @@ interface GroupCollectorInterface */ public function withTagInformation(): GroupCollectorInterface; - /** - * Limit results to transactions without a bill.. - * - * @return GroupCollectorInterface - */ - public function withBill(): GroupCollectorInterface; - /** * Limit results to a transactions without a bill. * diff --git a/app/Helpers/Fiscal/FiscalHelper.php b/app/Helpers/Fiscal/FiscalHelper.php index ea52ce1074..1298557deb 100644 --- a/app/Helpers/Fiscal/FiscalHelper.php +++ b/app/Helpers/Fiscal/FiscalHelper.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Helpers\Fiscal; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use Log; /** @@ -67,7 +68,7 @@ class FiscalHelper implements FiscalHelperInterface * @param Carbon $date * * @return Carbon date object - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function startOfFiscalYear(Carbon $date): Carbon { diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 30f21d68a1..b5b52a7e06 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -96,7 +96,7 @@ class Help implements HelpInterface if ('' !== $content) { Log::debug('Content is longer than zero. Expect something.'); $converter = new CommonMarkConverter(); - $content = (string) $converter->convertToHtml($content); + $content = (string)$converter->convertToHtml($content); } return $content; diff --git a/app/Helpers/Report/NetWorth.php b/app/Helpers/Report/NetWorth.php index 0fda556332..da485d5ca8 100644 --- a/app/Helpers/Report/NetWorth.php +++ b/app/Helpers/Report/NetWorth.php @@ -30,6 +30,7 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use FireflyIII\User; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -62,7 +63,7 @@ class NetWorth implements NetWorthInterface * @param Carbon $date * * @return array - * @throws \JsonException + * @throws JsonException */ public function getNetWorthByCurrency(Collection $accounts, Carbon $date): array { @@ -73,7 +74,7 @@ class NetWorth implements NetWorthInterface $cache->addProperty('net-worth-by-currency'); $cache->addProperty(implode(',', $accounts->pluck('id')->toArray())); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $netWorth = []; diff --git a/app/Http/Controllers/Account/CreateController.php b/app/Http/Controllers/Account/CreateController.php index 1a5a3c5f96..00c4c55376 100644 --- a/app/Http/Controllers/Account/CreateController.php +++ b/app/Http/Controllers/Account/CreateController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Account; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Attachments\AttachmentHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\AccountFormRequest; @@ -135,7 +136,7 @@ class CreateController extends Controller * @param AccountFormRequest $request * * @return RedirectResponse|Redirector - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function store(AccountFormRequest $request) { diff --git a/app/Http/Controllers/Account/DeleteController.php b/app/Http/Controllers/Account/DeleteController.php index 4c6a1102ae..41732a441e 100644 --- a/app/Http/Controllers/Account/DeleteController.php +++ b/app/Http/Controllers/Account/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller public function delete(Account $account) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $typeName = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type)); @@ -98,7 +98,7 @@ class DeleteController extends Controller public function destroy(Request $request, Account $account) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $type = $account->accountType->type; diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index 78acef21d2..ccb34ce85a 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -44,9 +44,9 @@ class EditController extends Controller { use ModelInformation; - private AttachmentHelperInterface $attachments; + private AttachmentHelperInterface $attachments; private CurrencyRepositoryInterface $currencyRepos; - private AccountRepositoryInterface $repository; + private AccountRepositoryInterface $repository; /** * EditController constructor. @@ -82,7 +82,7 @@ class EditController extends Controller public function edit(Request $request, Account $account, AccountRepositoryInterface $repository) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $objectType = config('firefly.shortNamesByFullName')[$account->accountType->type]; @@ -123,11 +123,11 @@ class EditController extends Controller $request->session()->forget('accounts.edit.fromUpdate'); $openingBalanceAmount = app('steam')->positive((string)$repository->getOpeningBalanceAmount($account)); - if('0' === $openingBalanceAmount) { + if ('0' === $openingBalanceAmount) { $openingBalanceAmount = ''; } - $openingBalanceDate = $repository->getOpeningBalanceDate($account); - $currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency(); + $openingBalanceDate = $repository->getOpeningBalanceDate($account); + $currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency(); // include this account in net-worth charts? $includeNetWorth = $repository->getMetaValue($account, 'include_net_worth'); @@ -144,7 +144,7 @@ class EditController extends Controller 'opening_balance_date' => $openingBalanceDate, 'liability_type_id' => $account->account_type_id, 'opening_balance' => $openingBalanceAmount, - 'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'), + 'liability_direction' => $this->repository->getMetaValue($account, 'liability_direction'), 'virtual_balance' => $account->virtual_balance, 'currency_id' => $currency->id, 'include_net_worth' => $includeNetWorth, @@ -185,7 +185,7 @@ class EditController extends Controller public function update(AccountFormRequest $request, Account $account) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $data = $request->getAccountData(); @@ -204,7 +204,7 @@ class EditController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } // redirect diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php index 11566bfe0f..36dc51a8c2 100644 --- a/app/Http/Controllers/Account/IndexController.php +++ b/app/Http/Controllers/Account/IndexController.php @@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers\Account; use Carbon\Carbon; use Exception; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -72,7 +73,7 @@ class IndexController extends Controller * @param string $objectType * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function inactive(Request $request, string $objectType) { @@ -160,13 +161,15 @@ class IndexController extends Controller $accounts->each( function (Account $account) use ($activities, $startBalances, $endBalances) { -// See reference nr. 68 + // See reference nr. 68 $account->lastActivityDate = $this->isInArray($activities, $account->id); $account->startBalance = $this->isInArray($startBalances, $account->id); $account->endBalance = $this->isInArray($endBalances, $account->id); $account->difference = bcsub($account->endBalance, $account->startBalance); $account->interest = number_format((float)$this->repository->getMetaValue($account, 'interest'), 4, '.', ''); - $account->interestPeriod = (string)trans(sprintf('firefly.interest_calc_%s', $this->repository->getMetaValue($account, 'interest_period'))); + $account->interestPeriod = (string)trans( + sprintf('firefly.interest_calc_%s', $this->repository->getMetaValue($account, 'interest_period')) + ); $account->accountTypeString = (string)trans(sprintf('firefly.account_type_%s', $account->accountType->type)); $account->location = $this->repository->getLocation($account); $account->liability_direction = $this->repository->getMetaValue($account, 'liability_direction'); diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 2c1772adc0..e3ae62ec91 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -91,7 +91,7 @@ class ReconcileController extends Controller public function reconcile(Account $account, Carbon $start = null, Carbon $end = null) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } if (AccountType::ASSET !== $account->accountType->type) { @@ -169,7 +169,7 @@ class ReconcileController extends Controller public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } Log::debug('In ReconcileController::submit()'); @@ -218,7 +218,7 @@ class ReconcileController extends Controller private function createReconciliation(Account $account, Carbon $start, Carbon $end, string $difference) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $reconciliation = $this->accountRepos->getReconciliation($account); diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index 4b7274227e..52f36a8d32 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -91,7 +91,7 @@ class ShowController extends Controller $objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type)); if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } /** @var Carbon $start */ @@ -100,7 +100,7 @@ class ShowController extends Controller $end = $end ?? session('end'); if ($end < $start) { - [$start, $end] = [$end, $start]; + [$start, $end] = [$end, $start]; } $location = $this->repository->getLocation($account); $attachments = $this->repository->getAttachments($account); @@ -164,7 +164,7 @@ class ShowController extends Controller public function showAll(Request $request, Account $account) { if (!$this->isEditableAccount($account)) { - return $this->redirectAccountToAccount($account); + return $this->redirectAccountToAccount($account); } $location = $this->repository->getLocation($account); $isLiability = $this->repository->isLiability($account); diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index f4dac83d88..036c75fef1 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -64,7 +64,7 @@ class ConfigurationController extends Controller */ public function index() { - $subTitle = (string)trans('firefly.instance_configuration'); + $subTitle = (string)trans('firefly.instance_configuration'); $subTitleIcon = 'fa-wrench'; Log::channel('audit')->info('User visits admin config index.'); diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 718d112b1f..8a86f678d6 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Events\AdminRequestedTestMessage; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\User; @@ -53,7 +54,7 @@ class HomeController extends Controller * Index of the admin. * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function index() { diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index fac92e9185..d4ff3b1a77 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -161,7 +161,7 @@ class LinkController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('link-types.edit.fromUpdate')) { - $this->rememberPreviousUri('link-types.edit.uri'); + $this->rememberPreviousUri('link-types.edit.uri'); } $request->session()->forget('link-types.edit.fromUpdate'); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 92fcc56271..1ebe5e0100 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -28,15 +28,17 @@ use DB; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Providers\RouteServiceProvider; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; +use Illuminate\Contracts\View\View; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Foundation\Auth\ThrottlesLogins; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; +use Illuminate\Routing\Redirector; use Illuminate\Validation\ValidationException; -use Illuminate\View\View; use Log; /** @@ -194,7 +196,7 @@ class LoginController extends Controller * * @param Request $request * - * @return Factory|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Routing\Redirector|RedirectResponse + * @return Factory|Application|View|Redirector|RedirectResponse * @throws FireflyException */ public function showLoginForm(Request $request) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index c5b3ce425d..1c882813fb 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -27,6 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Support\Http\Controllers\CreateStuff; use FireflyIII\User; +use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Http\RedirectResponse; @@ -78,7 +79,7 @@ class RegisterController extends Controller * * @param Request $request * - * @return \Illuminate\Contracts\Foundation\Application|Redirector|RedirectResponse + * @return Application|Redirector|RedirectResponse * @throws FireflyException * @throws ValidationException */ diff --git a/app/Http/Controllers/Bill/CreateController.php b/app/Http/Controllers/Bill/CreateController.php index 8015319b45..67c92d32ba 100644 --- a/app/Http/Controllers/Bill/CreateController.php +++ b/app/Http/Controllers/Bill/CreateController.php @@ -30,6 +30,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Requests\BillStoreRequest; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use Illuminate\Contracts\View\Factory; +use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Log; @@ -68,7 +69,7 @@ class CreateController extends Controller * * @param Request $request * - * @return Factory|\Illuminate\Contracts\View\View + * @return Factory|View */ public function create(Request $request) { @@ -123,7 +124,7 @@ class CreateController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } return redirect(route('rules.create-from-bill', [$bill->id])); diff --git a/app/Http/Controllers/Bill/EditController.php b/app/Http/Controllers/Bill/EditController.php index 7959115862..6c1d0916d8 100644 --- a/app/Http/Controllers/Bill/EditController.php +++ b/app/Http/Controllers/Bill/EditController.php @@ -30,6 +30,7 @@ use FireflyIII\Http\Requests\BillUpdateRequest; use FireflyIII\Models\Bill; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use Illuminate\Contracts\View\Factory; +use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; @@ -68,7 +69,7 @@ class EditController extends Controller * @param Request $request * @param Bill $bill * - * @return Factory|\Illuminate\Contracts\View\View + * @return Factory|View */ public function edit(Request $request, Bill $bill) { @@ -136,7 +137,7 @@ class EditController extends Controller // flash messages if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('bills.edit.uri')); diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index f87f80baca..88e01a8ad8 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Bill; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Bill; use FireflyIII\Repositories\Bill\BillRepositoryInterface; @@ -105,18 +106,18 @@ class IndexController extends Controller 'object_group_title' => $array['object_group_title'], 'bills' => [], ]; -// var_dump($array);exit; -// // expected today? default: -// $array['next_expected_match_diff'] = trans('firefly.not_expected_period'); -// $nextExpectedMatch = new Carbon($array['next_expected_match']); -// if ($nextExpectedMatch->isToday()) { -// $array['next_expected_match_diff'] = trans('firefly.today'); -// } -// $current = $array['pay_dates'][0] ?? null; -// if (null !== $current && !$nextExpectedMatch->isToday()) { -// $currentExpectedMatch = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current); -// $array['next_expected_match_diff'] = $currentExpectedMatch->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW); -// } + // var_dump($array);exit; + // // expected today? default: + // $array['next_expected_match_diff'] = trans('firefly.not_expected_period'); + // $nextExpectedMatch = new Carbon($array['next_expected_match']); + // if ($nextExpectedMatch->isToday()) { + // $array['next_expected_match_diff'] = trans('firefly.today'); + // } + // $current = $array['pay_dates'][0] ?? null; + // if (null !== $current && !$nextExpectedMatch->isToday()) { + // $currentExpectedMatch = Carbon::createFromFormat('Y-m-d\TH:i:sP', $current); + // $array['next_expected_match_diff'] = $currentExpectedMatch->diffForHumans(today(), Carbon::DIFF_RELATIVE_TO_NOW); + // } $currency = $bill->transactionCurrency ?? $defaultCurrency; $array['currency_id'] = $currency->id; @@ -143,7 +144,7 @@ class IndexController extends Controller * @param array $bills * * @return array - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ private function getSums(array $bills): array { diff --git a/app/Http/Controllers/Budget/CreateController.php b/app/Http/Controllers/Budget/CreateController.php index 557f5ce739..39added774 100644 --- a/app/Http/Controllers/Budget/CreateController.php +++ b/app/Http/Controllers/Budget/CreateController.php @@ -133,7 +133,7 @@ class CreateController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('budgets.create.uri')); diff --git a/app/Http/Controllers/Budget/EditController.php b/app/Http/Controllers/Budget/EditController.php index 8422595a05..7f77a47c30 100644 --- a/app/Http/Controllers/Budget/EditController.php +++ b/app/Http/Controllers/Budget/EditController.php @@ -144,7 +144,7 @@ class EditController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } if (1 === (int)$request->get('return_to_edit')) { diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index 9f1caa1de7..99472da46a 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Budget; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\AvailableBudget; use FireflyIII\Models\Budget; @@ -90,7 +91,7 @@ class IndexController extends Controller * @param Carbon|null $end * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function index(Request $request, Carbon $start = null, Carbon $end = null) { diff --git a/app/Http/Controllers/Budget/ShowController.php b/app/Http/Controllers/Budget/ShowController.php index 6716256a10..87be007853 100644 --- a/app/Http/Controllers/Budget/ShowController.php +++ b/app/Http/Controllers/Budget/ShowController.php @@ -47,7 +47,7 @@ class ShowController extends Controller use PeriodOverview, AugumentData; protected JournalRepositoryInterface $journalRepos; - private BudgetRepositoryInterface $repository; + private BudgetRepositoryInterface $repository; /** * ShowController constructor. @@ -183,7 +183,7 @@ class ShowController extends Controller public function showByBudgetLimit(Request $request, Budget $budget, BudgetLimit $budgetLimit) { if ($budgetLimit->budget->id !== $budget->id) { - throw new FireflyException('This budget limit is not part of this budget.'); + throw new FireflyException('This budget limit is not part of this budget.'); } $page = (int)$request->get('page'); diff --git a/app/Http/Controllers/Category/CreateController.php b/app/Http/Controllers/Category/CreateController.php index 678509283c..df8f8a9959 100644 --- a/app/Http/Controllers/Category/CreateController.php +++ b/app/Http/Controllers/Category/CreateController.php @@ -107,7 +107,7 @@ class CreateController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect(route('categories.index')); diff --git a/app/Http/Controllers/Category/DeleteController.php b/app/Http/Controllers/Category/DeleteController.php index 191b5acdf2..34a4595768 100644 --- a/app/Http/Controllers/Category/DeleteController.php +++ b/app/Http/Controllers/Category/DeleteController.php @@ -80,7 +80,7 @@ class DeleteController extends Controller /** * Destroy a category. * - * @param Request $request + * @param Request $request * @param Category $category * * @return RedirectResponse|Redirector diff --git a/app/Http/Controllers/Category/EditController.php b/app/Http/Controllers/Category/EditController.php index 02355d2cc6..8b7db90962 100644 --- a/app/Http/Controllers/Category/EditController.php +++ b/app/Http/Controllers/Category/EditController.php @@ -115,7 +115,7 @@ class EditController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('categories.edit.uri')); diff --git a/app/Http/Controllers/Category/IndexController.php b/app/Http/Controllers/Category/IndexController.php index fb93dd652d..2a3dc289b3 100644 --- a/app/Http/Controllers/Category/IndexController.php +++ b/app/Http/Controllers/Category/IndexController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Category; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Category; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; @@ -66,7 +67,7 @@ class IndexController extends Controller * @param Request $request * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function index(Request $request) { diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php index 4ec98fbe81..3214089c83 100644 --- a/app/Http/Controllers/Category/NoCategoryController.php +++ b/app/Http/Controllers/Category/NoCategoryController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Category; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionType; @@ -74,7 +75,7 @@ class NoCategoryController extends Controller * @param Carbon|null $end * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function show(Request $request, Carbon $start = null, Carbon $end = null) { @@ -112,7 +113,7 @@ class NoCategoryController extends Controller * @param Request $request * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function showAll(Request $request) { diff --git a/app/Http/Controllers/Category/ShowController.php b/app/Http/Controllers/Category/ShowController.php index 5a530d19cc..59bb1483e1 100644 --- a/app/Http/Controllers/Category/ShowController.php +++ b/app/Http/Controllers/Category/ShowController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Category; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Category; @@ -76,7 +77,7 @@ class ShowController extends Controller * @param Carbon|null $end * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null) { @@ -116,7 +117,7 @@ class ShowController extends Controller * @param Category $category * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function showAll(Request $request, Category $category) { diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 68f98a29aa..b8b03d2a7c 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Chart; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; @@ -38,6 +39,7 @@ use FireflyIII\Support\Http\Controllers\ChartGeneration; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -83,7 +85,7 @@ class AccountController extends Controller * This chart is (multi) currency aware. * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseAccounts(): JsonResponse { @@ -96,7 +98,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty('chart.account.expense-accounts'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $start->subDay(); @@ -195,7 +197,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -205,7 +207,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty('chart.account.expense-budget'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); @@ -270,7 +272,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -280,7 +282,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty('chart.account.expense-category'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ @@ -325,7 +327,7 @@ class AccountController extends Controller * @param AccountRepositoryInterface $repository * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function frontpage(AccountRepositoryInterface $repository): JsonResponse { @@ -368,7 +370,7 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -378,7 +380,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty('chart.account.income-category'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } // grab all journals: @@ -426,8 +428,8 @@ class AccountController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function period(Account $account, Carbon $start, Carbon $end): JsonResponse { @@ -438,7 +440,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty($account->id); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $currencies = $this->accountRepository->getUsedCurrencies($account); @@ -465,8 +467,8 @@ class AccountController extends Controller * @param TransactionCurrency $currency * * @return array - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array { @@ -518,7 +520,7 @@ class AccountController extends Controller /** * Shows the balances for a given set of dates and accounts. * -* See reference nr. 55 + * See reference nr. 55 * * @param Carbon $start * @param Carbon $end @@ -537,7 +539,7 @@ class AccountController extends Controller * This chart is multi-currency aware. * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function revenueAccounts(): JsonResponse { @@ -550,7 +552,7 @@ class AccountController extends Controller $cache->addProperty($end); $cache->addProperty('chart.account.revenue-accounts'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $start->subDay(); diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 8fe9467b4f..b857e1a85b 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -31,6 +31,7 @@ use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\JsonResponse; +use JsonException; /** * Class BillController. @@ -57,7 +58,7 @@ class BillController extends Controller * @param BillRepositoryInterface $repository * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function frontpage(BillRepositoryInterface $repository): JsonResponse { @@ -68,7 +69,7 @@ class BillController extends Controller $cache->addProperty($end); $cache->addProperty('chart.bill.frontpage'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var CurrencyRepositoryInterface $currencyRepository */ $currencyRepository = app(CurrencyRepositoryInterface::class); @@ -103,7 +104,7 @@ class BillController extends Controller * @param Bill $bill * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function single(Bill $bill): JsonResponse { @@ -111,7 +112,7 @@ class BillController extends Controller $cache->addProperty('chart.bill.single'); $cache->addProperty($bill->id); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $locale = app('steam')->getLocale(); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index 400e137710..d55ebbbe19 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -41,6 +41,7 @@ use FireflyIII\Support\Http\Controllers\AugumentData; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; +use JsonException; /** * Class BudgetController. @@ -84,7 +85,7 @@ class BudgetController extends Controller * @param Budget $budget * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function budget(Budget $budget): JsonResponse { @@ -153,7 +154,7 @@ class BudgetController extends Controller * @return JsonResponse * * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse { @@ -171,7 +172,7 @@ class BudgetController extends Controller $cache->addProperty($budget->id); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $locale = app('steam')->getLocale(); $entries = []; @@ -204,7 +205,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -227,7 +228,7 @@ class BudgetController extends Controller $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $collector->setRange($start, $end); $collector->setBudget($budget); @@ -273,7 +274,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -295,7 +296,7 @@ class BudgetController extends Controller $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $collector->setRange($start, $end); $collector->setBudget($budget)->withCategoryInformation(); @@ -338,7 +339,7 @@ class BudgetController extends Controller * @param BudgetLimit|null $budgetLimit * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse { @@ -360,7 +361,7 @@ class BudgetController extends Controller $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $collector->setRange($start, $end); $collector->setTypes([TransactionType::WITHDRAWAL])->setBudget($budget)->withAccountInformation(); @@ -402,7 +403,7 @@ class BudgetController extends Controller * Shows a budget list with spent/left/overspent. * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function frontpage(): JsonResponse { @@ -415,7 +416,7 @@ class BudgetController extends Controller $cache->addProperty($end); $cache->addProperty('chart.budget.frontpage'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $chartGenerator = app(FrontpageChartGenerator::class); @@ -440,7 +441,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -453,7 +454,7 @@ class BudgetController extends Controller $cache->addProperty($currency->id); $cache->addProperty('chart.budget.period'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $titleFormat = app('navigation')->preferredCarbonLocalizedFormat($start, $end); $preferredRange = app('navigation')->preferredRangeFormat($start, $end); @@ -516,7 +517,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -528,7 +529,7 @@ class BudgetController extends Controller $cache->addProperty($currency->id); $cache->addProperty('chart.budget.no-budget'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } // the expenses: diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 7e1cf1239f..09c56ad6e5 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -24,6 +24,7 @@ namespace FireflyIII\Http\Controllers\Chart; use Carbon\Carbon; use Exception; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Category; @@ -38,6 +39,7 @@ use FireflyIII\Support\Http\Controllers\ChartGeneration; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; +use JsonException; /** * Class CategoryController. @@ -68,8 +70,8 @@ class CategoryController extends Controller * @param Category $category * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function all(Category $category): JsonResponse { @@ -116,7 +118,7 @@ class CategoryController extends Controller * See reference nr. 60 * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function frontPage(): JsonResponse { @@ -149,7 +151,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -265,7 +267,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -292,8 +294,8 @@ class CategoryController extends Controller * @param Carbon $date * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function specificPeriod(Category $category, Carbon $date): JsonResponse { diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index 19a05b6b59..8e5e359859 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -318,7 +318,7 @@ class CategoryReportController extends Controller } /** -* See reference nr. 57 + * See reference nr. 57 * * @param Carbon $start * @param Carbon $end diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.php index fd7a49dbe0..13a86622d6 100644 --- a/app/Http/Controllers/Chart/DoubleReportController.php +++ b/app/Http/Controllers/Chart/DoubleReportController.php @@ -249,7 +249,7 @@ class DoubleReportController extends Controller } /** -* See reference nr. 51 + * See reference nr. 51 * * @param Collection $accounts * @param int $id @@ -274,7 +274,7 @@ class DoubleReportController extends Controller } /** -* See reference nr. 52 + * See reference nr. 52 * * @param Carbon $start * @param Carbon $end diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php index dd1541143a..697cfb6ee4 100644 --- a/app/Http/Controllers/Chart/ExpenseReportController.php +++ b/app/Http/Controllers/Chart/ExpenseReportController.php @@ -33,6 +33,7 @@ use FireflyIII\Support\Http\Controllers\AugumentData; use FireflyIII\Support\Http\Controllers\TransactionCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; +use JsonException; /** * Separate controller because many helper functions are shared. @@ -77,7 +78,7 @@ class ExpenseReportController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse { @@ -88,7 +89,7 @@ class ExpenseReportController extends Controller $cache->addProperty($start); $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); @@ -188,7 +189,7 @@ class ExpenseReportController extends Controller } } if (empty($newSet)) { - $newSet = $chartData; + $newSet = $chartData; } $data = $this->generator->multiSet($newSet); $cache->store($data); diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index a7d1684d90..54ddd642f9 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -31,6 +31,7 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Support\CacheProperties; use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; +use JsonException; /** * Class PiggyBankController. @@ -63,7 +64,7 @@ class PiggyBankController extends Controller * @param PiggyBank $piggyBank * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse { @@ -72,7 +73,7 @@ class PiggyBankController extends Controller $cache->addProperty('chart.piggy-bank.history'); $cache->addProperty($piggyBank->id); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $set = $repository->getEvents($piggyBank); $set = $set->reverse(); diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 31efe7921a..3062386453 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -35,6 +35,7 @@ use FireflyIII\Support\Http\Controllers\BasicDataSupport; use FireflyIII\Support\Http\Controllers\ChartGeneration; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -68,7 +69,7 @@ class ReportController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -79,7 +80,7 @@ class ReportController extends Controller $cache->addProperty(implode(',', $accounts->pluck('id')->toArray())); $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $locale = app('steam')->getLocale(); $current = clone $start; @@ -103,7 +104,7 @@ class ReportController extends Controller } ); -// See reference nr. 56 + // See reference nr. 56 while ($current < $end) { // get balances by date, grouped by currency. @@ -143,7 +144,7 @@ class ReportController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse { @@ -154,7 +155,7 @@ class ReportController extends Controller $cache->addProperty($accounts); $cache->addProperty($end); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } Log::debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray()); $format = app('navigation')->preferredCarbonFormat($start, $end); diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index 802d9c86de..3a77762e19 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -323,7 +323,7 @@ class TagReportController extends Controller } /** -* See reference nr. 54 + * See reference nr. 54 * * @param Carbon $start * @param Carbon $end diff --git a/app/Http/Controllers/Chart/TransactionController.php b/app/Http/Controllers/Chart/TransactionController.php index 27c5daea39..c7c7dac871 100644 --- a/app/Http/Controllers/Chart/TransactionController.php +++ b/app/Http/Controllers/Chart/TransactionController.php @@ -32,6 +32,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionType; use FireflyIII\Support\CacheProperties; use Illuminate\Http\JsonResponse; +use JsonException; /** * Class TransactionController @@ -56,7 +57,7 @@ class TransactionController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function budgets(Carbon $start, Carbon $end) { @@ -65,7 +66,7 @@ class TransactionController extends Controller $cache->addProperty($end); $cache->addProperty('chart.transactions.budgets'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); @@ -101,7 +102,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function categories(string $objectType, Carbon $start, Carbon $end) { @@ -111,7 +112,7 @@ class TransactionController extends Controller $cache->addProperty($objectType); $cache->addProperty('chart.transactions.categories'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); @@ -160,7 +161,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function destinationAccounts(string $objectType, Carbon $start, Carbon $end) { @@ -170,7 +171,7 @@ class TransactionController extends Controller $cache->addProperty($objectType); $cache->addProperty('chart.transactions.destinations'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); @@ -218,7 +219,7 @@ class TransactionController extends Controller * * @return JsonResponse * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function sourceAccounts(string $objectType, Carbon $start, Carbon $end) { @@ -228,7 +229,7 @@ class TransactionController extends Controller $cache->addProperty($objectType); $cache->addProperty('chart.transactions.sources'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index acc35ec5bf..f601a61ea4 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -143,7 +143,7 @@ class DebugController extends Controller $loginProvider = config('auth.providers.users.driver'); $bcscale = bcscale(); $layout = env('FIREFLY_III_LAYOUT'); - $tz = env('TZ'); + $tz = env('TZ'); // expected + found DB version: $expectedDBversion = config('firefly.db_version'); diff --git a/app/Http/Controllers/Export/IndexController.php b/app/Http/Controllers/Export/IndexController.php index 04d7d56322..a196feadcb 100644 --- a/app/Http/Controllers/Export/IndexController.php +++ b/app/Http/Controllers/Export/IndexController.php @@ -32,8 +32,6 @@ use FireflyIII\Support\Export\ExportDataGenerator; 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 @@ -87,7 +85,7 @@ class IndexController extends Controller $generator->setStart($firstDate); $result = $generator->export(); - $name = sprintf('%s_transaction_export.csv', date('Y_m_d')); + $name = sprintf('%s_transaction_export.csv', date('Y_m_d')); $quoted = sprintf('"%s"', addcslashes($name, '"\\')); // headers for CSV file. /** @var LaravelResponse $response */ diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index ecd2205c86..93fcec961c 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers; +use FireflyIII\Exceptions\FireflyException; use Illuminate\Http\JsonResponse; /** @@ -35,7 +36,7 @@ class HelpController extends Controller * @param string $route * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function show(string $route): JsonResponse { diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php index c457ba4042..76324362a8 100644 --- a/app/Http/Controllers/JavascriptController.php +++ b/app/Http/Controllers/JavascriptController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\TransactionCurrency; @@ -46,7 +47,7 @@ class JavascriptController extends Controller * @param CurrencyRepositoryInterface $currencyRepository * * @return Response - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response { @@ -55,14 +56,14 @@ class JavascriptController extends Controller ); $preference = app('preferences')->get('currencyPreference', config('firefly.default_currency', 'EUR')); /** @noinspection NullPointerExceptionInspection */ - $default = $currencyRepository->findByCodeNull((string) $preference->data); + $default = $currencyRepository->findByCodeNull((string)$preference->data); $data = ['accounts' => []]; /** @var Account $account */ foreach ($accounts as $account) { $accountId = $account->id; - $currency = (int) $repository->getMetaValue($account, 'currency_id'); + $currency = (int)$repository->getMetaValue($account, 'currency_id'); /** @noinspection NullPointerExceptionInspection */ $currency = 0 === $currency ? $default->id : $currency; $entry = ['preferredCurrency' => $currency, 'name' => $account->name]; @@ -97,6 +98,49 @@ class JavascriptController extends Controller ->header('Content-Type', 'text/javascript'); } + /** + * Show some common variables to be used in scripts. + * + * @param Request $request + * @param AccountRepositoryInterface $repository + * @param CurrencyRepositoryInterface $currencyRepository + * + * @return Response + * @throws FireflyException + */ + public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response + { + $account = $repository->find((int)$request->get('account')); + $currency = app('amount')->getDefaultCurrency(); + if (null !== $account) { + $currency = $repository->getAccountCurrency($account) ?? $currency; + } + $locale = app('steam')->getLocale(); + $accounting = app('amount')->getJsConfig(); + $accounting['frac_digits'] = $currency->decimal_places; + $pref = app('preferences')->get('language', config('firefly.default_language', 'en_US')); + /** @noinspection NullPointerExceptionInspection */ + $lang = $pref->data; + $dateRange = $this->getDateRangeConfig(); + $uid = substr(hash('sha256', sprintf('%s-%s-%s', (string)config('app.key'), auth()->user()->id, auth()->user()->email)), 0, 12); + + $data = [ + 'currencyCode' => $currency->code, + 'currencySymbol' => $currency->symbol, + 'accountingLocaleInfo' => $accounting, + 'language' => $lang, + 'dateRangeTitle' => $dateRange['title'], + 'locale' => $locale, + 'dateRangeConfig' => $dateRange['configuration'], + 'uid' => $uid, + ]; + $request->session()->keep(['two-factor-secret']); + + return response() + ->view('v1.javascript.variables', $data) + ->header('Content-Type', 'text/javascript'); + } + /** * Bit of a hack but OK. * @@ -121,47 +165,4 @@ class JavascriptController extends Controller ->header('Content-Type', 'text/javascript'); } - /** - * Show some common variables to be used in scripts. - * - * @param Request $request - * @param AccountRepositoryInterface $repository - * @param CurrencyRepositoryInterface $currencyRepository - * - * @return Response - * @throws \FireflyIII\Exceptions\FireflyException - */ - public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response - { - $account = $repository->find((int) $request->get('account')); - $currency = app('amount')->getDefaultCurrency(); - if(null !== $account) { - $currency = $repository->getAccountCurrency($account) ?? $currency; - } - $locale = app('steam')->getLocale(); - $accounting = app('amount')->getJsConfig(); - $accounting['frac_digits'] = $currency->decimal_places; - $pref = app('preferences')->get('language', config('firefly.default_language', 'en_US')); - /** @noinspection NullPointerExceptionInspection */ - $lang = $pref->data; - $dateRange = $this->getDateRangeConfig(); - $uid = substr(hash('sha256', sprintf('%s-%s-%s', (string) config('app.key'), auth()->user()->id, auth()->user()->email)), 0, 12); - - $data = [ - 'currencyCode' => $currency->code, - 'currencySymbol' => $currency->symbol, - 'accountingLocaleInfo' => $accounting, - 'language' => $lang, - 'dateRangeTitle' => $dateRange['title'], - 'locale' => $locale, - 'dateRangeConfig' => $dateRange['configuration'], - 'uid' => $uid, - ]; - $request->session()->keep(['two-factor-secret']); - - return response() - ->view('v1.javascript.variables', $data) - ->header('Content-Type', 'text/javascript'); - } - } diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php index ad12df6ad3..07cc1c0b75 100644 --- a/app/Http/Controllers/Json/BoxController.php +++ b/app/Http/Controllers/Json/BoxController.php @@ -37,6 +37,7 @@ use FireflyIII\Repositories\Budget\OperationsRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\JsonResponse; +use JsonException; use Log; /** @@ -51,7 +52,7 @@ class BoxController extends Controller * 2) if the user has no available amount set this period: spent per day * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function available(): JsonResponse { @@ -73,7 +74,7 @@ class BoxController extends Controller $cache->addProperty($today); $cache->addProperty('box-available'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } $leftPerDayAmount = '0'; $leftToSpendAmount = '0'; @@ -130,7 +131,7 @@ class BoxController extends Controller * @param CurrencyRepositoryInterface $repository * * @return JsonResponse - * @throws \JsonException + * @throws JsonException */ public function balance(CurrencyRepositoryInterface $repository): JsonResponse { @@ -144,7 +145,7 @@ class BoxController extends Controller $cache->addProperty($end); $cache->addProperty('box-balance'); if ($cache->has()) { - return response()->json($cache->get()); + return response()->json($cache->get()); } // prep some arrays: $incomes = []; diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index d7164428c8..7714e0d56c 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Json; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Support\Http\Controllers\GetConfigurationData; use Illuminate\Http\JsonResponse; @@ -103,7 +104,7 @@ class IntroController extends Controller * @param string|null $specialPage * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function postEnable(string $route, string $specialPage = null): JsonResponse { @@ -127,7 +128,7 @@ class IntroController extends Controller * @param string|null $specialPage * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function postFinished(string $route, string $specialPage = null): JsonResponse { diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php index 2b328a7d62..006a1251ab 100644 --- a/app/Http/Controllers/Json/ReconcileController.php +++ b/app/Http/Controllers/Json/ReconcileController.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Json; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Account; @@ -35,6 +36,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Collection; +use JsonException; use Log; use Throwable; @@ -215,8 +217,8 @@ class ReconcileController extends Controller * @param Carbon $end * * @return JsonResponse - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function transactions(Account $account, Carbon $start, Carbon $end) { @@ -256,6 +258,7 @@ class ReconcileController extends Controller Log::debug(sprintf('Could not render: %s', $e->getMessage())); $html = sprintf('Could not render accounts.reconcile.transactions: %s', $e->getMessage()); } + return response()->json(['html' => $html, 'startBalance' => $startBalance, 'endBalance' => $endBalance]); } diff --git a/app/Http/Controllers/Json/RuleController.php b/app/Http/Controllers/Json/RuleController.php index 5e5111a427..19338c5379 100644 --- a/app/Http/Controllers/Json/RuleController.php +++ b/app/Http/Controllers/Json/RuleController.php @@ -56,6 +56,7 @@ class RuleController extends Controller Log::error(sprintf('Cannot render rules.partials.action: %s', $e->getMessage())); $view = 'Could not render view.'; } + return response()->json(['html' => $view]); } diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index 8aa942ec82..f9f74ca719 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Requests\NewUserFormRequest; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -38,6 +39,7 @@ use Illuminate\View\View; class NewUserController extends Controller { use CreateStuff; + /** @var AccountRepositoryInterface The account repository */ private $repository; @@ -64,7 +66,7 @@ class NewUserController extends Controller */ public function index() { - app('view')->share('title', (string) trans('firefly.welcome')); + app('view')->share('title', (string)trans('firefly.welcome')); app('view')->share('mainTitleIcon', 'fa-fire'); $types = config('firefly.accountTypesByIdentifier.asset'); @@ -82,11 +84,11 @@ class NewUserController extends Controller /** * Store his new settings. * - * @param NewUserFormRequest $request + * @param NewUserFormRequest $request * @param CurrencyRepositoryInterface $currencyRepository * * @return RedirectResponse|Redirector - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function submit(NewUserFormRequest $request, CurrencyRepositoryInterface $currencyRepository) { @@ -99,7 +101,7 @@ class NewUserController extends Controller // set language preference: app('preferences')->set('language', $language); // Store currency preference from input: - $currency = $currencyRepository->find((int) $request->input('amount_currency_id_bank_balance')); + $currency = $currencyRepository->find((int)$request->input('amount_currency_id_bank_balance')); // if is null, set to EUR: if (null === $currency) { @@ -126,7 +128,7 @@ class NewUserController extends Controller 'invoice_date' => false, 'internal_reference' => false, 'notes' => true, 'attachments' => true,]; app('preferences')->set('transaction_journal_optional_fields', $visibleFields); - session()->flash('success', (string) trans('firefly.stored_new_accounts_new_user')); + session()->flash('success', (string)trans('firefly.stored_new_accounts_new_user')); app('preferences')->mark(); return redirect(route('index')); diff --git a/app/Http/Controllers/ObjectGroup/DeleteController.php b/app/Http/Controllers/ObjectGroup/DeleteController.php index 16af643222..e019a050b3 100644 --- a/app/Http/Controllers/ObjectGroup/DeleteController.php +++ b/app/Http/Controllers/ObjectGroup/DeleteController.php @@ -68,7 +68,7 @@ class DeleteController extends Controller */ public function delete(ObjectGroup $objectGroup) { - $subTitle = (string)trans('firefly.delete_object_group', ['title' => $objectGroup->title]); + $subTitle = (string)trans('firefly.delete_object_group', ['title' => $objectGroup->title]); $piggyBanks = $objectGroup->piggyBanks()->count(); // put previous url in session @@ -81,6 +81,7 @@ class DeleteController extends Controller * Destroy the piggy bank. * * @param ObjectGroup $objectGroup + * * @return RedirectResponse */ public function destroy(ObjectGroup $objectGroup): RedirectResponse diff --git a/app/Http/Controllers/ObjectGroup/IndexController.php b/app/Http/Controllers/ObjectGroup/IndexController.php index 6bc9805282..8b846f54cf 100644 --- a/app/Http/Controllers/ObjectGroup/IndexController.php +++ b/app/Http/Controllers/ObjectGroup/IndexController.php @@ -28,6 +28,7 @@ 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\JsonResponse; use Illuminate\Http\Request; use Log; @@ -61,7 +62,7 @@ class IndexController extends Controller } /** - * @return Factory|\Illuminate\Contracts\View\View + * @return Factory|View */ public function index() { diff --git a/app/Http/Controllers/PiggyBank/CreateController.php b/app/Http/Controllers/PiggyBank/CreateController.php index 6ac60fc4da..ffbdcac015 100644 --- a/app/Http/Controllers/PiggyBank/CreateController.php +++ b/app/Http/Controllers/PiggyBank/CreateController.php @@ -113,7 +113,7 @@ class CreateController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('piggy-banks.create.uri')); diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index e160a74f7f..5abdfa02fa 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -128,7 +128,7 @@ class EditController extends Controller } if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('piggy-banks.edit.uri')); diff --git a/app/Http/Controllers/PiggyBank/IndexController.php b/app/Http/Controllers/PiggyBank/IndexController.php index 275e454005..aa0bc13642 100644 --- a/app/Http/Controllers/PiggyBank/IndexController.php +++ b/app/Http/Controllers/PiggyBank/IndexController.php @@ -69,7 +69,7 @@ class IndexController extends Controller /** * Show overview of all piggy banks. -* See reference nr. 66 + * See reference nr. 66 * * @param Request $request * diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index 9cc2850941..f793c11c08 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\Preference; @@ -64,7 +65,7 @@ class PreferencesController extends Controller * @param AccountRepositoryInterface $repository * * @return Factory|View - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function index(AccountRepositoryInterface $repository) { @@ -145,7 +146,7 @@ class PreferencesController extends Controller * @param Request $request * * @return RedirectResponse|Redirector - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ public function postIndex(Request $request) { @@ -167,9 +168,9 @@ class PreferencesController extends Controller // custom fiscal year $customFiscalYear = 1 === (int)$request->get('customFiscalYear'); - $string = strtotime((string)$request->get('fiscalYearStart')); - if(false !== $string) { - $fiscalYearStart = date('m-d', $string); + $string = strtotime((string)$request->get('fiscalYearStart')); + if (false !== $string) { + $fiscalYearStart = date('m-d', $string); app('preferences')->set('customFiscalYear', $customFiscalYear); app('preferences')->set('fiscalYearStart', $fiscalYearStart); } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 469138d1e0..449dd65dcf 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -93,49 +93,6 @@ class ProfileController extends Controller $this->middleware(IsDemoUser::class)->except(['index']); } - /** - * - */ - public function logoutOtherSessions() - { - if (!$this->internalAuth) { - session()->flash('info', (string)trans('firefly.external_auth_disabled')); - - return redirect(route('profile.index')); - } - - return prefixView('profile.logout-other-sessions'); - } - - /** - * @param Request $request - * - * @return Application|RedirectResponse|Redirector - * @throws AuthenticationException - */ - public function postLogoutOtherSessions(Request $request) - { - if (!$this->internalAuth) { - session()->flash('info', (string)trans('firefly.external_auth_disabled')); - - return redirect(route('profile.index')); - } - $creds = [ - 'email' => auth()->user()->email, - 'password' => $request->get('password'), - ]; - if (Auth::once($creds)) { - Auth::logoutOtherDevices($request->get('password')); - session()->flash('info', (string)trans('firefly.other_sessions_logged_out')); - - return redirect(route('profile.index')); - } - session()->flash('error', (string)trans('auth.failed')); - - return redirect(route('profile.index')); - - } - /** * Change your email address. * @@ -388,6 +345,20 @@ class ProfileController extends Controller ); } + /** + * + */ + public function logoutOtherSessions() + { + if (!$this->internalAuth) { + session()->flash('info', (string)trans('firefly.external_auth_disabled')); + + return redirect(route('profile.index')); + } + + return prefixView('profile.logout-other-sessions'); + } + /** * @param Request $request * @@ -548,6 +519,49 @@ class ProfileController extends Controller return redirect(route('profile.index')); } + /** + * See reference nr. 64 + * + * @param string $mfaCode + * + * @throws FireflyException + */ + private function addToMFAHistory(string $mfaCode): void + { + /** @var array $mfaHistory */ + $mfaHistory = app('preferences')->get('mfa_history', [])->data; + $entry = [ + 'time' => time(), + 'code' => $mfaCode, + ]; + $mfaHistory[] = $entry; + + app('preferences')->set('mfa_history', $mfaHistory); + $this->filterMFAHistory(); + } + + /** + * Remove old entries from the preferences array. + */ + private function filterMFAHistory(): void + { + /** @var array $mfaHistory */ + $mfaHistory = app('preferences')->get('mfa_history', [])->data; + $newHistory = []; + $now = time(); + foreach ($mfaHistory as $entry) { + $time = $entry['time']; + $code = $entry['code']; + if ($now - $time <= 300) { + $newHistory[] = [ + 'time' => $time, + 'code' => $code, + ]; + } + } + app('preferences')->set('mfa_history', $newHistory); + } + /** * Submit delete account. * @@ -580,6 +594,35 @@ class ProfileController extends Controller return redirect(route('index')); } + /** + * @param Request $request + * + * @return Application|RedirectResponse|Redirector + * @throws AuthenticationException + */ + public function postLogoutOtherSessions(Request $request) + { + if (!$this->internalAuth) { + session()->flash('info', (string)trans('firefly.external_auth_disabled')); + + return redirect(route('profile.index')); + } + $creds = [ + 'email' => auth()->user()->email, + 'password' => $request->get('password'), + ]; + if (Auth::once($creds)) { + Auth::logoutOtherDevices($request->get('password')); + session()->flash('info', (string)trans('firefly.other_sessions_logged_out')); + + return redirect(route('profile.index')); + } + session()->flash('error', (string)trans('auth.failed')); + + return redirect(route('profile.index')); + + } + /** * Regenerate access token. * @@ -659,46 +702,4 @@ class ProfileController extends Controller return redirect(route('login')); } - - /** - * See reference nr. 64 - * - * @param string $mfaCode - * @throws FireflyException - */ - private function addToMFAHistory(string $mfaCode): void - { - /** @var array $mfaHistory */ - $mfaHistory = app('preferences')->get('mfa_history', [])->data; - $entry = [ - 'time' => time(), - 'code' => $mfaCode, - ]; - $mfaHistory[] = $entry; - - app('preferences')->set('mfa_history', $mfaHistory); - $this->filterMFAHistory(); - } - - /** - * Remove old entries from the preferences array. - */ - private function filterMFAHistory(): void - { - /** @var array $mfaHistory */ - $mfaHistory = app('preferences')->get('mfa_history', [])->data; - $newHistory = []; - $now = time(); - foreach ($mfaHistory as $entry) { - $time = $entry['time']; - $code = $entry['code']; - if ($now - $time <= 300) { - $newHistory[] = [ - 'time' => $time, - 'code' => $code, - ]; - } - } - app('preferences')->set('mfa_history', $newHistory); - } } diff --git a/app/Http/Controllers/Recurring/CreateController.php b/app/Http/Controllers/Recurring/CreateController.php index 08a995118b..1f44183101 100644 --- a/app/Http/Controllers/Recurring/CreateController.php +++ b/app/Http/Controllers/Recurring/CreateController.php @@ -46,9 +46,9 @@ use Illuminate\View\View; class CreateController extends Controller { private AttachmentHelperInterface $attachments; + private BillRepositoryInterface $billRepository; private BudgetRepositoryInterface $budgetRepos; private RecurringRepositoryInterface $recurring; - private BillRepositoryInterface $billRepository; /** * CreateController constructor. diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php index 432d4b5eb2..3ddaafd699 100644 --- a/app/Http/Controllers/Recurring/EditController.php +++ b/app/Http/Controllers/Recurring/EditController.php @@ -47,9 +47,9 @@ use Symfony\Component\HttpFoundation\ParameterBag; class EditController extends Controller { private AttachmentHelperInterface $attachments; + private BillRepositoryInterface $billRepository; private BudgetRepositoryInterface $budgetRepos; private RecurringRepositoryInterface $recurring; - private BillRepositoryInterface $billRepository; /** * EditController constructor. diff --git a/app/Http/Controllers/Recurring/IndexController.php b/app/Http/Controllers/Recurring/IndexController.php index 367c14793a..dfcd70da3c 100644 --- a/app/Http/Controllers/Recurring/IndexController.php +++ b/app/Http/Controllers/Recurring/IndexController.php @@ -68,7 +68,7 @@ class IndexController extends Controller } /** -* See reference nr. 70 + * See reference nr. 70 * Show all recurring transactions. * * @param Request $request @@ -121,7 +121,7 @@ class IndexController extends Controller } $paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page); $paginator->setPath(route('recurring.index')); - $today = today(config('app.timezone')); + $today = today(config('app.timezone')); $this->verifyRecurringCronJob(); diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 0f8b992b97..4765b0990f 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -27,6 +27,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; use Log; use Throwable; @@ -44,7 +45,7 @@ class AccountController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function general(Collection $accounts, Carbon $start, Carbon $end) { @@ -55,7 +56,7 @@ class AccountController extends Controller $cache->addProperty('account-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } /** @var AccountTaskerInterface $accountTasker */ diff --git a/app/Http/Controllers/Report/BillController.php b/app/Http/Controllers/Report/BillController.php index 961dadd074..3996e4ba5a 100644 --- a/app/Http/Controllers/Report/BillController.php +++ b/app/Http/Controllers/Report/BillController.php @@ -53,7 +53,7 @@ class BillController extends Controller $cache->addProperty('bill-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } /** @var ReportHelperInterface $helper */ $helper = app(ReportHelperInterface::class); diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index eadfe8866f..693518fc67 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -36,6 +36,7 @@ use FireflyIII\Support\Report\Budget\BudgetReportGenerator; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; +use JsonException; use Log; use Throwable; @@ -307,7 +308,7 @@ class BudgetController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function period(Collection $accounts, Carbon $start, Carbon $end) { @@ -317,7 +318,7 @@ class BudgetController extends Controller $cache->addProperty('budget-period-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $periods = app('navigation')->listOfPeriods($start, $end); diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index c8a0fce6c4..26bc06f4d1 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -34,6 +34,7 @@ use FireflyIII\Support\Report\Category\CategoryReportGenerator; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; +use JsonException; use Log; use Throwable; @@ -488,7 +489,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function expenses(Collection $accounts, Carbon $start, Carbon $end) { @@ -498,7 +499,7 @@ class CategoryController extends Controller $cache->addProperty('category-period-expenses-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } // depending on the carbon format (a reliable way to determine the general date difference) @@ -569,7 +570,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return string - * @throws \JsonException + * @throws JsonException */ public function income(Collection $accounts, Carbon $start, Carbon $end): string { @@ -579,7 +580,7 @@ class CategoryController extends Controller $cache->addProperty('category-period-income-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } // depending on the carbon format (a reliable way to determine the general date difference) @@ -648,7 +649,7 @@ class CategoryController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end) { @@ -659,7 +660,7 @@ class CategoryController extends Controller $cache->addProperty('category-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } /** @var CategoryReportGenerator $generator */ @@ -678,6 +679,7 @@ class CategoryController extends Controller Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage())); $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage()); } + return $result; } diff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.php index 71dc05966c..d9b1ea40ac 100644 --- a/app/Http/Controllers/Report/DoubleController.php +++ b/app/Http/Controllers/Report/DoubleController.php @@ -292,7 +292,7 @@ class DoubleController extends Controller } /** -* See reference nr. 67 + * See reference nr. 67 * * @param Collection $accounts * @param int $id diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php index 63e5b3bdd9..7ebe75ef23 100644 --- a/app/Http/Controllers/Report/OperationsController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -27,6 +27,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; use Log; use Throwable; @@ -66,7 +67,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function expenses(Collection $accounts, Carbon $start, Carbon $end) { @@ -77,7 +78,7 @@ class OperationsController extends Controller $cache->addProperty('expense-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $report = $this->tasker->getExpenseReport($start, $end, $accounts); $type = 'expense-entry'; @@ -102,7 +103,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return string - * @throws \JsonException + * @throws JsonException */ public function income(Collection $accounts, Carbon $start, Carbon $end): string { @@ -113,7 +114,7 @@ class OperationsController extends Controller $cache->addProperty('income-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $report = $this->tasker->getIncomeReport($start, $end, $accounts); $type = 'income-entry'; @@ -138,7 +139,7 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string - * @throws \JsonException + * @throws JsonException */ public function operations(Collection $accounts, Carbon $start, Carbon $end) { @@ -149,7 +150,7 @@ class OperationsController extends Controller $cache->addProperty('inc-exp-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $incomes = $this->tasker->getIncomeReport($start, $end, $accounts); diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 79c97dbec1..4dba93dd6c 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -89,7 +89,7 @@ class ReportController extends Controller public function auditReport(Collection $accounts, Carbon $start, Carbon $end) { if ($end < $start) { - return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); + return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); } $this->repository->cleanupBudgets(); @@ -125,7 +125,7 @@ class ReportController extends Controller public function budgetReport(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end) { if ($end < $start) { - return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); + return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); } $this->repository->cleanupBudgets(); @@ -162,7 +162,7 @@ class ReportController extends Controller public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end) { if ($end < $start) { - return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); + return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); } $this->repository->cleanupBudgets(); @@ -400,7 +400,7 @@ class ReportController extends Controller public function tagReport(Collection $accounts, Collection $tags, Carbon $start, Carbon $end) { if ($end < $start) { - return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); + return prefixView('error')->with('message', (string)trans('firefly.end_after_start_date')); } $this->repository->cleanupBudgets(); diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php index 7a51740b24..c9d2173d27 100644 --- a/app/Http/Controllers/Rule/CreateController.php +++ b/app/Http/Controllers/Rule/CreateController.php @@ -265,12 +265,12 @@ class CreateController extends Controller // redirect to show bill. if ('true' === $request->get('return_to_bill') && (int)$request->get('bill_id') > 0) { - return redirect(route('bills.show', [(int)$request->get('bill_id')])); + return redirect(route('bills.show', [(int)$request->get('bill_id')])); } // redirect to new bill creation. if ((int)$request->get('bill_id') > 0) { - return redirect($this->getPreviousUri('bills.create.uri')); + return redirect($this->getPreviousUri('bills.create.uri')); } $redirect = redirect($this->getPreviousUri('rules.create.uri')); diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php index ac7671bdc0..f225f59ab8 100644 --- a/app/Http/Controllers/Rule/EditController.php +++ b/app/Http/Controllers/Rule/EditController.php @@ -143,7 +143,7 @@ class EditController extends Controller */ private function parseFromOperators(array $submittedOperators): array { -// See reference nr. 65 + // See reference nr. 65 $operators = config('firefly.search.operators'); $renderedEntries = []; $triggers = []; diff --git a/app/Http/Controllers/Rule/IndexController.php b/app/Http/Controllers/Rule/IndexController.php index 3826c02cbc..13a130e9b8 100644 --- a/app/Http/Controllers/Rule/IndexController.php +++ b/app/Http/Controllers/Rule/IndexController.php @@ -79,8 +79,8 @@ class IndexController extends Controller } /** - * @param Request $request - * @param Rule $rule + * @param Request $request + * @param Rule $rule * @param RuleGroup $ruleGroup * * @return JsonResponse diff --git a/app/Http/Controllers/Rule/SelectController.php b/app/Http/Controllers/Rule/SelectController.php index 49e208424d..b5b684fb22 100644 --- a/app/Http/Controllers/Rule/SelectController.php +++ b/app/Http/Controllers/Rule/SelectController.php @@ -145,7 +145,7 @@ class SelectController extends Controller // warn if nothing. if (empty($textTriggers)) { - return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); + return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); } foreach ($textTriggers as $textTrigger) { @@ -169,7 +169,7 @@ class SelectController extends Controller // Warn the user if only a subset of transactions is returned $warning = ''; if (empty($collection)) { - $warning = (string)trans('firefly.warning_no_matching_transactions'); + $warning = (string)trans('firefly.warning_no_matching_transactions'); } // Return json response @@ -182,6 +182,7 @@ class SelectController extends Controller Log::error($exception->getTraceAsString()); $view = sprintf('Could not render list.journals-tiny: %s', $exception->getMessage()); } + return response()->json(['html' => $view, 'warning' => $warning]); } @@ -199,7 +200,7 @@ class SelectController extends Controller $triggers = $rule->ruleTriggers; if (empty($triggers)) { - return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); + return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); } // create new rule engine: $newRuleEngine = app(RuleEngineInterface::class); @@ -211,7 +212,7 @@ class SelectController extends Controller $warning = ''; if (empty($collection)) { - $warning = (string)trans('firefly.warning_no_matching_transactions'); + $warning = (string)trans('firefly.warning_no_matching_transactions'); } // Return json response @@ -223,6 +224,7 @@ class SelectController extends Controller Log::error(sprintf('Could not render view in testTriggersByRule(): %s', $exception->getMessage())); Log::error($exception->getTraceAsString()); } + return response()->json(['html' => $view, 'warning' => $warning]); } } diff --git a/app/Http/Controllers/RuleGroup/CreateController.php b/app/Http/Controllers/RuleGroup/CreateController.php index bf901a11e4..7abaccc79b 100644 --- a/app/Http/Controllers/RuleGroup/CreateController.php +++ b/app/Http/Controllers/RuleGroup/CreateController.php @@ -88,7 +88,7 @@ class CreateController extends Controller */ public function store(RuleGroupFormRequest $request) { - $data = $request->getRuleGroupData(); + $data = $request->getRuleGroupData(); $ruleGroup = $this->repository->store($data); session()->flash('success', (string)trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title])); diff --git a/app/Http/Controllers/RuleGroup/DeleteController.php b/app/Http/Controllers/RuleGroup/DeleteController.php index d499868af9..4fb542ee02 100644 --- a/app/Http/Controllers/RuleGroup/DeleteController.php +++ b/app/Http/Controllers/RuleGroup/DeleteController.php @@ -81,7 +81,7 @@ class DeleteController extends Controller /** * Actually destroy the rule group. * - * @param Request $request + * @param Request $request * @param RuleGroup $ruleGroup * * @return RedirectResponse|Redirector diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 8dbba9e584..c6b3278dd2 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -327,7 +327,7 @@ class TagController extends Controller } if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('tags.create.uri')); if (1 === (int)$request->get('create_another')) { @@ -368,7 +368,7 @@ class TagController extends Controller } if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); } $redirect = redirect($this->getPreviousUri('tags.edit.uri')); if (1 === (int)$request->get('return_to_edit')) { diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 8eee5404e5..7038fc2cfa 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -66,7 +66,7 @@ class BulkController extends Controller /** * Edit a set of journals in bulk. * -* See reference nr. 47 + * See reference nr. 47 * * @param array $journals * @@ -97,11 +97,11 @@ class BulkController extends Controller */ public function update(BulkEditJournalRequest $request) { - $journalIds = $request->get('journals'); - $journalIds = is_array($journalIds) ? $journalIds : []; + $journalIds = $request->get('journals'); + $journalIds = is_array($journalIds) ? $journalIds : []; $ignoreCategory = 1 === (int)$request->get('ignore_category'); - $ignoreBudget = 1 === (int)$request->get('ignore_budget'); - $tagsAction = $request->get('tags_action'); + $ignoreBudget = 1 === (int)$request->get('ignore_budget'); + $tagsAction = $request->get('tags_action'); $count = 0; diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index 12c50e21ca..d0c42883e4 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -47,7 +47,7 @@ use Log; /** * Class ConvertController. * -* See reference nr. 49 + * See reference nr. 49 */ class ConvertController extends Controller { @@ -91,7 +91,7 @@ class ConvertController extends Controller public function index(TransactionType $destinationType, TransactionGroup $group) { if (!$this->isEditableGroup($group)) { - return $this->redirectGroupToAccount($group); + return $this->redirectGroupToAccount($group); } /** @var TransactionGroupTransformer $transformer */ @@ -159,12 +159,12 @@ class ConvertController extends Controller $role = (string)$this->accountRepository->getMetaValue($account, 'account_role'); $name = $account->name; if ('' === $role) { - $role = 'no_account_type'; + $role = 'no_account_type'; } // maybe it's a liability thing: if (in_array($account->accountType->type, $liabilityTypes, true)) { - $role = 'l_' . $account->accountType->type; + $role = 'l_' . $account->accountType->type; } if (AccountType::CASH === $account->accountType->type) { @@ -173,7 +173,7 @@ class ConvertController extends Controller } if (AccountType::REVENUE === $account->accountType->type) { - $role = 'revenue_account'; + $role = 'revenue_account'; } $key = (string)trans('firefly.opt_group_' . $role); @@ -200,12 +200,12 @@ class ConvertController extends Controller $role = (string)$this->accountRepository->getMetaValue($account, 'account_role'); $name = $account->name; if ('' === $role) { - $role = 'no_account_type'; + $role = 'no_account_type'; } // maybe it's a liability thing: if (in_array($account->accountType->type, $liabilityTypes, true)) { - $role = 'l_' . $account->accountType->type; + $role = 'l_' . $account->accountType->type; } if (AccountType::CASH === $account->accountType->type) { @@ -214,7 +214,7 @@ class ConvertController extends Controller } if (AccountType::EXPENSE === $account->accountType->type) { - $role = 'expense_account'; + $role = 'expense_account'; } $key = (string)trans('firefly.opt_group_' . $role); @@ -264,7 +264,7 @@ class ConvertController extends Controller $currency = $this->accountRepository->getAccountCurrency($account) ?? $defaultCurrency; $role = (string)$this->accountRepository->getMetaValue($account, 'account_role'); if ('' === $role) { - $role = 'no_account_type'; + $role = 'no_account_type'; } $key = (string)trans('firefly.opt_group_' . $role); @@ -287,7 +287,7 @@ class ConvertController extends Controller public function postIndex(Request $request, TransactionType $destinationType, TransactionGroup $group) { if (!$this->isEditableGroup($group)) { - return $this->redirectGroupToAccount($group); + return $this->redirectGroupToAccount($group); } /** @var TransactionJournal $journal */ @@ -346,7 +346,7 @@ class ConvertController extends Controller throw new FireflyException(sprintf(trans('firefly.convert_invalid_destination'), $journal->id)); } -// See reference nr. 50 + // See reference nr. 50 $update = [ 'source_id' => $sourceId, diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php index ec36340853..4fc8d3c426 100644 --- a/app/Http/Controllers/Transaction/CreateController.php +++ b/app/Http/Controllers/Transaction/CreateController.php @@ -24,11 +24,13 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Transaction; use FireflyIII\Events\StoredTransactionGroup; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionGroup; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Update\GroupCloneService; use Illuminate\Contracts\View\Factory; +use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; @@ -86,8 +88,8 @@ class CreateController extends Controller * * @param string|null $objectType * - * @return Factory|\Illuminate\Contracts\View\View - * @throws \FireflyIII\Exceptions\FireflyException + * @return Factory|View + * @throws FireflyException */ public function create(?string $objectType) { diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index 24f0bb1e47..103342d2e9 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -73,7 +73,7 @@ class DeleteController extends Controller public function delete(TransactionGroup $group) { if (!$this->isEditableGroup($group)) { - return $this->redirectGroupToAccount($group); + return $this->redirectGroupToAccount($group); } Log::debug(sprintf('Start of delete view for group #%d', $group->id)); @@ -102,7 +102,7 @@ class DeleteController extends Controller public function destroy(TransactionGroup $group): RedirectResponse { if (!$this->isEditableGroup($group)) { - return $this->redirectGroupToAccount($group); + return $this->redirectGroupToAccount($group); } $journal = $group->transactionJournals->first(); diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php index ff9f2a9c37..64723d63d2 100644 --- a/app/Http/Controllers/Transaction/EditController.php +++ b/app/Http/Controllers/Transaction/EditController.php @@ -67,15 +67,15 @@ class EditController extends Controller app('preferences')->mark(); if (!$this->isEditableGroup($transactionGroup)) { - return $this->redirectGroupToAccount($transactionGroup); + return $this->redirectGroupToAccount($transactionGroup); } /** @var AccountRepositoryInterface $repository */ - $repository = app(AccountRepositoryInterface::class); + $repository = app(AccountRepositoryInterface::class); $allowedOpposingTypes = config('firefly.allowed_opposing_types'); - $accountToTypes = config('firefly.account_to_transaction'); - $expectedSourceTypes = config('firefly.expected_source_types'); - $allowedSourceDests = config('firefly.source_dests'); + $accountToTypes = config('firefly.account_to_transaction'); + $expectedSourceTypes = config('firefly.expected_source_types'); + $allowedSourceDests = config('firefly.source_dests'); // $defaultCurrency = app('amount')->getDefaultCurrency(); diff --git a/app/Http/Controllers/Transaction/IndexController.php b/app/Http/Controllers/Transaction/IndexController.php index ebb2c94618..45c4a54e15 100644 --- a/app/Http/Controllers/Transaction/IndexController.php +++ b/app/Http/Controllers/Transaction/IndexController.php @@ -77,7 +77,7 @@ class IndexController extends Controller */ public function index(Request $request, string $objectType, Carbon $start = null, Carbon $end = null) { - if('transfers' === $objectType) { + if ('transfers' === $objectType) { $objectType = 'transfer'; } diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php index c2438fdd6b..cf4748cfb5 100644 --- a/app/Http/Controllers/Transaction/LinkController.php +++ b/app/Http/Controllers/Transaction/LinkController.php @@ -40,7 +40,7 @@ use URL; */ class LinkController extends Controller { - private JournalRepositoryInterface $journalRepository; + private JournalRepositoryInterface $journalRepository; private LinkTypeRepositoryInterface $repository; /** diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 6a616aa312..aca4ad0619 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -168,8 +168,8 @@ class MassController extends Controller { $journalIds = $request->get('journals'); if (!is_array($journalIds)) { -// See reference nr. 48 - throw new FireflyException('This is not an array.'); + // See reference nr. 48 + throw new FireflyException('This is not an array.'); } $count = 0; /** @var string $journalId */ @@ -178,7 +178,7 @@ class MassController extends Controller try { $this->updateJournal($integer, $request); $count++; - } catch (FireflyException $e) { + } catch (FireflyException $e) { // @ignoreException } } @@ -200,7 +200,7 @@ class MassController extends Controller { $journal = $this->repository->find($journalId); if (null === $journal) { - throw new FireflyException(sprintf('Trying to edit non-existent or deleted journal #%d', $journalId)); + throw new FireflyException(sprintf('Trying to edit non-existent or deleted journal #%d', $journalId)); } $service = app(JournalUpdateService::class); // for each field, call the update service. diff --git a/app/Http/Middleware/Binder.php b/app/Http/Middleware/Binder.php index ace2cf4bc2..fb5255a15d 100644 --- a/app/Http/Middleware/Binder.php +++ b/app/Http/Middleware/Binder.php @@ -83,7 +83,7 @@ class Binder * * @param string $key * @param string $value - * @param Route $route + * @param Route $route * * @return mixed */ diff --git a/app/Http/Middleware/Installer.php b/app/Http/Middleware/Installer.php index 4bd9d29a01..a9184ae5d2 100644 --- a/app/Http/Middleware/Installer.php +++ b/app/Http/Middleware/Installer.php @@ -107,6 +107,7 @@ class Installer } throw new FireflyException(sprintf('Could not access the database: %s', $message), 0, $e); } + //Log::debug('Everything seems OK with the tables.'); return false; @@ -157,6 +158,7 @@ class Installer return true; } + //Log::info(sprintf('Configured DB version (%d) equals expected DB version (%d)', $dbVersion, $configVersion)); return false; @@ -183,6 +185,7 @@ class Installer return true; } + //Log::info(sprintf('Installed Firefly III version (%s) equals expected Firefly III version (%s)', $dbVersion, $configVersion)); return false; diff --git a/app/Http/Middleware/InterestingMessage.php b/app/Http/Middleware/InterestingMessage.php index abe5adf499..074e956bac 100644 --- a/app/Http/Middleware/InterestingMessage.php +++ b/app/Http/Middleware/InterestingMessage.php @@ -90,57 +90,6 @@ class InterestingMessage return null !== $transactionGroupId && null !== $message; } - /** - * @param Request $request - */ - private function handleAccountMessage(Request $request): void - { - - // get parameters from request. - $accountId = $request->get('account_id'); - $message = $request->get('message'); - - /** @var Account $account */ - $account = auth()->user()->accounts()->withTrashed()->find($accountId); - - if (null === $account) { - return; - } - if ('deleted' === $message) { - session()->flash('success', (string)trans('firefly.account_deleted', ['name' => $account->name])); - } - if ('created' === $message) { - session()->flash('success', (string)trans('firefly.stored_new_account', ['name' => $account->name])); - } - if ('updated' === $message) { - session()->flash('success', (string)trans('firefly.updated_account', ['name' => $account->name])); - } - } - - /** - * @param Request $request - */ - private function handleBillMessage(Request $request): void - { - - // get parameters from request. - $billId = $request->get('bill_id'); - $message = $request->get('message'); - - /** @var Bill $bill */ - $bill = auth()->user()->bills()->withTrashed()->find($billId); - - if (null === $bill) { - return; - } - if ('deleted' === $message) { - session()->flash('success', (string)trans('firefly.deleted_bill', ['name' => $bill->name])); - } - if ('created' === $message) { - session()->flash('success', (string)trans('firefly.stored_new_bill', ['name' => $bill->name])); - } - } - /** * @param Request $request */ @@ -197,6 +146,33 @@ class InterestingMessage return null !== $accountId && null !== $message; } + /** + * @param Request $request + */ + private function handleAccountMessage(Request $request): void + { + + // get parameters from request. + $accountId = $request->get('account_id'); + $message = $request->get('message'); + + /** @var Account $account */ + $account = auth()->user()->accounts()->withTrashed()->find($accountId); + + if (null === $account) { + return; + } + if ('deleted' === $message) { + session()->flash('success', (string)trans('firefly.account_deleted', ['name' => $account->name])); + } + if ('created' === $message) { + session()->flash('success', (string)trans('firefly.stored_new_account', ['name' => $account->name])); + } + if ('updated' === $message) { + session()->flash('success', (string)trans('firefly.updated_account', ['name' => $account->name])); + } + } + /** * @param Request $request * @@ -210,4 +186,28 @@ class InterestingMessage return null !== $billId && null !== $message; } + + /** + * @param Request $request + */ + private function handleBillMessage(Request $request): void + { + + // get parameters from request. + $billId = $request->get('bill_id'); + $message = $request->get('message'); + + /** @var Bill $bill */ + $bill = auth()->user()->bills()->withTrashed()->find($billId); + + if (null === $bill) { + return; + } + if ('deleted' === $message) { + session()->flash('success', (string)trans('firefly.deleted_bill', ['name' => $bill->name])); + } + if ('created' === $message) { + session()->flash('success', (string)trans('firefly.stored_new_bill', ['name' => $bill->name])); + } + } } diff --git a/app/Http/Middleware/IsDemoUser.php b/app/Http/Middleware/IsDemoUser.php index 04e5457db0..1ce1bf9647 100644 --- a/app/Http/Middleware/IsDemoUser.php +++ b/app/Http/Middleware/IsDemoUser.php @@ -60,7 +60,7 @@ class IsDemoUser return response()->redirectTo($previous); } - return response()->redirectTo(route('index')); + return response()->redirectTo(route('index')); } return $next($request); diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php index 66d7097a96..482c9951c6 100644 --- a/app/Http/Requests/AccountFormRequest.php +++ b/app/Http/Requests/AccountFormRequest.php @@ -69,7 +69,7 @@ class AccountFormRequest extends FormRequest if (false === $this->boolean('include_net_worth')) { $data['include_net_worth'] = '0'; } - if('0' === $data['opening_balance']) { + if ('0' === $data['opening_balance']) { $data['opening_balance'] = ''; } diff --git a/app/Http/Requests/ObjectGroupFormRequest.php b/app/Http/Requests/ObjectGroupFormRequest.php index f17d09557a..cda7aa70b2 100644 --- a/app/Http/Requests/ObjectGroupFormRequest.php +++ b/app/Http/Requests/ObjectGroupFormRequest.php @@ -55,7 +55,7 @@ class ObjectGroupFormRequest extends FormRequest { /** @var ObjectGroup $objectGroup */ $objectGroup = $this->route()->parameter('objectGroup'); - $titleRule = 'required|between:1,255|uniqueObjectGroup'; + $titleRule = 'required|between:1,255|uniqueObjectGroup'; if (null !== $objectGroup) { $titleRule = sprintf('required|between:1,255|uniqueObjectGroup:%d', $objectGroup->id); diff --git a/app/Http/Requests/ReconciliationStoreRequest.php b/app/Http/Requests/ReconciliationStoreRequest.php index ad5bdd5f65..81866fae41 100644 --- a/app/Http/Requests/ReconciliationStoreRequest.php +++ b/app/Http/Requests/ReconciliationStoreRequest.php @@ -45,7 +45,7 @@ class ReconciliationStoreRequest extends FormRequest { $transactions = $this->get('journals'); if (!is_array($transactions)) { - $transactions = []; + $transactions = []; } $data = [ 'start' => $this->date('start'), diff --git a/app/Http/Requests/TestRuleFormRequest.php b/app/Http/Requests/TestRuleFormRequest.php index 27dd553aee..5c7b7d920b 100644 --- a/app/Http/Requests/TestRuleFormRequest.php +++ b/app/Http/Requests/TestRuleFormRequest.php @@ -37,7 +37,7 @@ class TestRuleFormRequest extends FormRequest /** * Rules for this request. -* See reference nr. 46 + * See reference nr. 46 * * @return array */ diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 1ecce5dba6..2c08727de5 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -40,9 +40,9 @@ class MailError extends Job implements ShouldQueue use InteractsWithQueue, SerializesModels; protected string $destination; - protected array $exception; + protected array $exception; protected string $ipAddress; - protected array $userData; + protected array $userData; /** * MailError constructor. diff --git a/app/Models/Account.php b/app/Models/Account.php index ececd3cca9..938f6a3d57 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -99,7 +99,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property string $location * @property string $liability_direction * @property string $current_debt - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static EloquentBuilder|Account whereUserGroupId($value) */ class Account extends Model diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php index ab1a324ea6..686ae491ce 100644 --- a/app/Models/Attachment.php +++ b/app/Models/Attachment.php @@ -78,7 +78,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Attachment withTrashed() * @method static Builder|Attachment withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserGroupId($value) */ class Attachment extends Model diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php index 05e89eb4cd..c2d514457c 100644 --- a/app/Models/AvailableBudget.php +++ b/app/Models/AvailableBudget.php @@ -34,17 +34,17 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\AvailableBudget * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at - * @property int $user_id - * @property int $transaction_currency_id - * @property string $amount - * @property Carbon $start_date - * @property Carbon $end_date - * @property-read TransactionCurrency $transactionCurrency - * @property-read User $user + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at + * @property int $user_id + * @property int $transaction_currency_id + * @property string $amount + * @property Carbon $start_date + * @property Carbon $end_date + * @property-read TransactionCurrency $transactionCurrency + * @property-read User $user * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery() * @method static Builder|AvailableBudget onlyTrashed() @@ -61,7 +61,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|AvailableBudget withTrashed() * @method static Builder|AvailableBudget withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserGroupId($value) */ class AvailableBudget extends Model diff --git a/app/Models/Bill.php b/app/Models/Bill.php index 6581eb2312..d0af591be6 100644 --- a/app/Models/Bill.php +++ b/app/Models/Bill.php @@ -94,7 +94,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Bill withTrashed() * @method static Builder|Bill withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserGroupId($value) */ class Bill extends Model diff --git a/app/Models/Budget.php b/app/Models/Budget.php index 6d07df3d48..590695cc76 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -75,7 +75,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Budget withoutTrashed() * @mixin Eloquent * @property string $email - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value) */ class Budget extends Model diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php index e05a37e28c..77bb3eee4c 100644 --- a/app/Models/BudgetLimit.php +++ b/app/Models/BudgetLimit.php @@ -32,19 +32,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\BudgetLimit * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property int $budget_id - * @property int|null $transaction_currency_id - * @property Carbon $start_date - * @property Carbon|null $end_date - * @property string $amount - * @property string $spent - * @property string|null $period - * @property int $generated - * @property-read Budget $budget - * @property-read TransactionCurrency|null $transactionCurrency + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property int $budget_id + * @property int|null $transaction_currency_id + * @property Carbon $start_date + * @property Carbon|null $end_date + * @property string $amount + * @property string $spent + * @property string|null $period + * @property int $generated + * @property-read Budget $budget + * @property-read TransactionCurrency|null $transactionCurrency * @method static Builder|BudgetLimit newModelQuery() * @method static Builder|BudgetLimit newQuery() * @method static Builder|BudgetLimit query() diff --git a/app/Models/Category.php b/app/Models/Category.php index 2623e25009..f7620877a9 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -69,7 +69,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Category withTrashed() * @method static Builder|Category withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Category whereUserGroupId($value) */ class Category extends Model diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php index fdc4fcd3a5..6929f4c470 100644 --- a/app/Models/CurrencyExchangeRate.php +++ b/app/Models/CurrencyExchangeRate.php @@ -32,19 +32,19 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\CurrencyExchangeRate * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property string|null $deleted_at - * @property int $user_id - * @property int $from_currency_id - * @property int $to_currency_id - * @property Carbon $date - * @property string $rate - * @property string|null $user_rate - * @property-read TransactionCurrency $fromCurrency - * @property-read TransactionCurrency $toCurrency - * @property-read User $user + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property string|null $deleted_at + * @property int $user_id + * @property int $from_currency_id + * @property int $to_currency_id + * @property Carbon $date + * @property string $rate + * @property string|null $user_rate + * @property-read TransactionCurrency $fromCurrency + * @property-read TransactionCurrency $toCurrency + * @property-read User $user * @method static Builder|CurrencyExchangeRate newModelQuery() * @method static Builder|CurrencyExchangeRate newQuery() * @method static Builder|CurrencyExchangeRate query() diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php index df91a6fcfa..cf6abf70a9 100644 --- a/app/Models/LinkType.php +++ b/app/Models/LinkType.php @@ -35,9 +35,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * FireflyIII\Models\LinkType * * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at * @property string $name * @property string $outward * @property string $inward diff --git a/app/Models/ObjectGroup.php b/app/Models/ObjectGroup.php index cd14db695a..4578efc14e 100644 --- a/app/Models/ObjectGroup.php +++ b/app/Models/ObjectGroup.php @@ -71,7 +71,7 @@ class ObjectGroup extends Model * @var array */ protected $casts - = [ + = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', 'user_id' => 'integer', diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php index 028b37cab0..2288ae7ef6 100644 --- a/app/Models/PiggyBank.php +++ b/app/Models/PiggyBank.php @@ -37,14 +37,14 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * FireflyIII\Models\PiggyBank * * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at * @property int $account_id * @property string $name * @property string $targetamount - * @property Carbon|null $startdate - * @property Carbon|null $targetdate + * @property Carbon|null $startdate + * @property Carbon|null $targetdate * @property int $order * @property bool $active * @property bool $encrypted diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php index 480a8819bc..f3b71fe2af 100644 --- a/app/Models/PiggyBankEvent.php +++ b/app/Models/PiggyBankEvent.php @@ -31,15 +31,15 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\PiggyBankEvent * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property int $piggy_bank_id - * @property int|null $transaction_journal_id - * @property Carbon $date - * @property string $amount - * @property PiggyBank $piggyBank - * @property-read TransactionJournal|null $transactionJournal + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property int $piggy_bank_id + * @property int|null $transaction_journal_id + * @property Carbon $date + * @property string $amount + * @property PiggyBank $piggyBank + * @property-read TransactionJournal|null $transactionJournal * @method static Builder|PiggyBankEvent newModelQuery() * @method static Builder|PiggyBankEvent newQuery() * @method static Builder|PiggyBankEvent query() diff --git a/app/Models/Recurrence.php b/app/Models/Recurrence.php index 2dca75f241..f96ff20744 100644 --- a/app/Models/Recurrence.php +++ b/app/Models/Recurrence.php @@ -86,7 +86,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Recurrence withTrashed() * @method static Builder|Recurrence withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserGroupId($value) */ class Recurrence extends Model diff --git a/app/Models/RecurrenceRepetition.php b/app/Models/RecurrenceRepetition.php index f3b88354a4..c5374980b4 100644 --- a/app/Models/RecurrenceRepetition.php +++ b/app/Models/RecurrenceRepetition.php @@ -33,16 +33,16 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\RecurrenceRepetition * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at - * @property int $recurrence_id - * @property string $repetition_type - * @property string $repetition_moment - * @property int $repetition_skip - * @property int $weekend - * @property-read Recurrence $recurrence + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at + * @property int $recurrence_id + * @property string $repetition_type + * @property string $repetition_moment + * @property int $repetition_skip + * @property int $weekend + * @property-read Recurrence $recurrence * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery() * @method static Builder|RecurrenceRepetition onlyTrashed() diff --git a/app/Models/RecurrenceTransaction.php b/app/Models/RecurrenceTransaction.php index 49118d0c40..9617e13a2b 100644 --- a/app/Models/RecurrenceTransaction.php +++ b/app/Models/RecurrenceTransaction.php @@ -35,25 +35,25 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\RecurrenceTransaction * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at - * @property int $recurrence_id - * @property int $transaction_currency_id - * @property int|null $foreign_currency_id - * @property int $source_id - * @property int $destination_id - * @property string $amount - * @property string|null $foreign_amount - * @property string $description - * @property-read Account $destinationAccount - * @property-read TransactionCurrency|null $foreignCurrency - * @property-read Recurrence $recurrence + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at + * @property int $recurrence_id + * @property int $transaction_currency_id + * @property int|null $foreign_currency_id + * @property int $source_id + * @property int $destination_id + * @property string $amount + * @property string|null $foreign_amount + * @property string $description + * @property-read Account $destinationAccount + * @property-read TransactionCurrency|null $foreignCurrency + * @property-read Recurrence $recurrence * @property-read Collection|RecurrenceTransactionMeta[] $recurrenceTransactionMeta - * @property-read int|null $recurrence_transaction_meta_count - * @property-read Account $sourceAccount - * @property-read TransactionCurrency $transactionCurrency + * @property-read int|null $recurrence_transaction_meta_count + * @property-read Account $sourceAccount + * @property-read TransactionCurrency $transactionCurrency * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery() * @method static Builder|RecurrenceTransaction onlyTrashed() @@ -73,9 +73,9 @@ use Illuminate\Support\Carbon; * @method static Builder|RecurrenceTransaction withTrashed() * @method static Builder|RecurrenceTransaction withoutTrashed() * @mixin Eloquent - * @property int|null $transaction_type_id + * @property int|null $transaction_type_id * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value) - * @property-read TransactionType|null $transactionType + * @property-read TransactionType|null $transactionType */ class RecurrenceTransaction extends Model { diff --git a/app/Models/Rule.php b/app/Models/Rule.php index f8bbd75b2a..732b3d6cd2 100644 --- a/app/Models/Rule.php +++ b/app/Models/Rule.php @@ -74,7 +74,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Rule withTrashed() * @method static Builder|Rule withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Rule whereUserGroupId($value) */ class Rule extends Model diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php index a4a2932fe2..922c4445c1 100644 --- a/app/Models/RuleAction.php +++ b/app/Models/RuleAction.php @@ -31,16 +31,16 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\RuleAction * - * @property int $id + * @property int $id * @property Carbon|null $created_at * @property Carbon|null $updated_at - * @property int $rule_id - * @property string $action_type - * @property string $action_value - * @property int $order - * @property bool $active - * @property bool $stop_processing - * @property-read Rule $rule + * @property int $rule_id + * @property string $action_type + * @property string $action_value + * @property int $order + * @property bool $active + * @property bool $stop_processing + * @property-read Rule $rule * @method static Builder|RuleAction newModelQuery() * @method static Builder|RuleAction newQuery() * @method static Builder|RuleAction query() diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php index 8481c2de12..b88d5f7bcf 100644 --- a/app/Models/RuleGroup.php +++ b/app/Models/RuleGroup.php @@ -36,19 +36,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\RuleGroup * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at - * @property int $user_id - * @property string $title - * @property string|null $description - * @property int $order - * @property bool $active - * @property bool $stop_processing + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at + * @property int $user_id + * @property string $title + * @property string|null $description + * @property int $order + * @property bool $active + * @property bool $stop_processing * @property Collection|Rule[] $rules - * @property-read int|null $rules_count - * @property-read User $user + * @property-read int|null $rules_count + * @property-read User $user * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup newQuery() * @method static Builder|RuleGroup onlyTrashed() @@ -66,7 +66,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|RuleGroup withTrashed() * @method static Builder|RuleGroup withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereUserGroupId($value) */ class RuleGroup extends Model diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php index 07153a1109..234e1feefa 100644 --- a/app/Models/RuleTrigger.php +++ b/app/Models/RuleTrigger.php @@ -31,16 +31,16 @@ use Illuminate\Support\Carbon; /** * FireflyIII\Models\RuleTrigger * - * @property int $id + * @property int $id * @property Carbon|null $created_at * @property Carbon|null $updated_at - * @property int $rule_id - * @property string $trigger_type - * @property string $trigger_value - * @property int $order - * @property bool $active - * @property bool $stop_processing - * @property-read Rule $rule + * @property int $rule_id + * @property string $trigger_type + * @property string $trigger_value + * @property int $order + * @property bool $active + * @property bool $stop_processing + * @property-read Rule $rule * @method static Builder|RuleTrigger newModelQuery() * @method static Builder|RuleTrigger newQuery() * @method static Builder|RuleTrigger query() diff --git a/app/Models/Tag.php b/app/Models/Tag.php index 6297365cea..8aa8b656b7 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -75,7 +75,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|Tag withTrashed() * @method static Builder|Tag withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|Tag whereUserGroupId($value) */ class Tag extends Model diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 5cfaeaf6a8..5f2d3019e7 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -35,31 +35,31 @@ use Illuminate\Database\Eloquent\SoftDeletes; /** * FireflyIII\Models\Transaction * - * @property int $id - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - * @property \Illuminate\Support\Carbon|null $deleted_at - * @property bool $reconciled - * @property int $account_id - * @property int $transaction_journal_id - * @property string|null $description - * @property int|null $transaction_currency_id - * @property string $modified - * @property string $modified_foreign - * @property string $date - * @property string $max_date - * @property string $amount - * @property string|null $foreign_amount - * @property int|null $foreign_currency_id - * @property int $identifier - * @property-read Account $account - * @property-read Collection|Budget[] $budgets - * @property-read int|null $budgets_count - * @property-read Collection|Category[] $categories - * @property-read int|null $categories_count - * @property-read TransactionCurrency|null $foreignCurrency - * @property-read TransactionCurrency|null $transactionCurrency - * @property-read TransactionJournal $transactionJournal + * @property int $id + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property \Illuminate\Support\Carbon|null $deleted_at + * @property bool $reconciled + * @property int $account_id + * @property int $transaction_journal_id + * @property string|null $description + * @property int|null $transaction_currency_id + * @property string $modified + * @property string $modified_foreign + * @property string $date + * @property string $max_date + * @property string $amount + * @property string|null $foreign_amount + * @property int|null $foreign_currency_id + * @property int $identifier + * @property-read Account $account + * @property-read Collection|Budget[] $budgets + * @property-read int|null $budgets_count + * @property-read Collection|Category[] $categories + * @property-read int|null $categories_count + * @property-read TransactionCurrency|null $foreignCurrency + * @property-read TransactionCurrency|null $transactionCurrency + * @property-read TransactionJournal $transactionJournal * @method static Builder|Transaction after(Carbon $date) * @method static Builder|Transaction before(Carbon $date) * @method static Builder|Transaction newModelQuery() @@ -83,7 +83,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Query\Builder|Transaction withTrashed() * @method static \Illuminate\Database\Query\Builder|Transaction withoutTrashed() * @mixin Eloquent - * @property int $the_count + * @property int $the_count */ class Transaction extends Model { diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php index ec3018c4a4..4b2c12bb04 100644 --- a/app/Models/TransactionCurrency.php +++ b/app/Models/TransactionCurrency.php @@ -35,9 +35,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * FireflyIII\Models\TransactionCurrency * * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at * @property bool $enabled * @property string $code * @property string $name diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.php index d29a0ef693..10a356b41d 100644 --- a/app/Models/TransactionGroup.php +++ b/app/Models/TransactionGroup.php @@ -58,7 +58,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|TransactionGroup withTrashed() * @method static Builder|TransactionGroup withoutTrashed() * @mixin Eloquent - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static \Illuminate\Database\Eloquent\Builder|TransactionGroup whereUserGroupId($value) */ class TransactionGroup extends Model diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index f89805655a..af8e072e96 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -24,7 +24,6 @@ namespace FireflyIII\Models; use Carbon\Carbon; use Eloquent; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; @@ -41,15 +40,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\TransactionJournal * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property Carbon|null $deleted_at - * @property int $user_id - * @property int $transaction_type_id - * @property int|null $transaction_group_id - * @property int|null $bill_id - * @property int|null $transaction_currency_id + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property Carbon|null $deleted_at + * @property int $user_id + * @property int $transaction_type_id + * @property int|null $transaction_group_id + * @property int|null $bill_id + * @property int|null $transaction_currency_id * @property string $description * @property Carbon $date * @property Carbon|null $interest_date @@ -71,20 +70,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property-read int|null $dest_journal_links_count * @property-read Collection|Note[] $notes * @property-read int|null $notes_count - * @property-read Collection|PiggyBankEvent[] $piggyBankEvents - * @property-read int|null $piggy_bank_events_count - * @property-read Collection|TransactionJournalLink[] $sourceJournalLinks - * @property-read int|null $source_journal_links_count - * @property-read Collection|Tag[] $tags - * @property-read int|null $tags_count - * @property-read TransactionCurrency|null $transactionCurrency - * @property-read TransactionGroup|null $transactionGroup - * @property-read Collection|TransactionJournalMeta[] $transactionJournalMeta - * @property-read int|null $transaction_journal_meta_count - * @property-read TransactionType $transactionType - * @property-read Collection|Transaction[] $transactions - * @property-read int|null $transactions_count - * @property-read User $user + * @property-read Collection|PiggyBankEvent[] $piggyBankEvents + * @property-read int|null $piggy_bank_events_count + * @property-read Collection|TransactionJournalLink[] $sourceJournalLinks + * @property-read int|null $source_journal_links_count + * @property-read Collection|Tag[] $tags + * @property-read int|null $tags_count + * @property-read TransactionCurrency|null $transactionCurrency + * @property-read TransactionGroup|null $transactionGroup + * @property-read Collection|TransactionJournalMeta[] $transactionJournalMeta + * @property-read int|null $transaction_journal_meta_count + * @property-read TransactionType $transactionType + * @property-read Collection|Transaction[] $transactions + * @property-read int|null $transactions_count + * @property-read User $user * @method static EloquentBuilder|TransactionJournal after(Carbon $date) * @method static EloquentBuilder|TransactionJournal before(Carbon $date) * @method static EloquentBuilder|TransactionJournal newModelQuery() @@ -113,10 +112,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static \Illuminate\Database\Query\Builder|TransactionJournal withTrashed() * @method static \Illuminate\Database\Query\Builder|TransactionJournal withoutTrashed() * @mixin Eloquent - * @property-read Collection|Location[] $locations - * @property-read int|null $locations_count - * @property int $the_count - * @property int|null $user_group_id + * @property-read Collection|Location[] $locations + * @property-read int|null $locations_count + * @property int $the_count + * @property int|null $user_group_id * @method static EloquentBuilder|TransactionJournal whereUserGroupId($value) */ class TransactionJournal extends Model diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php index f38091319e..f7ecd1b5d2 100644 --- a/app/Models/TransactionJournalLink.php +++ b/app/Models/TransactionJournalLink.php @@ -34,20 +34,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\TransactionJournalLink * - * @property int $id - * @property Carbon|null $created_at - * @property Carbon|null $updated_at - * @property int $link_type_id - * @property int $source_id - * @property int $destination_id - * @property string|null $comment - * @property-read TransactionJournal $destination - * @property-read LinkType $linkType - * @property-read Collection|Note[] $notes - * @property-read int|null $notes_count - * @property-read TransactionJournal $source - * @property-read string $inward - * @property-read string $outward + * @property int $id + * @property Carbon|null $created_at + * @property Carbon|null $updated_at + * @property int $link_type_id + * @property int $source_id + * @property int $destination_id + * @property string|null $comment + * @property-read TransactionJournal $destination + * @property-read LinkType $linkType + * @property-read Collection|Note[] $notes + * @property-read int|null $notes_count + * @property-read TransactionJournal $source + * @property-read string $inward + * @property-read string $outward * @method static Builder|TransactionJournalLink newModelQuery() * @method static Builder|TransactionJournalLink newQuery() * @method static Builder|TransactionJournalLink query() diff --git a/app/Models/Webhook.php b/app/Models/Webhook.php index e4963677e9..1eb3fcb069 100644 --- a/app/Models/Webhook.php +++ b/app/Models/Webhook.php @@ -71,7 +71,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @property string $secret * @method static Builder|Webhook whereSecret($value) * @method static Builder|Webhook whereTitle($value) - * @property int|null $user_group_id + * @property int|null $user_group_id * @method static Builder|Webhook whereUserGroupId($value) */ class Webhook extends Model @@ -92,7 +92,7 @@ class Webhook extends Model // delivery public const DELIVERY_JSON = 300; protected $casts - = [ + = [ 'active' => 'boolean', 'trigger' => 'integer', 'response' => 'integer', diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index c9ff95a863..4eff73f510 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -126,15 +126,15 @@ class EventServiceProvider extends ServiceProvider ], // account related events: - StoredAccount::class => [ + StoredAccount::class => [ 'FireflyIII\Handlers\Events\StoredAccountEventHandler@recalculateCredit', - ], - UpdatedAccount::class => [ + ], + UpdatedAccount::class => [ 'FireflyIII\Handlers\Events\UpdatedAccountEventHandler@recalculateCredit', ], // LDAP related events: - Imported::class => [ + Imported::class => [ 'FireflyIII\Handlers\Events\LDAPEventHandler@importedUser', ], ]; diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 4cbd918fbe..a1e0fd81da 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -40,6 +40,7 @@ use FireflyIII\User; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Collection; +use JsonException; use Log; use Storage; @@ -115,6 +116,41 @@ class AccountRepository implements AccountRepositoryInterface } + /** + * @param int $accountId + * + * @return Account|null + */ + public function find(int $accountId): ?Account + { + return $this->user->accounts()->find($accountId); + } + + /** + * @inheritDoc + */ + public function findByAccountNumber(string $number, array $types): ?Account + { + $dbQuery = $this->user + ->accounts() + ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id') + ->where('accounts.active', true) + ->where( + function (EloquentBuilder $q1) use ($number) { + $json = json_encode($number); + $q1->where('account_meta.name', '=', 'account_number'); + $q1->where('account_meta.data', '=', $json); + } + ); + + if (!empty($types)) { + $dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); + $dbQuery->whereIn('account_types.type', $types); + } + + return $dbQuery->first(['accounts.*']); + } + /** * @param string $iban * @param array $types @@ -162,16 +198,6 @@ class AccountRepository implements AccountRepositoryInterface return $account; } - /** - * @param int $accountId - * - * @return Account|null - */ - public function find(int $accountId): ?Account - { - return $this->user->accounts()->find($accountId); - } - /** * @param Account $account * @@ -310,6 +336,23 @@ class AccountRepository implements AccountRepositoryInterface return $factory->findOrCreate('Cash account', $type->type); } + /** + * @inheritDoc + */ + public function getCreditTransactionGroup(Account $account): ?TransactionGroup + { + $journal = TransactionJournal + ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transactions.account_id', $account->id) + ->transactionTypes([TransactionType::LIABILITY_CREDIT]) + ->first(['transaction_journals.*']); + if (null === $journal) { + return null; + } + + return $journal->transactionGroup; + } + /** * @param array $types * @@ -731,7 +774,7 @@ class AccountRepository implements AccountRepositoryInterface * * @return Account * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ public function update(Account $account, array $data): Account { @@ -741,46 +784,4 @@ class AccountRepository implements AccountRepositoryInterface return $service->update($account, $data); } - /** - * @inheritDoc - */ - public function getCreditTransactionGroup(Account $account): ?TransactionGroup - { - $journal = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transactions.account_id', $account->id) - ->transactionTypes([TransactionType::LIABILITY_CREDIT]) - ->first(['transaction_journals.*']); - if (null === $journal) { - return null; - } - - return $journal->transactionGroup; - } - - /** - * @inheritDoc - */ - public function findByAccountNumber(string $number, array $types): ?Account - { - $dbQuery = $this->user - ->accounts() - ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id') - ->where('accounts.active', true) - ->where( - function (EloquentBuilder $q1) use ($number) { - $json = json_encode($number); - $q1->where('account_meta.name', '=', 'account_number'); - $q1->where('account_meta.data', '=', $json); - } - ); - - if (!empty($types)) { - $dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); - $dbQuery->whereIn('account_types.type', $types); - } - - return $dbQuery->first(['accounts.*']); - } - } diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 2985643d99..8f585ad173 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -66,6 +66,13 @@ interface AccountRepositoryInterface */ public function expandWithDoubles(Collection $accounts): Collection; + /** + * @param int $accountId + * + * @return Account|null + */ + public function find(int $accountId): ?Account; + /** * @param string $number * @param array $types @@ -90,13 +97,6 @@ interface AccountRepositoryInterface */ public function findByName(string $name, array $types): ?Account; - /** - * @param int $accountId - * - * @return Account|null - */ - public function find(int $accountId): ?Account; - /** * @param Account $account * @@ -147,6 +147,13 @@ interface AccountRepositoryInterface */ public function getCashAccount(): Account; + /** + * @param Account $account + * + * @return TransactionGroup|null + */ + public function getCreditTransactionGroup(Account $account): ?TransactionGroup; + /** * @param array $types * @@ -208,13 +215,6 @@ interface AccountRepositoryInterface */ public function getOpeningBalanceDate(Account $account): ?string; - /** - * @param Account $account - * - * @return TransactionGroup|null - */ - public function getCreditTransactionGroup(Account $account): ?TransactionGroup; - /** * @param Account $account * diff --git a/app/Repositories/Account/OperationsRepositoryInterface.php b/app/Repositories/Account/OperationsRepositoryInterface.php index 86ccdae393..a8cc6db89b 100644 --- a/app/Repositories/Account/OperationsRepositoryInterface.php +++ b/app/Repositories/Account/OperationsRepositoryInterface.php @@ -78,21 +78,6 @@ interface OperationsRepositoryInterface public function sumExpenses(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $expense = null, ?TransactionCurrency $currency = null ): array; - /** - * Sum of withdrawal journals in period for a set of accounts, grouped per source / currency. Amounts are always negative. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection|null $accounts - * @param Collection|null $expense - * @param TransactionCurrency|null $currency - * - * @return array - */ - public function sumExpensesBySource( - Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $expense = null, ?TransactionCurrency $currency = null - ): array; - /** * Sum of withdrawal journals in period for a set of accounts, grouped per destination / currency. Amounts are always negative. * @@ -108,6 +93,21 @@ interface OperationsRepositoryInterface Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $expense = null, ?TransactionCurrency $currency = null ): array; + /** + * Sum of withdrawal journals in period for a set of accounts, grouped per source / currency. Amounts are always negative. + * + * @param Carbon $start + * @param Carbon $end + * @param Collection|null $accounts + * @param Collection|null $expense + * @param TransactionCurrency|null $currency + * + * @return array + */ + public function sumExpensesBySource( + Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $expense = null, ?TransactionCurrency $currency = null + ): array; + /** * Sum of income journals in period for a set of accounts, grouped per currency. Amounts are always positive. * @@ -133,7 +133,8 @@ interface OperationsRepositoryInterface * * @return array */ - public function sumIncomeByDestination(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $revenue = null, ?TransactionCurrency $currency = null + public function sumIncomeByDestination(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $revenue = null, + ?TransactionCurrency $currency = null ): array; /** @@ -147,7 +148,8 @@ interface OperationsRepositoryInterface * * @return array */ - public function sumIncomeBySource(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $revenue = null, ?TransactionCurrency $currency = null + public function sumIncomeBySource(Carbon $start, Carbon $end, ?Collection $accounts = null, ?Collection $revenue = null, + ?TransactionCurrency $currency = null ): array; /** diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 482448deda..3edc745aaa 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -41,6 +41,7 @@ use FireflyIII\User; use Illuminate\Database\Query\JoinClause; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; +use JsonException; use Log; use Storage; @@ -623,7 +624,7 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return Carbon - * @throws \JsonException + * @throws JsonException */ public function nextDateMatch(Bill $bill, Carbon $date): Carbon { @@ -652,7 +653,7 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return Carbon - * @throws \JsonException + * @throws JsonException */ public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon { diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 706a9632c8..0a189ba555 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -425,6 +425,48 @@ class BudgetRepository implements BudgetRepositoryInterface return $budget; } + /** + * @param string $oldName + * @param string $newName + */ + private function updateRuleActions(string $oldName, string $newName): void + { + $types = ['set_budget',]; + $actions = RuleAction::leftJoin('rules', 'rules.id', '=', 'rule_actions.rule_id') + ->where('rules.user_id', $this->user->id) + ->whereIn('rule_actions.action_type', $types) + ->where('rule_actions.action_value', $oldName) + ->get(['rule_actions.*']); + Log::debug(sprintf('Found %d actions to update.', $actions->count())); + /** @var RuleAction $action */ + foreach ($actions as $action) { + $action->action_value = $newName; + $action->save(); + Log::debug(sprintf('Updated action %d: %s', $action->id, $action->action_value)); + } + } + + /** + * @param string $oldName + * @param string $newName + */ + private function updateRuleTriggers(string $oldName, string $newName): void + { + $types = ['budget_is',]; + $triggers = RuleTrigger::leftJoin('rules', 'rules.id', '=', 'rule_triggers.rule_id') + ->where('rules.user_id', $this->user->id) + ->whereIn('rule_triggers.trigger_type', $types) + ->where('rule_triggers.trigger_value', $oldName) + ->get(['rule_triggers.*']); + Log::debug(sprintf('Found %d triggers to update.', $triggers->count())); + /** @var RuleTrigger $trigger */ + foreach ($triggers as $trigger) { + $trigger->trigger_value = $newName; + $trigger->save(); + Log::debug(sprintf('Updated trigger %d: %s', $trigger->id, $trigger->trigger_value)); + } + } + /** * @param Budget $budget * @param array $data @@ -473,46 +515,4 @@ class BudgetRepository implements BudgetRepositoryInterface $autoBudget->save(); } - - /** - * @param string $oldName - * @param string $newName - */ - private function updateRuleActions(string $oldName, string $newName): void - { - $types = ['set_budget',]; - $actions = RuleAction::leftJoin('rules', 'rules.id', '=', 'rule_actions.rule_id') - ->where('rules.user_id', $this->user->id) - ->whereIn('rule_actions.action_type', $types) - ->where('rule_actions.action_value', $oldName) - ->get(['rule_actions.*']); - Log::debug(sprintf('Found %d actions to update.', $actions->count())); - /** @var RuleAction $action */ - foreach ($actions as $action) { - $action->action_value = $newName; - $action->save(); - Log::debug(sprintf('Updated action %d: %s', $action->id, $action->action_value)); - } - } - - /** - * @param string $oldName - * @param string $newName - */ - private function updateRuleTriggers(string $oldName, string $newName): void - { - $types = ['budget_is',]; - $triggers = RuleTrigger::leftJoin('rules', 'rules.id', '=', 'rule_triggers.rule_id') - ->where('rules.user_id', $this->user->id) - ->whereIn('rule_triggers.trigger_type', $types) - ->where('rule_triggers.trigger_value', $oldName) - ->get(['rule_triggers.*']); - Log::debug(sprintf('Found %d triggers to update.', $triggers->count())); - /** @var RuleTrigger $trigger */ - foreach ($triggers as $trigger) { - $trigger->trigger_value = $newName; - $trigger->save(); - Log::debug(sprintf('Updated trigger %d: %s', $trigger->id, $trigger->trigger_value)); - } - } } diff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.php index 5b6686a7e0..ea82a15aa0 100644 --- a/app/Repositories/Budget/OperationsRepository.php +++ b/app/Repositories/Budget/OperationsRepository.php @@ -347,6 +347,17 @@ class OperationsRepository implements OperationsRepositoryInterface return $array; } + /** + * @return Collection + */ + private function getBudgets(): Collection + { + /** @var BudgetRepositoryInterface $repos */ + $repos = app(BudgetRepositoryInterface::class); + + return $repos->getActiveBudgets(); + } + /** * For now, simply refer to whichever repository holds this function. * See reference nr. 14 @@ -364,15 +375,4 @@ class OperationsRepository implements OperationsRepositoryInterface return $blRepository->getBudgetLimits($budget, $start, $end); } - - /** - * @return Collection - */ - private function getBudgets(): Collection - { - /** @var BudgetRepositoryInterface $repos */ - $repos = app(BudgetRepositoryInterface::class); - - return $repos->getActiveBudgets(); - } } diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 30bec9642b..c94a7be944 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -78,6 +78,18 @@ class CategoryRepository implements CategoryRepositoryInterface } } + /** + * Find a category or return NULL + * + * @param int $categoryId + * + * @return Category|null + */ + public function find(int $categoryId): ?Category + { + return $this->user->categories()->find($categoryId); + } + /** * Find a category. * @@ -118,18 +130,6 @@ class CategoryRepository implements CategoryRepositoryInterface return $result; } - /** - * Find a category or return NULL - * - * @param int $categoryId - * - * @return Category|null - */ - public function find(int $categoryId): ?Category - { - return $this->user->categories()->find($categoryId); - } - /** * @param Category $category * diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index 52966d31fd..007153ba61 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -46,6 +46,15 @@ interface CategoryRepositoryInterface */ public function destroyAll(): void; + /** + * Find a category or return NULL + * + * @param int $categoryId + * + * @return Category|null + */ + public function find(int $categoryId): ?Category; + /** * Find a category. * @@ -63,15 +72,6 @@ interface CategoryRepositoryInterface */ public function findCategory(?int $categoryId, ?string $categoryName): ?Category; - /** - * Find a category or return NULL - * - * @param int $categoryId - * - * @return Category|null - */ - public function find(int $categoryId): ?Category; - /** * @param Category $category * diff --git a/app/Repositories/Category/NoCategoryRepository.php b/app/Repositories/Category/NoCategoryRepository.php index 73e2d28e6a..d24e528f8b 100644 --- a/app/Repositories/Category/NoCategoryRepository.php +++ b/app/Repositories/Category/NoCategoryRepository.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Repositories\Category; + use Carbon\Carbon; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\TransactionType; diff --git a/app/Repositories/Category/NoCategoryRepositoryInterface.php b/app/Repositories/Category/NoCategoryRepositoryInterface.php index 5285ffea95..c1835114b5 100644 --- a/app/Repositories/Category/NoCategoryRepositoryInterface.php +++ b/app/Repositories/Category/NoCategoryRepositoryInterface.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Repositories\Category; + use Carbon\Carbon; use FireflyIII\User; use Illuminate\Support\Collection; diff --git a/app/Repositories/Category/OperationsRepository.php b/app/Repositories/Category/OperationsRepository.php index 3b7319a049..9e9af1504d 100644 --- a/app/Repositories/Category/OperationsRepository.php +++ b/app/Repositories/Category/OperationsRepository.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Repositories\Category; + use Carbon\Carbon; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\TransactionType; @@ -98,7 +99,7 @@ class OperationsRepository implements OperationsRepositoryInterface // add journal to array: // only a subset of the fields. - $journalId = (int)$journal['transaction_journal_id']; + $journalId = (int)$journal['transaction_journal_id']; $array[$currencyId]['categories'][$categoryId]['transaction_journals'][$journalId] = [ 'amount' => app('steam')->negative($journal['amount']), 'date' => $journal['date'], @@ -175,7 +176,7 @@ class OperationsRepository implements OperationsRepositoryInterface // add journal to array: // only a subset of the fields. - $journalId = (int)$journal['transaction_journal_id']; + $journalId = (int)$journal['transaction_journal_id']; $array[$currencyId]['categories'][$categoryId]['transaction_journals'][$journalId] = [ 'amount' => app('steam')->positive($journal['amount']), 'date' => $journal['date'], diff --git a/app/Repositories/Journal/JournalAPIRepository.php b/app/Repositories/Journal/JournalAPIRepository.php index ea86e6f1e2..7bee05f256 100644 --- a/app/Repositories/Journal/JournalAPIRepository.php +++ b/app/Repositories/Journal/JournalAPIRepository.php @@ -69,9 +69,9 @@ class JournalAPIRepository implements JournalAPIRepositoryInterface return $set->each( static function (Attachment $attachment) use ($disk) { - $notes = $attachment->notes()->first(); + $notes = $attachment->notes()->first(); $attachment->file_exists = $disk->exists($attachment->fileName()); - $attachment->notes = $notes ? $notes->text : ''; + $attachment->notes = $notes ? $notes->text : ''; return $attachment; } diff --git a/app/Repositories/Journal/JournalCLIRepository.php b/app/Repositories/Journal/JournalCLIRepository.php index fd1dd5aa29..8f35ff4b22 100644 --- a/app/Repositories/Journal/JournalCLIRepository.php +++ b/app/Repositories/Journal/JournalCLIRepository.php @@ -30,6 +30,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Support\CacheProperties; use FireflyIII\User; use Illuminate\Support\Collection; +use JsonException; use stdClass; /** @@ -117,7 +118,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface * @param string $field * * @return null|Carbon - * @throws \JsonException + * @throws JsonException */ public function getMetaDate(TransactionJournal $journal, string $field): ?Carbon { @@ -129,7 +130,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface if ($cache->has()) { $result = null; try { - $result = new Carbon($cache->get()); + $result = new Carbon($cache->get()); } catch (Exception $e) { // @phpstan-ignore-line // @ignoreException } @@ -161,7 +162,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface * @param string $field * * @return null|string - * @throws \JsonException + * @throws JsonException */ public function getMetaField(TransactionJournal $journal, string $field): ?string { @@ -171,7 +172,7 @@ class JournalCLIRepository implements JournalCLIRepositoryInterface $cache->addProperty($field); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $entry = $journal->transactionJournalMeta()->where('name', $field)->first(); diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 539c63ef59..ab33d71f2f 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -37,6 +37,7 @@ use FireflyIII\Services\Internal\Update\JournalUpdateService; use FireflyIII\Support\CacheProperties; use FireflyIII\User; use Illuminate\Support\Collection; +use JsonException; /** * Class JournalRepository. @@ -68,18 +69,6 @@ class JournalRepository implements JournalRepositoryInterface $service->destroy($journal); } - /** - * @inheritDoc - */ - public function findByType(array $types): Collection - { - return $this->user - ->transactionJournals() - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->whereIn('transaction_types.type', $types) - ->get(['transaction_journals.*']); - } - /** * Find a specific journal. * @@ -92,6 +81,18 @@ class JournalRepository implements JournalRepositoryInterface return $this->user->transactionJournals()->find($journalId); } + /** + * @inheritDoc + */ + public function findByType(array $types): Collection + { + return $this->user + ->transactionJournals() + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->whereIn('transaction_types.type', $types) + ->get(['transaction_journals.*']); + } + /** * Get users first transaction journal or NULL. * @@ -129,7 +130,7 @@ class JournalRepository implements JournalRepositoryInterface * @param TransactionJournal $journal * * @return string - * @throws \JsonException + * @throws JsonException */ public function getJournalTotal(TransactionJournal $journal): string { @@ -137,7 +138,7 @@ class JournalRepository implements JournalRepositoryInterface $cache->addProperty($journal->id); $cache->addProperty('amount-positive'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } // saves on queries: @@ -186,7 +187,7 @@ class JournalRepository implements JournalRepositoryInterface * @param string $field * * @return null|Carbon - * @throws \JsonException + * @throws JsonException */ public function getMetaDateById(int $journalId, string $field): ?Carbon { @@ -196,7 +197,7 @@ class JournalRepository implements JournalRepositoryInterface $cache->addProperty($field); if ($cache->has()) { - return new Carbon($cache->get()); + return new Carbon($cache->get()); } $entry = TransactionJournalMeta::where('transaction_journal_id', $journalId) ->where('name', $field)->first(); diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index 0bf2fc4373..0fe9801237 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -50,13 +50,6 @@ interface JournalRepositoryInterface */ public function destroyJournal(TransactionJournal $journal): void; - /** - * @param array $types - * - * @return Collection - */ - public function findByType(array $types): Collection; - /** * See reference nr. 1 * Find a specific journal. @@ -67,6 +60,13 @@ interface JournalRepositoryInterface */ public function find(int $journalId): ?TransactionJournal; + /** + * @param array $types + * + * @return Collection + */ + public function findByType(array $types): Collection; + /** * Get users very first transaction journal. * diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index 9f19877476..1b43ef17af 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -80,6 +80,16 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface return true; } + /** + * @param int $linkTypeId + * + * @return LinkType|null + */ + public function find(int $linkTypeId): ?LinkType + { + return LinkType::find($linkTypeId); + } + /** * @param string|null $name * @@ -111,16 +121,6 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface return $count + $opposingCount > 0; } - /** - * @param int $linkTypeId - * - * @return LinkType|null - */ - public function find(int $linkTypeId): ?LinkType - { - return LinkType::find($linkTypeId); - } - /** * See if such a link already exists (and get it). * diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php index f805dcb036..17ce2decea 100644 --- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php +++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php @@ -55,6 +55,13 @@ interface LinkTypeRepositoryInterface */ public function destroyLink(TransactionJournalLink $link): bool; + /** + * @param int $linkTypeId + * + * @return LinkType|null + */ + public function find(int $linkTypeId): ?LinkType; + /** * Find link type by name. * @@ -74,13 +81,6 @@ interface LinkTypeRepositoryInterface */ public function findLink(TransactionJournal $one, TransactionJournal $two): bool; - /** - * @param int $linkTypeId - * - * @return LinkType|null - */ - public function find(int $linkTypeId): ?LinkType; - /** * See if such a link already exists (and get it). * diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index 94056fc3ae..3a631be562 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -88,7 +88,7 @@ trait ModifiesPiggyBanks */ public function canAddAmount(PiggyBank $piggyBank, string $amount): bool { - $today = today(config('app.timezone')); + $today = today(config('app.timezone')); $leftOnAccount = $this->leftOnAccount($piggyBank, $today); $savedSoFar = (string)$this->getRepetition($piggyBank)->currentamount; $leftToSave = bcsub($piggyBank->targetamount, $savedSoFar); diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 7f9b1af72a..62acee3803 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -54,6 +54,16 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface $this->user->piggyBanks()->delete(); } + /** + * @param int $piggyBankId + * + * @return PiggyBank|null + */ + public function find(int $piggyBankId): ?PiggyBank + { + return $this->user->piggyBanks()->find($piggyBankId); + } + /** * Find by name or return NULL. * @@ -66,16 +76,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface return $this->user->piggyBanks()->where('piggy_banks.name', $name)->first(['piggy_banks.*']); } - /** - * @param int $piggyBankId - * - * @return PiggyBank|null - */ - public function find(int $piggyBankId): ?PiggyBank - { - return $this->user->piggyBanks()->find($piggyBankId); - } - /** * @param int|null $piggyBankId * @param string|null $piggyBankName @@ -302,6 +302,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface $currentAmount = $this->getRepetition($piggy)->currentamount ?? '0'; $piggy->name = $piggy->name . ' (' . app('amount')->formatAnything($currency, $currentAmount, false) . ')'; } + return $set; } diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 423c1cea8e..cc0f494b7e 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -101,6 +101,13 @@ interface PiggyBankRepositoryInterface */ public function destroyAll(): void; + /** + * @param int $piggyBankId + * + * @return PiggyBank|null + */ + public function find(int $piggyBankId): ?PiggyBank; + /** * Find by name or return NULL. * @@ -110,13 +117,6 @@ interface PiggyBankRepositoryInterface */ public function findByName(string $name): ?PiggyBank; - /** - * @param int $piggyBankId - * - * @return PiggyBank|null - */ - public function find(int $piggyBankId): ?PiggyBank; - /** * @param int|null $piggyBankId * @param string|null $piggyBankName diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index 7cddb6a474..c0610fee8d 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -132,15 +132,15 @@ class RecurringRepository implements RecurringRepositoryInterface * * @param RecurrenceTransaction $recTransaction * - * @return null|string + * @return null|int */ - public function getCategoryName(RecurrenceTransaction $recTransaction): ?string + public function getCategoryId(RecurrenceTransaction $recTransaction): ?int { $return = ''; /** @var RecurrenceTransactionMeta $meta */ foreach ($recTransaction->recurrenceTransactionMeta as $meta) { - if ('category_name' === $meta->name) { - $return = (string)$meta->value; + if ('category_id' === $meta->name) { + $return = (int)$meta->value; } } @@ -152,15 +152,15 @@ class RecurringRepository implements RecurringRepositoryInterface * * @param RecurrenceTransaction $recTransaction * - * @return null|int + * @return null|string */ - public function getCategoryId(RecurrenceTransaction $recTransaction): ?int + public function getCategoryName(RecurrenceTransaction $recTransaction): ?string { $return = ''; /** @var RecurrenceTransactionMeta $meta */ foreach ($recTransaction->recurrenceTransactionMeta as $meta) { - if ('category_id' === $meta->name) { - $return = (int)$meta->value; + if ('category_name' === $meta->name) { + $return = (string)$meta->value; } } diff --git a/app/Repositories/Recurring/RecurringRepositoryInterface.php b/app/Repositories/Recurring/RecurringRepositoryInterface.php index 6d9e6a36ff..347bc79448 100644 --- a/app/Repositories/Recurring/RecurringRepositoryInterface.php +++ b/app/Repositories/Recurring/RecurringRepositoryInterface.php @@ -31,6 +31,7 @@ use FireflyIII\Models\RecurrenceTransaction; use FireflyIII\User; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; + /** * Interface RecurringRepositoryInterface * @@ -77,18 +78,18 @@ interface RecurringRepositoryInterface * * @param RecurrenceTransaction $recTransaction * - * @return null|string + * @return null|int */ - public function getCategoryName(RecurrenceTransaction $recTransaction): ?string; + public function getCategoryId(RecurrenceTransaction $recTransaction): ?int; /** * Get the category from a recurring transaction transaction. * * @param RecurrenceTransaction $recTransaction * - * @return null|int + * @return null|string */ - public function getCategoryId(RecurrenceTransaction $recTransaction): ?int; + public function getCategoryName(RecurrenceTransaction $recTransaction): ?string; /** * Returns the count of journals created for this recurrence, possibly limited by time. diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php index 253f93b685..f4b76585b6 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepository.php +++ b/app/Repositories/RuleGroup/RuleGroupRepository.php @@ -190,26 +190,15 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface ->get(['rules.*']); } - /** - * @return int - */ - public function getHighestOrderRuleGroup(): int - { - $entry = $this->user->ruleGroups()->max('order'); - - return (int)$entry; - } - /** * @param string|null $filter * * @return Collection */ - public function getRuleGroupsWithRules(?string $filter): Collection + public function getAllRuleGroupsWithRules(?string $filter): Collection { $groups = $this->user->ruleGroups() ->orderBy('order', 'ASC') - ->where('active', true) ->with( [ 'rules' => static function (HasMany $query) { @@ -253,15 +242,26 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface ); } + /** + * @return int + */ + public function getHighestOrderRuleGroup(): int + { + $entry = $this->user->ruleGroups()->max('order'); + + return (int)$entry; + } + /** * @param string|null $filter * * @return Collection */ - public function getAllRuleGroupsWithRules(?string $filter): Collection + public function getRuleGroupsWithRules(?string $filter): Collection { $groups = $this->user->ruleGroups() ->orderBy('order', 'ASC') + ->where('active', true) ->with( [ 'rules' => static function (HasMany $query) { diff --git a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php index b3f3b90985..06f8e329a3 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php +++ b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php @@ -102,6 +102,15 @@ interface RuleGroupRepositoryInterface */ public function getActiveUpdateRules(RuleGroup $group): Collection; + /** + * Also inactive groups. + * + * @param string|null $filter + * + * @return Collection + */ + public function getAllRuleGroupsWithRules(?string $filter): Collection; + /** * @return int */ @@ -114,15 +123,6 @@ interface RuleGroupRepositoryInterface */ public function getRuleGroupsWithRules(?string $filter): Collection; - /** - * Also inactive groups. - * - * @param string|null $filter - * - * @return Collection - */ - public function getAllRuleGroupsWithRules(?string $filter): Collection; - /** * @param RuleGroup $group * diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index bd05564f1b..616932d492 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -99,16 +99,6 @@ class TagRepository implements TagRepositoryInterface return $collector->getExtractedJournals(); } - /** - * @param string $tag - * - * @return Tag|null - */ - public function findByTag(string $tag): ?Tag - { - return $this->user->tags()->where('tag', $tag)->first(); - } - /** * @param int $tagId * @@ -119,6 +109,16 @@ class TagRepository implements TagRepositoryInterface return $this->user->tags()->find($tagId); } + /** + * @param string $tag + * + * @return Tag|null + */ + public function findByTag(string $tag): ?Tag + { + return $this->user->tags()->where('tag', $tag)->first(); + } + /** * @param Tag $tag * diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index d4e550623f..1a546821b3 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -62,13 +62,6 @@ interface TagRepositoryInterface */ public function expenseInPeriod(Tag $tag, Carbon $start, Carbon $end): array; - /** - * @param string $tag - * - * @return Tag|null - */ - public function findByTag(string $tag): ?Tag; - /** * @param int $tagId * @@ -76,6 +69,13 @@ interface TagRepositoryInterface */ public function find(int $tagId): ?Tag; + /** + * @param string $tag + * + * @return Tag|null + */ + public function findByTag(string $tag): ?Tag; + /** * @param Tag $tag * diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php index 04b76655ec..cec90bef6d 100644 --- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php +++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Repositories\TransactionGroup; + use Carbon\Carbon; use DB; use Exception; @@ -359,12 +360,12 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface return $factory->create($data); } catch (DuplicateTransactionException $e) { Log::warning('Group repository caught group factory with a duplicate exception!'); - throw new DuplicateTransactionException($e->getMessage(),0, $e); + throw new DuplicateTransactionException($e->getMessage(), 0, $e); } catch (FireflyException $e) { Log::warning('Group repository caught group factory with an exception!'); Log::error($e->getMessage()); Log::error($e->getTraceAsString()); - throw new FireflyException($e->getMessage(),0, $e); + throw new FireflyException($e->getMessage(), 0, $e); } } @@ -380,6 +381,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface { /** @var GroupUpdateService $service */ $service = app(GroupUpdateService::class); + return $service->update($transactionGroup, $data); } diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 45232e4af8..ef13628a1f 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -169,16 +169,6 @@ class UserRepository implements UserRepositoryInterface return true; } - /** - * @param string $email - * - * @return User|null - */ - public function findByEmail(string $email): ?User - { - return User::where('email', $email)->first(); - } - /** * @param int $userId * @@ -189,6 +179,16 @@ class UserRepository implements UserRepositoryInterface return User::find($userId); } + /** + * @param string $email + * + * @return User|null + */ + public function findByEmail(string $email): ?User + { + return User::where('email', $email)->first(); + } + /** * Returns the first user in the DB. Generally only works when there is just one. * diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php index 5eafdbab9f..6cc9122f42 100644 --- a/app/Repositories/User/UserRepositoryInterface.php +++ b/app/Repositories/User/UserRepositoryInterface.php @@ -102,13 +102,6 @@ interface UserRepositoryInterface */ public function destroy(User $user): bool; - /** - * @param string $email - * - * @return User|null - */ - public function findByEmail(string $email): ?User; - /** * @param int $userId * @@ -116,6 +109,13 @@ interface UserRepositoryInterface */ public function find(int $userId): ?User; + /** + * @param string $email + * + * @return User|null + */ + public function findByEmail(string $email): ?User; + /** * Returns the first user in the DB. Generally only works when there is just one. * diff --git a/app/Rules/IsDateOrTime.php b/app/Rules/IsDateOrTime.php index 44f47a032f..6eee28a3c7 100644 --- a/app/Rules/IsDateOrTime.php +++ b/app/Rules/IsDateOrTime.php @@ -69,7 +69,7 @@ class IsDateOrTime implements Rule Log::error(sprintf('"%s" is not a valid date: %s', $value, $e->getMessage())); return false; - } catch(InvalidFormatException $e) { + } catch (InvalidFormatException $e) { Log::error(sprintf('"%s" is of an invalid format: %s', $value, $e->getMessage())); return false; @@ -84,7 +84,7 @@ class IsDateOrTime implements Rule Log::error(sprintf('"%s" is not a valid date or time: %s', $value, $e->getMessage())); return false; - } catch(InvalidFormatException $e) { + } catch (InvalidFormatException $e) { Log::error(sprintf('"%s" is of an invalid format: %s', $value, $e->getMessage())); return false; diff --git a/app/Rules/IsDuplicateTransaction.php b/app/Rules/IsDuplicateTransaction.php index 44ffafb6b3..2bfb59089d 100644 --- a/app/Rules/IsDuplicateTransaction.php +++ b/app/Rules/IsDuplicateTransaction.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Rules; + use Illuminate\Contracts\Validation\Rule; /** diff --git a/app/Rules/IsTransferAccount.php b/app/Rules/IsTransferAccount.php index cca24a5b62..ec3d9fbf52 100644 --- a/app/Rules/IsTransferAccount.php +++ b/app/Rules/IsTransferAccount.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Rules; + use FireflyIII\Models\TransactionType; use FireflyIII\Validation\AccountValidator; use Illuminate\Contracts\Validation\Rule; diff --git a/app/Rules/IsValidAttachmentModel.php b/app/Rules/IsValidAttachmentModel.php index cdaaab047c..d2e0349693 100644 --- a/app/Rules/IsValidAttachmentModel.php +++ b/app/Rules/IsValidAttachmentModel.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Rules; + use FireflyIII\Models\Account; use FireflyIII\Models\Bill; use FireflyIII\Models\Budget; diff --git a/app/Rules/IsValidBulkClause.php b/app/Rules/IsValidBulkClause.php index b01201c6c9..7a8bda7692 100644 --- a/app/Rules/IsValidBulkClause.php +++ b/app/Rules/IsValidBulkClause.php @@ -33,8 +33,8 @@ use JsonException; */ class IsValidBulkClause implements Rule { - private array $rules; private string $error; + private array $rules; /** * @param string $type @@ -45,6 +45,14 @@ class IsValidBulkClause implements Rule $this->error = (string)trans('firefly.belongs_user'); } + /** + * @return string + */ + public function message(): string + { + return $this->error; + } + /** * @param string $attribute * @param mixed $value @@ -57,15 +65,8 @@ class IsValidBulkClause implements Rule if (false === $result) { return false; } - return true; - } - /** - * @return string - */ - public function message(): string - { - return $this->error; + return true; } /** @@ -106,7 +107,7 @@ class IsValidBulkClause implements Rule 'value' => $this->rules[$clause][$arrayKey], ]); if ($validator->fails()) { - $this->error = sprintf('%s: %s: %s',$clause, $arrayKey, join(', ', ($validator->errors()->get('value')))); + $this->error = sprintf('%s: %s: %s', $clause, $arrayKey, join(', ', ($validator->errors()->get('value')))); return false; } diff --git a/app/Rules/LessThanPiggyTarget.php b/app/Rules/LessThanPiggyTarget.php index 914667a22c..e19589ea74 100644 --- a/app/Rules/LessThanPiggyTarget.php +++ b/app/Rules/LessThanPiggyTarget.php @@ -21,6 +21,7 @@ */ declare(strict_types=1); + namespace FireflyIII\Rules; use Illuminate\Contracts\Validation\Rule; diff --git a/app/Rules/UniqueAccountNumber.php b/app/Rules/UniqueAccountNumber.php index dd5c1c2554..f8b4102c6b 100644 --- a/app/Rules/UniqueAccountNumber.php +++ b/app/Rules/UniqueAccountNumber.php @@ -87,10 +87,10 @@ class UniqueAccountNumber implements Rule public function passes($attribute, $value): bool { if (!auth()->check()) { - return true; + return true; } if (null === $this->expectedType) { - return true; + return true; } $maxCounts = $this->getMaxOccurrences(); diff --git a/app/Rules/UniqueIban.php b/app/Rules/UniqueIban.php index 7958170cff..e6e37f98de 100644 --- a/app/Rules/UniqueIban.php +++ b/app/Rules/UniqueIban.php @@ -84,10 +84,10 @@ class UniqueIban implements Rule public function passes($attribute, $value): bool { if (!auth()->check()) { - return true; + return true; } if (null === $this->expectedType) { - return true; + return true; } $maxCounts = $this->getMaxOccurrences(); diff --git a/app/Rules/ValidJournals.php b/app/Rules/ValidJournals.php index 3482fc7579..888e5697c7 100644 --- a/app/Rules/ValidJournals.php +++ b/app/Rules/ValidJournals.php @@ -21,6 +21,7 @@ */ declare(strict_types=1); + namespace FireflyIII\Rules; use FireflyIII\Models\TransactionJournal; diff --git a/app/Rules/ValidRecurrenceRepetitionValue.php b/app/Rules/ValidRecurrenceRepetitionValue.php index ae9547d777..14ba5cca50 100644 --- a/app/Rules/ValidRecurrenceRepetitionValue.php +++ b/app/Rules/ValidRecurrenceRepetitionValue.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Rules; + use Carbon\Carbon; use Illuminate\Contracts\Validation\Rule; use InvalidArgumentException; diff --git a/app/Services/Internal/Destroy/AccountDestroyService.php b/app/Services/Internal/Destroy/AccountDestroyService.php index cc557d541f..aed55bb705 100644 --- a/app/Services/Internal/Destroy/AccountDestroyService.php +++ b/app/Services/Internal/Destroy/AccountDestroyService.php @@ -41,7 +41,7 @@ use stdClass; class AccountDestroyService { /** - * @param Account $account + * @param Account $account * @param Account|null $moveTo * * @return void diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 5fdd24e19e..4ce0545519 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -101,7 +101,7 @@ trait AccountServiceTrait /** * Update meta data for account. Depends on type which fields are valid. * -* See reference nr. 97 + * See reference nr. 97 * * @param Account $account * @param array $data @@ -207,22 +207,95 @@ trait AccountServiceTrait } /** - * Delete TransactionGroup with opening balance in it. - * * @param Account $account + * @param array $data + * + * @return TransactionGroup + * @throws FireflyException + * @deprecated */ - protected function deleteOBGroup(Account $account): void + protected function createOBGroup(Account $account, array $data): TransactionGroup { - Log::debug(sprintf('deleteOB() for account #%d', $account->id)); - $openingBalanceGroup = $this->getOBGroup($account); + Log::debug('Now going to create an OB group.'); + $language = app('preferences')->getForUser($account->user, 'language', 'en_US')->data; + $sourceId = null; + $sourceName = null; + $destId = null; + $destName = null; + $amount = array_key_exists('opening_balance', $data) ? $data['opening_balance'] : '0'; - // opening balance data? update it! - if (null !== $openingBalanceGroup) { - Log::debug('Opening balance journal found, delete journal.'); - /** @var TransactionGroupDestroyService $service */ - $service = app(TransactionGroupDestroyService::class); - $service->destroy($openingBalanceGroup); + // amount is positive. + if (1 === bccomp($amount, '0')) { + Log::debug(sprintf('Amount is %s, which is positive. Source is a new IB account, destination is #%d', $amount, $account->id)); + $sourceName = trans('firefly.initial_balance_description', ['account' => $account->name], $language); + $destId = $account->id; } + // amount is not positive + if (-1 === bccomp($amount, '0')) { + Log::debug(sprintf('Amount is %s, which is negative. Destination is a new IB account, source is #%d', $amount, $account->id)); + $destName = trans('firefly.initial_balance_account', ['account' => $account->name], $language); + $sourceId = $account->id; + } + // amount is 0 + if (0 === bccomp($amount, '0')) { + Log::debug('Amount is zero, so will not make an OB group.'); + throw new FireflyException('Amount for new opening balance was unexpectedly 0.'); + } + + // make amount positive, regardless: + $amount = app('steam')->positive($amount); + + // get or grab currency: + $currency = $this->accountRepository->getAccountCurrency($account); + if (null === $currency) { + $currency = app('default')->getDefaultCurrencyByUser($account->user); + } + + // submit to factory: + $submission = [ + 'group_title' => null, + 'user' => $account->user_id, + 'transactions' => [ + [ + 'type' => 'Opening balance', + 'date' => $data['opening_balance_date'], + 'source_id' => $sourceId, + 'source_name' => $sourceName, + 'destination_id' => $destId, + 'destination_name' => $destName, + 'user' => $account->user_id, + 'currency_id' => $currency->id, + 'order' => 0, + 'amount' => $amount, + 'foreign_amount' => null, + 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), + 'budget_id' => null, + 'budget_name' => null, + 'category_id' => null, + 'category_name' => null, + 'piggy_bank_id' => null, + 'piggy_bank_name' => null, + 'reconciled' => false, + 'notes' => null, + 'tags' => [], + ], + ], + ]; + Log::debug('Going for submission in createOBGroup', $submission); + + /** @var TransactionGroupFactory $factory */ + $factory = app(TransactionGroupFactory::class); + $factory->setUser($account->user); + + try { + $group = $factory->create($submission); + } catch (DuplicateTransactionException $e) { + Log::error($e->getMessage()); + Log::error($e->getTraceAsString()); + throw new FireflyException($e->getMessage(), 0, $e); + } + + return $group; } /** @@ -243,18 +316,6 @@ trait AccountServiceTrait } } - /** - * Returns the opening balance group, or NULL if it does not exist. - * - * @param Account $account - * - * @return TransactionGroup|null - */ - protected function getOBGroup(Account $account): ?TransactionGroup - { - return $this->accountRepository->getOpeningBalanceGroup($account); - } - /** * Returns the credit transaction group, or NULL if it does not exist. * @@ -269,6 +330,37 @@ trait AccountServiceTrait return $this->accountRepository->getCreditTransactionGroup($account); } + /** + * Delete TransactionGroup with opening balance in it. + * + * @param Account $account + */ + protected function deleteOBGroup(Account $account): void + { + Log::debug(sprintf('deleteOB() for account #%d', $account->id)); + $openingBalanceGroup = $this->getOBGroup($account); + + // opening balance data? update it! + if (null !== $openingBalanceGroup) { + Log::debug('Opening balance journal found, delete journal.'); + /** @var TransactionGroupDestroyService $service */ + $service = app(TransactionGroupDestroyService::class); + $service->destroy($openingBalanceGroup); + } + } + + /** + * Returns the opening balance group, or NULL if it does not exist. + * + * @param Account $account + * + * @return TransactionGroup|null + */ + protected function getOBGroup(Account $account): ?TransactionGroup + { + return $this->accountRepository->getOpeningBalanceGroup($account); + } + /** * @param int $currencyId * @param string $currencyCode @@ -293,6 +385,132 @@ trait AccountServiceTrait return $currency; } + /** + * Create the opposing "credit liability" transaction for credit liabilities. + * + * @param Account $account + * @param string $openingBalance + * @param Carbon $openingBalanceDate + * + * @return TransactionGroup + * @throws FireflyException + */ + protected function updateCreditTransaction(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup + { + Log::debug(sprintf('Now in %s', __METHOD__)); + + if (0 === bccomp($openingBalance, '0')) { + Log::debug('Amount is zero, so will not update liability credit group.'); + throw new FireflyException('Amount for update liability credit was unexpectedly 0.'); + } + + // create if not exists: + $clGroup = $this->getCreditTransaction($account); + if (null === $clGroup) { + return $this->createCreditTransaction($account, $openingBalance, $openingBalanceDate); + } + // if exists, update: + $currency = $this->accountRepository->getAccountCurrency($account); + if (null === $currency) { + $currency = app('default')->getDefaultCurrencyByUser($account->user); + } + + // simply grab the first journal and change it: + $journal = $this->getObJournal($clGroup); + $clTransaction = $this->getOBTransaction($journal, $account); + $accountTransaction = $this->getNotOBTransaction($journal, $account); + $journal->date = $openingBalanceDate; + $journal->transactionCurrency()->associate($currency); + + // account always gains money: + $accountTransaction->amount = app('steam')->positive($openingBalance); + $accountTransaction->transaction_currency_id = $currency->id; + + // CL account always loses money: + $clTransaction->amount = app('steam')->negative($openingBalance); + $clTransaction->transaction_currency_id = $currency->id; + // save both + $accountTransaction->save(); + $clTransaction->save(); + $journal->save(); + $clGroup->refresh(); + + return $clGroup; + } + + /** + * @param Account $account + * @param string $openingBalance + * @param Carbon $openingBalanceDate + * + * @return TransactionGroup + * @throws FireflyException + */ + protected function createCreditTransaction(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup + { + Log::debug('Now going to create an createCreditTransaction.'); + + if (0 === bccomp($openingBalance, '0')) { + Log::debug('Amount is zero, so will not make an liability credit group.'); + throw new FireflyException('Amount for new liability credit was unexpectedly 0.'); + } + + $language = app('preferences')->getForUser($account->user, 'language', 'en_US')->data; + $amount = app('steam')->positive($openingBalance); + + // get or grab currency: + $currency = $this->accountRepository->getAccountCurrency($account); + if (null === $currency) { + $currency = app('default')->getDefaultCurrencyByUser($account->user); + } + + // submit to factory: + $submission = [ + 'group_title' => null, + 'user' => $account->user_id, + 'transactions' => [ + [ + 'type' => 'Liability credit', + 'date' => $openingBalanceDate, + 'source_id' => null, + 'source_name' => trans('firefly.liability_credit_description', ['account' => $account->name], $language), + 'destination_id' => $account->id, + 'destination_name' => null, + 'user' => $account->user_id, + 'currency_id' => $currency->id, + 'order' => 0, + 'amount' => $amount, + 'foreign_amount' => null, + 'description' => trans('firefly.liability_credit_description', ['account' => $account->name]), + 'budget_id' => null, + 'budget_name' => null, + 'category_id' => null, + 'category_name' => null, + 'piggy_bank_id' => null, + 'piggy_bank_name' => null, + 'reconciled' => false, + 'notes' => null, + 'tags' => [], + ], + ], + ]; + Log::debug('Going for submission in createCreditTransaction', $submission); + + /** @var TransactionGroupFactory $factory */ + $factory = app(TransactionGroupFactory::class); + $factory->setUser($account->user); + + try { + $group = $factory->create($submission); + } catch (DuplicateTransactionException $e) { + Log::error($e->getMessage()); + Log::error($e->getTraceAsString()); + throw new FireflyException($e->getMessage(), 0, $e); + } + + return $group; + } + /** * Update or create the opening balance group. * Since opening balance and date can still be empty strings, it may fail. @@ -355,97 +573,6 @@ trait AccountServiceTrait return $obGroup; } - /** - * Create the opposing "credit liability" transaction for credit liabilities. - * - * @param Account $account - * @param string $openingBalance - * @param Carbon $openingBalanceDate - * - * @return TransactionGroup - * @throws FireflyException - */ - protected function updateCreditTransaction(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup - { - Log::debug(sprintf('Now in %s', __METHOD__)); - - if (0 === bccomp($openingBalance, '0')) { - Log::debug('Amount is zero, so will not update liability credit group.'); - throw new FireflyException('Amount for update liability credit was unexpectedly 0.'); - } - - // create if not exists: - $clGroup = $this->getCreditTransaction($account); - if (null === $clGroup) { - return $this->createCreditTransaction($account, $openingBalance, $openingBalanceDate); - } - // if exists, update: - $currency = $this->accountRepository->getAccountCurrency($account); - if (null === $currency) { - $currency = app('default')->getDefaultCurrencyByUser($account->user); - } - - // simply grab the first journal and change it: - $journal = $this->getObJournal($clGroup); - $clTransaction = $this->getOBTransaction($journal, $account); - $accountTransaction = $this->getNotOBTransaction($journal, $account); - $journal->date = $openingBalanceDate; - $journal->transactionCurrency()->associate($currency); - - // account always gains money: - $accountTransaction->amount = app('steam')->positive($openingBalance); - $accountTransaction->transaction_currency_id = $currency->id; - - // CL account always loses money: - $clTransaction->amount = app('steam')->negative($openingBalance); - $clTransaction->transaction_currency_id = $currency->id; - // save both - $accountTransaction->save(); - $clTransaction->save(); - $journal->save(); - $clGroup->refresh(); - - return $clGroup; - } - - /** -* See reference nr. 98 - * - * @param TransactionJournal $journal - * @param Account $account - * - * @return Transaction - * @throws FireflyException - */ - private function getOBTransaction(TransactionJournal $journal, Account $account): Transaction - { - /** @var Transaction $transaction */ - $transaction = $journal->transactions()->where('account_id', '!=', $account->id)->first(); - if (null === $transaction) { - throw new FireflyException(sprintf('Could not get OB transaction for journal #%d', $journal->id)); - } - - return $transaction; - } - - /** - * @param TransactionJournal $journal - * @param Account $account - * - * @return Transaction - * @throws FireflyException - */ - private function getNotOBTransaction(TransactionJournal $journal, Account $account): Transaction - { - /** @var Transaction $transaction */ - $transaction = $journal->transactions()->where('account_id', $account->id)->first(); - if (null === $transaction) { - throw new FireflyException(sprintf('Could not get non-OB transaction for journal #%d', $journal->id)); - } - - return $transaction; - } - /** * @param Account $account * @param string $openingBalance @@ -538,173 +665,7 @@ trait AccountServiceTrait } /** - * @param Account $account - * @param string $openingBalance - * @param Carbon $openingBalanceDate - * - * @return TransactionGroup - * @throws FireflyException - */ - protected function createCreditTransaction(Account $account, string $openingBalance, Carbon $openingBalanceDate): TransactionGroup - { - Log::debug('Now going to create an createCreditTransaction.'); - - if (0 === bccomp($openingBalance, '0')) { - Log::debug('Amount is zero, so will not make an liability credit group.'); - throw new FireflyException('Amount for new liability credit was unexpectedly 0.'); - } - - $language = app('preferences')->getForUser($account->user, 'language', 'en_US')->data; - $amount = app('steam')->positive($openingBalance); - - // get or grab currency: - $currency = $this->accountRepository->getAccountCurrency($account); - if (null === $currency) { - $currency = app('default')->getDefaultCurrencyByUser($account->user); - } - - // submit to factory: - $submission = [ - 'group_title' => null, - 'user' => $account->user_id, - 'transactions' => [ - [ - 'type' => 'Liability credit', - 'date' => $openingBalanceDate, - 'source_id' => null, - 'source_name' => trans('firefly.liability_credit_description', ['account' => $account->name], $language), - 'destination_id' => $account->id, - 'destination_name' => null, - 'user' => $account->user_id, - 'currency_id' => $currency->id, - 'order' => 0, - 'amount' => $amount, - 'foreign_amount' => null, - 'description' => trans('firefly.liability_credit_description', ['account' => $account->name]), - 'budget_id' => null, - 'budget_name' => null, - 'category_id' => null, - 'category_name' => null, - 'piggy_bank_id' => null, - 'piggy_bank_name' => null, - 'reconciled' => false, - 'notes' => null, - 'tags' => [], - ], - ], - ]; - Log::debug('Going for submission in createCreditTransaction', $submission); - - /** @var TransactionGroupFactory $factory */ - $factory = app(TransactionGroupFactory::class); - $factory->setUser($account->user); - - try { - $group = $factory->create($submission); - } catch (DuplicateTransactionException $e) { - Log::error($e->getMessage()); - Log::error($e->getTraceAsString()); - throw new FireflyException($e->getMessage(), 0, $e); - } - - return $group; - } - - - /** - * @param Account $account - * @param array $data - * - * @return TransactionGroup - * @throws FireflyException - * @deprecated - */ - protected function createOBGroup(Account $account, array $data): TransactionGroup - { - Log::debug('Now going to create an OB group.'); - $language = app('preferences')->getForUser($account->user, 'language', 'en_US')->data; - $sourceId = null; - $sourceName = null; - $destId = null; - $destName = null; - $amount = array_key_exists('opening_balance', $data) ? $data['opening_balance'] : '0'; - - // amount is positive. - if (1 === bccomp($amount, '0')) { - Log::debug(sprintf('Amount is %s, which is positive. Source is a new IB account, destination is #%d', $amount, $account->id)); - $sourceName = trans('firefly.initial_balance_description', ['account' => $account->name], $language); - $destId = $account->id; - } - // amount is not positive - if (-1 === bccomp($amount, '0')) { - Log::debug(sprintf('Amount is %s, which is negative. Destination is a new IB account, source is #%d', $amount, $account->id)); - $destName = trans('firefly.initial_balance_account', ['account' => $account->name], $language); - $sourceId = $account->id; - } - // amount is 0 - if (0 === bccomp($amount, '0')) { - Log::debug('Amount is zero, so will not make an OB group.'); - throw new FireflyException('Amount for new opening balance was unexpectedly 0.'); - } - - // make amount positive, regardless: - $amount = app('steam')->positive($amount); - - // get or grab currency: - $currency = $this->accountRepository->getAccountCurrency($account); - if (null === $currency) { - $currency = app('default')->getDefaultCurrencyByUser($account->user); - } - - // submit to factory: - $submission = [ - 'group_title' => null, - 'user' => $account->user_id, - 'transactions' => [ - [ - 'type' => 'Opening balance', - 'date' => $data['opening_balance_date'], - 'source_id' => $sourceId, - 'source_name' => $sourceName, - 'destination_id' => $destId, - 'destination_name' => $destName, - 'user' => $account->user_id, - 'currency_id' => $currency->id, - 'order' => 0, - 'amount' => $amount, - 'foreign_amount' => null, - 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), - 'budget_id' => null, - 'budget_name' => null, - 'category_id' => null, - 'category_name' => null, - 'piggy_bank_id' => null, - 'piggy_bank_name' => null, - 'reconciled' => false, - 'notes' => null, - 'tags' => [], - ], - ], - ]; - Log::debug('Going for submission in createOBGroup', $submission); - - /** @var TransactionGroupFactory $factory */ - $factory = app(TransactionGroupFactory::class); - $factory->setUser($account->user); - - try { - $group = $factory->create($submission); - } catch (DuplicateTransactionException $e) { - Log::error($e->getMessage()); - Log::error($e->getTraceAsString()); - throw new FireflyException($e->getMessage(), 0, $e); - } - - return $group; - } - - /** -* See reference nr. 99 + * See reference nr. 99 * * @param TransactionGroup $group * @@ -721,4 +682,42 @@ trait AccountServiceTrait return $journal; } + + /** + * See reference nr. 98 + * + * @param TransactionJournal $journal + * @param Account $account + * + * @return Transaction + * @throws FireflyException + */ + private function getOBTransaction(TransactionJournal $journal, Account $account): Transaction + { + /** @var Transaction $transaction */ + $transaction = $journal->transactions()->where('account_id', '!=', $account->id)->first(); + if (null === $transaction) { + throw new FireflyException(sprintf('Could not get OB transaction for journal #%d', $journal->id)); + } + + return $transaction; + } + + /** + * @param TransactionJournal $journal + * @param Account $account + * + * @return Transaction + * @throws FireflyException + */ + private function getNotOBTransaction(TransactionJournal $journal, Account $account): Transaction + { + /** @var Transaction $transaction */ + $transaction = $journal->transactions()->where('account_id', $account->id)->first(); + if (null === $transaction) { + throw new FireflyException(sprintf('Could not get non-OB transaction for journal #%d', $journal->id)); + } + + return $transaction; + } } diff --git a/app/Services/Internal/Support/BillServiceTrait.php b/app/Services/Internal/Support/BillServiceTrait.php index 65c232481c..c992e0b4e7 100644 --- a/app/Services/Internal/Support/BillServiceTrait.php +++ b/app/Services/Internal/Support/BillServiceTrait.php @@ -48,9 +48,9 @@ trait BillServiceTrait return; } $ruleIds = $bill->user->rules()->get(['id'])->pluck('id')->toArray(); - $set = RuleAction::whereIn('rule_id', $ruleIds) - ->where('action_type', 'link_to_bill') - ->where('action_value', $oldName)->get(); + $set = RuleAction::whereIn('rule_id', $ruleIds) + ->where('action_type', 'link_to_bill') + ->where('action_value', $oldName)->get(); /** @var RuleAction $ruleAction */ foreach ($set as $ruleAction) { @@ -59,6 +59,7 @@ trait BillServiceTrait $ruleAction->save(); } } + /** * @param Bill $bill * @param string $note diff --git a/app/Services/Internal/Support/CreditRecalculateService.php b/app/Services/Internal/Support/CreditRecalculateService.php index 300fda53ae..20d9ba78db 100644 --- a/app/Services/Internal/Support/CreditRecalculateService.php +++ b/app/Services/Internal/Support/CreditRecalculateService.php @@ -40,8 +40,8 @@ class CreditRecalculateService { private ?Account $account; private ?TransactionGroup $group; - private array $work; private AccountRepositoryInterface $repository; + private array $work; /** * CreditRecalculateService constructor. @@ -79,50 +79,6 @@ class CreditRecalculateService $this->processWork(); } - /** - * - */ - private function processWork(): void - { - $this->repository = app(AccountRepositoryInterface::class); - foreach ($this->work as $account) { - $this->processWorkAccount($account); - } - Log::debug(sprintf('Done with %s', __METHOD__)); - } - - /** - * @param Account $account - */ - private function processWorkAccount(Account $account): void - { - Log::debug(sprintf('Now in %s(#%d)', __METHOD__, $account->id)); - - // get opening balance (if present) - $this->repository->setUser($account->user); - $startOfDebt = $this->repository->getOpeningBalanceAmount($account) ?? '0'; - $leftOfDebt = app('steam')->positive($startOfDebt); - - /** @var AccountMetaFactory $factory */ - $factory = app(AccountMetaFactory::class); - $factory->crud($account, 'start_of_debt', $startOfDebt); - - // get direction of liability: - $direction = (string)$this->repository->getMetaValue($account, 'liability_direction'); - - // now loop all transactions (except opening balance and credit thing) - $transactions = $account->transactions()->get(); - /** @var Transaction $transaction */ - foreach ($transactions as $transaction) { - $leftOfDebt = $this->processTransaction($account, $direction, $transaction, $leftOfDebt); - } - $factory->crud($account, 'current_debt', $leftOfDebt); - - - Log::debug(sprintf('Done with %s(#%d)', __METHOD__, $account->id)); - } - - /** * */ @@ -221,19 +177,46 @@ class CreditRecalculateService } /** - * @param Account|null $account + * */ - public function setAccount(?Account $account): void + private function processWork(): void { - $this->account = $account; + $this->repository = app(AccountRepositoryInterface::class); + foreach ($this->work as $account) { + $this->processWorkAccount($account); + } + Log::debug(sprintf('Done with %s', __METHOD__)); } /** - * @param TransactionGroup $group + * @param Account $account */ - public function setGroup(TransactionGroup $group): void + private function processWorkAccount(Account $account): void { - $this->group = $group; + Log::debug(sprintf('Now in %s(#%d)', __METHOD__, $account->id)); + + // get opening balance (if present) + $this->repository->setUser($account->user); + $startOfDebt = $this->repository->getOpeningBalanceAmount($account) ?? '0'; + $leftOfDebt = app('steam')->positive($startOfDebt); + + /** @var AccountMetaFactory $factory */ + $factory = app(AccountMetaFactory::class); + $factory->crud($account, 'start_of_debt', $startOfDebt); + + // get direction of liability: + $direction = (string)$this->repository->getMetaValue($account, 'liability_direction'); + + // now loop all transactions (except opening balance and credit thing) + $transactions = $account->transactions()->get(); + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + $leftOfDebt = $this->processTransaction($account, $direction, $transaction, $leftOfDebt); + } + $factory->crud($account, 'current_debt', $leftOfDebt); + + + Log::debug(sprintf('Done with %s(#%d)', __METHOD__, $account->id)); } /** @@ -292,5 +275,21 @@ class CreditRecalculateService return $amount; } + /** + * @param Account|null $account + */ + public function setAccount(?Account $account): void + { + $this->account = $account; + } + + /** + * @param TransactionGroup $group + */ + public function setGroup(TransactionGroup $group): void + { + $this->group = $group; + } + } diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php index ce621bc415..92389b9b76 100644 --- a/app/Services/Internal/Support/JournalServiceTrait.php +++ b/app/Services/Internal/Support/JournalServiceTrait.php @@ -96,7 +96,7 @@ trait JournalServiceTrait $search = null; // first attempt, find by ID. if (null !== $data['id']) { - $search = $this->accountRepository->find((int) $data['id']); + $search = $this->accountRepository->find((int)$data['id']); if (null !== $search && in_array($search->accountType->type, $types, true)) { Log::debug( sprintf('Found "account_id" object: #%d, "%s" of type %s', $search->id, $search->name, $search->accountType->type) @@ -174,10 +174,10 @@ trait JournalServiceTrait if (null === $account && null !== $data['number']) { Log::debug(sprintf('Searching for account number "%s".', $data['number'])); // find by preferred type. - $source = $this->accountRepository->findByAccountNumber((string) $data['number'], [$types[0]]); + $source = $this->accountRepository->findByAccountNumber((string)$data['number'], [$types[0]]); // or any expected type. - $source = $source ?? $this->accountRepository->findByAccountNumber((string) $data['number'], $types); + $source = $source ?? $this->accountRepository->findByAccountNumber((string)$data['number'], $types); if (null !== $source) { Log::debug(sprintf('Found account: #%d, %s', $source->id, $source->name)); @@ -214,7 +214,7 @@ trait JournalServiceTrait // final attempt, create it. if (AccountType::ASSET === $preferredType) { - throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s',json_encode($data))); + throw new FireflyException(sprintf('TransactionFactory: Cannot create asset account with these values: %s', json_encode($data))); } // fix name of account if only IBAN is given: if ('' === (string)$data['name'] && '' !== (string)$data['iban']) { @@ -227,7 +227,7 @@ trait JournalServiceTrait $data['name'] = $data['number']; } // if name is still NULL, return NULL. - if(null === $data['name']) { + if (null === $data['name']) { return null; } $data['name'] = $data['name'] ?? '(no name)'; diff --git a/app/Services/Internal/Support/TransactionTypeTrait.php b/app/Services/Internal/Support/TransactionTypeTrait.php index 650b75ccdb..b21f9f03dc 100644 --- a/app/Services/Internal/Support/TransactionTypeTrait.php +++ b/app/Services/Internal/Support/TransactionTypeTrait.php @@ -48,8 +48,8 @@ trait TransactionTypeTrait $factory = app(TransactionTypeFactory::class); $transactionType = $factory->find($type); if (null === $transactionType) { - Log::error(sprintf('Could not find transaction type for "%s"', $type)); - throw new FireflyException(sprintf('Could not find transaction type for "%s"', $type)); + Log::error(sprintf('Could not find transaction type for "%s"', $type)); + throw new FireflyException(sprintf('Could not find transaction type for "%s"', $type)); } return $transactionType; diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index 7c45a6a5d7..ed7ff3d51c 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -31,12 +31,11 @@ use FireflyIII\Models\Location; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Support\AccountServiceTrait; use FireflyIII\User; -use JsonException; use Log; /** * Class AccountUpdateService -* See reference nr. 90 + * See reference nr. 90 */ class AccountUpdateService { @@ -46,8 +45,8 @@ class AccountUpdateService protected array $validAssetFields; protected array $validCCFields; protected array $validFields; - private array $canHaveVirtual; private array $canHaveOpeningBalance; + private array $canHaveVirtual; private User $user; /** diff --git a/app/Services/Internal/Update/CategoryUpdateService.php b/app/Services/Internal/Update/CategoryUpdateService.php index dd975d48d1..95128dba5c 100644 --- a/app/Services/Internal/Update/CategoryUpdateService.php +++ b/app/Services/Internal/Update/CategoryUpdateService.php @@ -39,6 +39,7 @@ use Log; class CategoryUpdateService { private $user; + /** * Constructor. */ @@ -137,6 +138,7 @@ class CategoryUpdateService ->where('rt_meta.value', $oldName) ->update(['rt_meta.value' => $newName]); } + /** * @param Category $category * @param array $data diff --git a/app/Services/Internal/Update/GroupCloneService.php b/app/Services/Internal/Update/GroupCloneService.php index 8bf0eb443f..cd6bb7e107 100644 --- a/app/Services/Internal/Update/GroupCloneService.php +++ b/app/Services/Internal/Update/GroupCloneService.php @@ -50,6 +50,7 @@ class GroupCloneService foreach ($group->transactionJournals as $journal) { $this->cloneJournal($journal, $newGroup, (int)$group->id); } + return $newGroup; } diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php index 021690345e..423c2311ce 100644 --- a/app/Services/Internal/Update/JournalUpdateService.php +++ b/app/Services/Internal/Update/JournalUpdateService.php @@ -167,6 +167,21 @@ class JournalUpdateService $this->transactionJournal->refresh(); } + /** + * @return bool + */ + private function removeReconciliation(): bool + { + if (count($this->data) > 1) { + return true; + } + if (1 === count($this->data) && true === array_key_exists('transaction_journal_id', $this->data)) { + return true; + } + + return false; + } + /** * @return bool */ @@ -760,19 +775,4 @@ class JournalUpdateService $this->sourceTransaction->refresh(); $this->destinationTransaction->refresh(); } - - /** - * @return bool - */ - private function removeReconciliation(): bool - { - if (count($this->data) > 1) { - return true; - } - if (1 === count($this->data) && true === array_key_exists('transaction_journal_id', $this->data)) { - return true; - } - - return false; - } } diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php index c1d597d77b..1841c256f1 100644 --- a/app/Services/Internal/Update/RecurrenceUpdateService.php +++ b/app/Services/Internal/Update/RecurrenceUpdateService.php @@ -49,7 +49,7 @@ class RecurrenceUpdateService /** * Updates a recurrence. * -* See reference nr. 88 + * See reference nr. 88 * * @param Recurrence $recurrence * @param array $data @@ -217,7 +217,7 @@ class RecurrenceUpdateService } /** -* See reference nr. 89 + * See reference nr. 89 * * @param Recurrence $recurrence * @param array $transactions @@ -296,7 +296,7 @@ class RecurrenceUpdateService // can be removed when v1 is retired. if (array_key_exists('category_name', $current) && '' === (string)$current['category_name']) { $current['category_name'] = null; - $current['category_id'] = 0; + $current['category_id'] = 0; } if (array_key_exists('category_id', $current)) { diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 7bea63e335..077c44de71 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -23,10 +23,12 @@ declare(strict_types=1); namespace FireflyIII\Support; use Crypt; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionCurrency; use FireflyIII\User; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Support\Collection; +use JsonException; use NumberFormatter; /** @@ -109,15 +111,15 @@ class Amount /** * @return string - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function getCurrencyCode(): string { $cache = new CacheProperties; $cache->addProperty('getCurrencyCode'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $currencyPreference = app('preferences')->get('currencyPreference', config('firefly.default_currency', 'EUR')); @@ -147,8 +149,8 @@ class Amount * @param User $user * * @return TransactionCurrency - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function getDefaultCurrencyByUser(User $user): TransactionCurrency { @@ -156,7 +158,7 @@ class Amount $cache->addProperty('getDefaultCurrency'); $cache->addProperty($user->id); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $currencyPreference = app('preferences')->getForUser($user, 'currencyPreference', config('firefly.default_currency', 'EUR')); $currencyPrefStr = $currencyPreference ? $currencyPreference->data : 'EUR'; diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index e5cd72cdc9..81846576f3 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -31,6 +31,7 @@ use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Foundation\Application; use Log; + /** * Class RemoteUserGuard */ diff --git a/app/Support/Authentication/RemoteUserProvider.php b/app/Support/Authentication/RemoteUserProvider.php index c028e98895..4a660214ca 100644 --- a/app/Support/Authentication/RemoteUserProvider.php +++ b/app/Support/Authentication/RemoteUserProvider.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Authentication; + use FireflyIII\Exceptions\FireflyException; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; @@ -56,10 +57,10 @@ class RemoteUserProvider implements UserProvider Log::debug(sprintf('User with email "%s" not found. Will be created.', $identifier)); $user = User::create( [ - 'blocked' => false, + 'blocked' => false, 'blocked_code' => null, - 'email' => $identifier, - 'password' => bcrypt(Str::random(64)), + 'email' => $identifier, + 'password' => bcrypt(Str::random(64)), ] ); } diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php index d355a46ca3..b6f09d676b 100644 --- a/app/Support/Binder/AccountList.php +++ b/app/Support/Binder/AccountList.php @@ -36,7 +36,7 @@ class AccountList implements BinderInterface /** * @param string $value - * @param Route $route + * @param Route $route * * @return Collection * @throws NotFoundHttpException diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php index ff2ed2ffdc..d07b1feee6 100644 --- a/app/Support/Binder/BudgetList.php +++ b/app/Support/Binder/BudgetList.php @@ -35,7 +35,7 @@ class BudgetList implements BinderInterface { /** * @param string $value - * @param Route $route + * @param Route $route * * @return Collection * @throws NotFoundHttpException diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php index bf03596597..56c2f0ce34 100644 --- a/app/Support/Binder/CategoryList.php +++ b/app/Support/Binder/CategoryList.php @@ -51,7 +51,7 @@ class CategoryList implements BinderInterface $list = array_unique(array_map('\intval', explode(',', $value))); if (empty($list)) { - throw new NotFoundHttpException; + throw new NotFoundHttpException; } /** @var Collection $collection */ diff --git a/app/Support/Binder/DynamicConfigKey.php b/app/Support/Binder/DynamicConfigKey.php index c8d83f5a4b..a9a6bc0730 100644 --- a/app/Support/Binder/DynamicConfigKey.php +++ b/app/Support/Binder/DynamicConfigKey.php @@ -32,12 +32,14 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class DynamicConfigKey { - public static array $accepted = [ - 'configuration.is_demo_site', - 'configuration.permission_update_check', - 'configuration.single_user_mode', - 'configuration.last_update_check', - ]; + public static array $accepted + = [ + 'configuration.is_demo_site', + 'configuration.permission_update_check', + 'configuration.single_user_mode', + 'configuration.last_update_check', + ]; + /** * @param string $value * @param Route $route diff --git a/app/Support/Binder/EitherConfigKey.php b/app/Support/Binder/EitherConfigKey.php index b344771c96..7e129348ea 100644 --- a/app/Support/Binder/EitherConfigKey.php +++ b/app/Support/Binder/EitherConfigKey.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Binder; + use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -31,21 +32,23 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; */ class EitherConfigKey { - public static array $static = [ - 'firefly.version', - 'firefly.api_version', - 'firefly.default_location', - 'firefly.account_to_transaction', - 'firefly.allowed_opposing_types', - 'firefly.accountRoles', - 'firefly.valid_liabilities', - 'firefly.interest_periods', - 'firefly.bill_periods', - 'firefly.enable_external_map', - 'firefly.expected_source_types', - 'firefly.credit_card_types', - 'app.timezone', - ]; + public static array $static + = [ + 'firefly.version', + 'firefly.api_version', + 'firefly.default_location', + 'firefly.account_to_transaction', + 'firefly.allowed_opposing_types', + 'firefly.accountRoles', + 'firefly.valid_liabilities', + 'firefly.interest_periods', + 'firefly.bill_periods', + 'firefly.enable_external_map', + 'firefly.expected_source_types', + 'firefly.credit_card_types', + 'app.timezone', + ]; + /** * @param string $value * @param Route $route diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php index d06dce5d41..cda7cc3c17 100644 --- a/app/Support/Binder/JournalList.php +++ b/app/Support/Binder/JournalList.php @@ -63,13 +63,14 @@ class JournalList implements BinderInterface /** * @param string $value + * * @return array */ protected static function parseList(string $value): array { $list = array_unique(array_map('\intval', explode(',', $value))); if (empty($list)) { - throw new NotFoundHttpException; + throw new NotFoundHttpException; } return $list; diff --git a/app/Support/Chart/Category/FrontpageChartGenerator.php b/app/Support/Chart/Category/FrontpageChartGenerator.php index 8ff317aefb..9aeb91d2de 100644 --- a/app/Support/Chart/Category/FrontpageChartGenerator.php +++ b/app/Support/Chart/Category/FrontpageChartGenerator.php @@ -184,6 +184,7 @@ class FrontpageChartGenerator return $return; } + /** * @param array $currencyData * @param array $monetaryData diff --git a/app/Support/Chart/Category/WholePeriodChartGenerator.php b/app/Support/Chart/Category/WholePeriodChartGenerator.php index a4afe0c8d4..ffd0a4ce9d 100644 --- a/app/Support/Chart/Category/WholePeriodChartGenerator.php +++ b/app/Support/Chart/Category/WholePeriodChartGenerator.php @@ -115,7 +115,7 @@ class WholePeriodChartGenerator } /** -* See reference nr. 32 + * See reference nr. 32 * * @param Carbon $start * @param Carbon $end @@ -128,13 +128,13 @@ class WholePeriodChartGenerator $step = '1D'; $months = $start->diffInMonths($end); if ($months > 3) { - $step = '1W'; + $step = '1W'; } if ($months > 24) { - $step = '1M'; + $step = '1M'; } if ($months > 100) { - $step = '1Y'; + $step = '1Y'; } return $step; diff --git a/app/Support/Cronjobs/AbstractCronjob.php b/app/Support/Cronjobs/AbstractCronjob.php index 45cdce0a98..1783889cb9 100644 --- a/app/Support/Cronjobs/AbstractCronjob.php +++ b/app/Support/Cronjobs/AbstractCronjob.php @@ -32,16 +32,14 @@ use Carbon\Carbon; */ abstract class AbstractCronjob { + public bool $jobErrored; + public bool $jobFired; + public bool $jobSucceeded; + public ?string $message; public int $timeBetweenRuns = 43200; protected Carbon $date; protected bool $force; - public bool $jobFired; - public bool $jobSucceeded; - public bool $jobErrored; - - public ?string $message; - /** * AbstractCronjob constructor. */ @@ -65,7 +63,7 @@ abstract class AbstractCronjob */ final public function setDate(Carbon $date): void { - $newDate = clone $date; + $newDate = clone $date; $this->date = $newDate; } diff --git a/app/Support/Cronjobs/AutoBudgetCronjob.php b/app/Support/Cronjobs/AutoBudgetCronjob.php index bfd5118f36..ada8681278 100644 --- a/app/Support/Cronjobs/AutoBudgetCronjob.php +++ b/app/Support/Cronjobs/AutoBudgetCronjob.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Cronjobs; + use Carbon\Carbon; use FireflyIII\Jobs\CreateAutoBudgetLimits; use FireflyIII\Models\Configuration; @@ -43,7 +44,7 @@ class AutoBudgetCronjob extends AbstractCronjob $config = app('fireflyconfig')->get('last_ab_job', 0); $lastTime = (int)$config->data; $diff = time() - $lastTime; - $diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime),null, true); + $diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); if (0 === $lastTime) { Log::info('Auto budget cron-job has never fired before.'); } @@ -53,6 +54,7 @@ class AutoBudgetCronjob extends AbstractCronjob if (false === $this->force) { Log::info('The auto budget cron-job will not fire now.'); $this->message = sprintf('It has been %s since the auto budget cron-job has fired. It will not fire now.', $diffForHumans); + return; } diff --git a/app/Support/Cronjobs/RecurringCronjob.php b/app/Support/Cronjobs/RecurringCronjob.php index 4c00551e3d..665a15bc27 100644 --- a/app/Support/Cronjobs/RecurringCronjob.php +++ b/app/Support/Cronjobs/RecurringCronjob.php @@ -44,7 +44,7 @@ class RecurringCronjob extends AbstractCronjob $config = app('fireflyconfig')->get('last_rt_job', 0); $lastTime = (int)$config->data; $diff = time() - $lastTime; - $diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null,true); + $diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); if (0 === $lastTime) { Log::info('Recurring transactions cron-job has never fired before.'); diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php index 4ccc0be661..62d083b016 100644 --- a/app/Support/Export/ExportDataGenerator.php +++ b/app/Support/Export/ExportDataGenerator.php @@ -61,6 +61,8 @@ use League\Csv\Writer; */ class ExportDataGenerator { + private const ADD_RECORD_ERR = 'Could not add record to set: %s'; + private const EXPORT_ERR = 'Could not export to string: %s'; private Collection $accounts; private Carbon $end; private bool $exportAccounts; @@ -75,9 +77,6 @@ class ExportDataGenerator private Carbon $start; private User $user; - private const ADD_RECORD_ERR = 'Could not add record to set: %s'; - private const EXPORT_ERR = 'Could not export to string: %s'; - public function __construct() { $this->accounts = new Collection; @@ -644,7 +643,7 @@ class ExportDataGenerator */ private function exportTransactions(): string { -// See reference nr. 41 + // See reference nr. 41 $header = ['user_id', 'group_id', 'journal_id', 'created_at', 'updated_at', 'group_title', 'type', 'amount', 'foreign_amount', 'currency_code', 'foreign_currency_code', 'description', 'date', 'source_name', 'source_iban', 'source_type', 'destination_name', 'destination_iban', 'destination_type', 'reconciled', 'category', 'budget', 'bill', 'tags', 'notes', diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index 9eb829bd22..eb9b9c0ce2 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -52,16 +52,6 @@ class FireflyConfig } } - /** - * @param string $name - * - * @return bool - */ - public function has(string $name): bool - { - return Configuration::where('name', $name)->count() === 1; - } - /** * @param string $name * @param bool|string|int|null $default @@ -96,39 +86,6 @@ class FireflyConfig return $this->set($name, $default); } - /** - * @param string $name - * @param mixed $default - * - * @return Configuration|null - */ - public function getFresh(string $name, $default = null): ?Configuration - { - - $config = Configuration::where('name', $name)->first(['id', 'name', 'data']); - if ($config) { - - return $config; - } - // no preference found and default is null: - if (null === $default) { - return null; - } - - return $this->set($name, $default); - } - - /** - * @param string $name - * @param mixed $value - * - * @return Configuration - */ - public function put(string $name, $value): Configuration - { - return $this->set($name, $value); - } - /** * @param string $name * @param mixed $value @@ -162,4 +119,47 @@ class FireflyConfig return $config; } + + /** + * @param string $name + * @param mixed $default + * + * @return Configuration|null + */ + public function getFresh(string $name, $default = null): ?Configuration + { + + $config = Configuration::where('name', $name)->first(['id', 'name', 'data']); + if ($config) { + + return $config; + } + // no preference found and default is null: + if (null === $default) { + return null; + } + + return $this->set($name, $default); + } + + /** + * @param string $name + * + * @return bool + */ + public function has(string $name): bool + { + return Configuration::where('name', $name)->count() === 1; + } + + /** + * @param string $name + * @param mixed $value + * + * @return Configuration + */ + public function put(string $name, $value): Configuration + { + return $this->set($name, $value); + } } diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.php index 1ee2f33919..74102fb38a 100644 --- a/app/Support/Form/AccountForm.php +++ b/app/Support/Form/AccountForm.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Form; + use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -33,8 +34,8 @@ use Throwable; * * All form methods that are account related. * -* See reference nr. 29 -* See reference nr. 30 + * See reference nr. 29 + * See reference nr. 30 */ class AccountForm { @@ -160,6 +161,7 @@ class AccountForm return $this->select($name, $grouped, $value, $options); } + /** * Same list but all liabilities as well. * diff --git a/app/Support/Form/CurrencyForm.php b/app/Support/Form/CurrencyForm.php index ac7e10cade..54bc0a6597 100644 --- a/app/Support/Form/CurrencyForm.php +++ b/app/Support/Form/CurrencyForm.php @@ -72,7 +72,7 @@ class CurrencyForm unset($options['currency'], $options['placeholder']); // perhaps the currency has been sent to us in the field $amount_currency_id_$name (amount_currency_id_amount) - $preFilled = session('preFilled'); + $preFilled = session('preFilled'); if (!is_array($preFilled)) { $preFilled = []; } @@ -105,7 +105,7 @@ class CurrencyForm } /** -* See reference nr. 23 + * See reference nr. 23 * * @param string $name * @param mixed $value @@ -119,7 +119,7 @@ class CurrencyForm } /** -* See reference nr. 24 + * See reference nr. 24 * * @param string $name * @param string $view @@ -174,7 +174,7 @@ class CurrencyForm } /** -* See reference nr. 25 + * See reference nr. 25 * * @param string $name * @param mixed $value @@ -199,7 +199,7 @@ class CurrencyForm } /** -* See reference nr. 26 + * See reference nr. 26 * * @param string $name * @param mixed $value diff --git a/app/Support/Form/PiggyBankForm.php b/app/Support/Form/PiggyBankForm.php index 2586268a12..e4165cb49b 100644 --- a/app/Support/Form/PiggyBankForm.php +++ b/app/Support/Form/PiggyBankForm.php @@ -22,20 +22,21 @@ declare(strict_types=1); namespace FireflyIII\Support\Form; + use FireflyIII\Models\PiggyBank; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; /** * Class PiggyBankForm * -* See reference nr. 27 + * See reference nr. 27 */ class PiggyBankForm { use FormSupport; /** -* See reference nr. 28 + * See reference nr. 28 * * @param string $name * @param mixed $value diff --git a/app/Support/Form/RuleForm.php b/app/Support/Form/RuleForm.php index 4ffd8dbd6b..a757d5b983 100644 --- a/app/Support/Form/RuleForm.php +++ b/app/Support/Form/RuleForm.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Form; + use FireflyIII\Models\RuleGroup; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use Form; @@ -29,7 +30,7 @@ use Illuminate\Support\HtmlString; /** * Class RuleForm -* See reference nr. 31 + * See reference nr. 31 */ class RuleForm { diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index 7ef49e57cf..644d5d39a7 100644 --- a/app/Support/Http/Controllers/AugumentData.php +++ b/app/Support/Http/Controllers/AugumentData.php @@ -37,6 +37,7 @@ use FireflyIII\Repositories\Budget\OperationsRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; /** * Trait AugumentData @@ -190,7 +191,7 @@ trait AugumentData * @param Carbon $end * * @return Collection - * @throws \JsonException + * @throws JsonException */ protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info { @@ -207,7 +208,7 @@ trait AugumentData $cache->addProperty('get-limits'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $set = $blRepository->getBudgetLimits($budget, $start, $end); diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index 373aee5b73..930269e701 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -24,12 +24,14 @@ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -45,8 +47,8 @@ trait ChartGeneration * @param Carbon $end * * @return array - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method. { @@ -58,7 +60,7 @@ trait ChartGeneration $cache->addProperty('chart.account.account-balance-chart'); $cache->addProperty($accounts); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } Log::debug('Regenerate chart.account.account-balance-chart from scratch.'); $locale = app('steam')->getLocale(); @@ -74,7 +76,7 @@ trait ChartGeneration $chartData = []; /** @var Account $account */ foreach ($accounts as $account) { -// See reference nr. 33 + // See reference nr. 33 $currency = $repository->find((int)$accountRepos->getMetaValue($account, 'currency_id')); if (null === $currency) { $currency = $default; diff --git a/app/Support/Http/Controllers/CreateStuff.php b/app/Support/Http/Controllers/CreateStuff.php index 28188f75ee..039d5c853c 100644 --- a/app/Support/Http/Controllers/CreateStuff.php +++ b/app/Support/Http/Controllers/CreateStuff.php @@ -85,7 +85,7 @@ trait CreateStuff $assetAccount = [ 'name' => (string)trans('firefly.cash_wallet', [], $language), 'iban' => null, - 'account_type_name' => 'asset', + 'account_type_name' => 'asset', 'virtual_balance' => 0, 'account_type_id' => null, 'active' => true, @@ -115,7 +115,7 @@ trait CreateStuff } // switch on class existence. - $keys= []; + $keys = []; Log::info(sprintf('PHP version is %s', phpversion())); if (class_exists(LegacyRSA::class)) { // PHP 7 @@ -152,7 +152,7 @@ trait CreateStuff $savingsAccount = [ 'name' => (string)trans('firefly.new_savings_account', ['bank_name' => $request->get('bank_name')], $language), 'iban' => null, - 'account_type_name' => 'asset', + 'account_type_name' => 'asset', 'account_type_id' => null, 'virtual_balance' => 0, 'active' => true, diff --git a/app/Support/Http/Controllers/DateCalculation.php b/app/Support/Http/Controllers/DateCalculation.php index 68d1ae743c..05d2b44421 100644 --- a/app/Support/Http/Controllers/DateCalculation.php +++ b/app/Support/Http/Controllers/DateCalculation.php @@ -88,17 +88,18 @@ trait DateCalculation $step = '1D'; $months = $start->diffInMonths($end); if ($months > 3) { - $step = '1W'; + $step = '1W'; } if ($months > 24) { - $step = '1M'; + $step = '1M'; } if ($months > 100) { - $step = '1Y'; + $step = '1Y'; } return $step; } + /** * Get a list of the periods that will occur after this date. For example, * March 2018, April 2018, etc. diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index 5493ae41ee..eb473a1f47 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -22,7 +22,9 @@ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; + use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use Log; /** @@ -85,7 +87,7 @@ trait GetConfigurationData * Get config for date range. * * @return array - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ protected function getDateRangeConfig(): array // get configuration + get preferences. { diff --git a/app/Support/Http/Controllers/ModelInformation.php b/app/Support/Http/Controllers/ModelInformation.php index d91cbb83a4..57fe491464 100644 --- a/app/Support/Http/Controllers/ModelInformation.php +++ b/app/Support/Http/Controllers/ModelInformation.php @@ -115,7 +115,7 @@ trait ModelInformation */ protected function getTriggersForBill(Bill $bill): array // get info and augument { -// See reference nr. 39 + // See reference nr. 39 $operators = config('firefly.search.operators'); $triggers = []; foreach ($operators as $key => $operator) { @@ -167,7 +167,7 @@ trait ModelInformation */ private function getTriggersForJournal(TransactionJournal $journal): array { -// See reference nr. 40 + // See reference nr. 40 $operators = config('firefly.search.operators'); $triggers = []; foreach ($operators as $key => $operator) { diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index da65f3bfa4..f67ed67074 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -33,6 +33,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use JsonException; use Log; /** @@ -78,7 +79,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array { @@ -270,7 +271,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array { @@ -349,7 +350,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array { @@ -403,7 +404,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getNoCategoryPeriodOverview(Carbon $theDate): array { @@ -484,7 +485,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags. { @@ -559,7 +560,7 @@ trait PeriodOverview * * @return array * @throws FireflyException - * @throws \JsonException + * @throws JsonException */ protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array { diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.php index d0829339d9..ad177f8c37 100644 --- a/app/Support/Http/Controllers/RenderPartialViews.php +++ b/app/Support/Http/Controllers/RenderPartialViews.php @@ -72,6 +72,7 @@ trait RenderPartialViews Log::error(sprintf('Could not render: %s', $e->getMessage())); $view = 'Firefly III could not render the view. Please see the log files.'; } + return $view; } @@ -92,6 +93,7 @@ trait RenderPartialViews Log::error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage())); $result = 'Could not render view.'; } + return $result; } @@ -122,6 +124,7 @@ trait RenderPartialViews Log::error(sprintf('Could not render: %s', $e->getMessage())); $view = 'Firefly III could not render the view. Please see the log files.'; } + return $view; } @@ -169,6 +172,7 @@ trait RenderPartialViews Log::error(sprintf('Cannot render reports.options.category: %s', $e->getMessage())); $result = 'Could not render view.'; } + return $result; } @@ -209,6 +213,7 @@ trait RenderPartialViews Log::error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage())); $result = 'Could not render view.'; } + return $result; } @@ -241,6 +246,7 @@ trait RenderPartialViews Log::error(sprintf('Could not render: %s', $e->getMessage())); $view = 'Firefly III could not render the view. Please see the log files.'; } + return $view; } @@ -292,7 +298,7 @@ trait RenderPartialViews */ protected function getCurrentTriggers(Rule $rule): array // get info from object and present. { -// See reference nr. 38 + // See reference nr. 38 $operators = config('firefly.search.operators'); $triggers = []; foreach ($operators as $key => $operator) { @@ -362,6 +368,7 @@ trait RenderPartialViews Log::error(sprintf('Could not render: %s', $e->getMessage())); $view = 'Firefly III could not render the view. Please see the log files.'; } + return $view; } @@ -379,6 +386,7 @@ trait RenderPartialViews Log::error(sprintf('Cannot render reports.options.no-options: %s', $e->getMessage())); $result = 'Could not render view.'; } + return $result; } @@ -400,6 +408,7 @@ trait RenderPartialViews Log::error(sprintf('Cannot render reports.options.tag: %s', $e->getMessage())); $result = 'Could not render view.'; } + return $result; } } diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php index 280893eb71..05b7c73bf3 100644 --- a/app/Support/Http/Controllers/RequestInformation.php +++ b/app/Support/Http/Controllers/RequestInformation.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Http\Controllers; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\ValidationException; use FireflyIII\Helpers\Help\HelpInterface; use FireflyIII\Http\Requests\TestRuleFormRequest; @@ -113,25 +114,7 @@ trait RequestInformation return $content; } - return '

' . trans('firefly.route_has_no_help') . '

'; - } - - /** - * @return string - */ - final protected function getPageName(): string // get request info - { - return str_replace('.', '_', RouteFacade::currentRouteName()); - } - - /** - * Get the specific name of a page for intro. - * - * @return string - */ - final protected function getSpecificPageName(): string // get request info - { - return null === RouteFacade::current()->parameter('objectType') ? '' : '_' . RouteFacade::current()->parameter('objectType'); + return '

' . trans('firefly.route_has_no_help') . '

'; } /** @@ -162,7 +145,7 @@ trait RequestInformation * Returns if user has seen demo. * * @return bool - * @throws \FireflyIII\Exceptions\FireflyException + * @throws FireflyException */ final protected function hasSeenDemo(): bool // get request info + get preference { @@ -181,12 +164,30 @@ trait RequestInformation $shownDemo = app('preferences')->get($key, false)->data; } if (!is_bool($shownDemo)) { - $shownDemo = true; + $shownDemo = true; } return $shownDemo; } + /** + * @return string + */ + final protected function getPageName(): string // get request info + { + return str_replace('.', '_', RouteFacade::currentRouteName()); + } + + /** + * Get the specific name of a page for intro. + * + * @return string + */ + final protected function getSpecificPageName(): string // get request info + { + return null === RouteFacade::current()->parameter('objectType') ? '' : '_' . RouteFacade::current()->parameter('objectType'); + } + /** * Check if date is outside session range. * diff --git a/app/Support/Http/Controllers/RuleManagement.php b/app/Support/Http/Controllers/RuleManagement.php index 01ab4e63ff..53bbc1300b 100644 --- a/app/Support/Http/Controllers/RuleManagement.php +++ b/app/Support/Http/Controllers/RuleManagement.php @@ -78,7 +78,7 @@ trait RuleManagement */ protected function getPreviousTriggers(Request $request): array { -// See reference nr. 34 + // See reference nr. 34 $operators = config('firefly.search.operators'); $triggers = []; foreach ($operators as $key => $operator) { @@ -123,7 +123,7 @@ trait RuleManagement */ protected function parseFromOperators(array $submittedOperators): array { -// See reference nr. 35 + // See reference nr. 35 $operators = config('firefly.search.operators'); $renderedEntries = []; $triggers = []; diff --git a/app/Support/Http/Controllers/UserNavigation.php b/app/Support/Http/Controllers/UserNavigation.php index d25e11b200..28428810b4 100644 --- a/app/Support/Http/Controllers/UserNavigation.php +++ b/app/Support/Http/Controllers/UserNavigation.php @@ -60,7 +60,7 @@ trait UserNavigation Log::debug(sprintf('The URI is %s', $uri)); if (str_contains($uri, 'jscript')) { - $uri = $this->redirectUri; + $uri = $this->redirectUri; Log::debug(sprintf('URI is now %s (uri contains jscript)', $uri)); } diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 145ac905ed..437c0e23e0 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -159,6 +159,57 @@ class Navigation return $periods; } + /** + * @param Carbon $theDate + * @param string $repeatFreq + * + * @return Carbon + */ + public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon + { + $date = clone $theDate; + + $functionMap = [ + '1D' => 'startOfDay', + 'daily' => 'startOfDay', + '1W' => 'startOfWeek', + 'week' => 'startOfWeek', + 'weekly' => 'startOfWeek', + 'month' => 'startOfMonth', + '1M' => 'startOfMonth', + 'monthly' => 'startOfMonth', + '3M' => 'firstOfQuarter', + 'quarter' => 'firstOfQuarter', + 'quarterly' => 'firstOfQuarter', + 'year' => 'startOfYear', + 'yearly' => 'startOfYear', + '1Y' => 'startOfYear', + ]; + if (array_key_exists($repeatFreq, $functionMap)) { + $function = $functionMap[$repeatFreq]; + $date->$function(); + + return $date; + } + if ('half-year' === $repeatFreq || '6M' === $repeatFreq) { + $month = $date->month; + $date->startOfYear(); + if ($month >= 7) { + $date->addMonths(6); + } + + return $date; + } + + if ('custom' === $repeatFreq) { + return $date; // the date is already at the start. + } + Log::error(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $repeatFreq)); + + return $theDate; + + } + /** * @param Carbon $end * @param string $repeatFreq @@ -313,6 +364,29 @@ class Navigation return $entries; } + /** + * If the date difference between start and end is less than a month, method returns "Y-m-d". If the difference is less than a year, + * method returns "Y-m". If the date difference is larger, method returns "Y". + * + * @param Carbon $start + * @param Carbon $end + * + * @return string + */ + public function preferredCarbonFormat(Carbon $start, Carbon $end): string + { + $format = 'Y-m-d'; + if ($start->diffInMonths($end) > 1) { + $format = 'Y-m'; + } + + if ($start->diffInMonths($end) > 12) { + $format = 'Y'; + } + + return $format; + } + /** * @param Carbon $theDate * @param string $repeatFrequency @@ -354,29 +428,6 @@ class Navigation } - /** - * If the date difference between start and end is less than a month, method returns "Y-m-d". If the difference is less than a year, - * method returns "Y-m". If the date difference is larger, method returns "Y". - * - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function preferredCarbonFormat(Carbon $start, Carbon $end): string - { - $format = 'Y-m-d'; - if ($start->diffInMonths($end) > 1) { - $format = 'Y-m'; - } - - if ($start->diffInMonths($end) > 12) { - $format = 'Y'; - } - - return $format; - } - /** * If the date difference between start and end is less than a month, method returns trans(config.month_and_day). If the difference is less than a year, * method returns "config.month". If the date difference is larger, method returns "config.year". @@ -470,57 +521,6 @@ class Navigation return $format; } - /** - * @param Carbon $theDate - * @param string $repeatFreq - * - * @return Carbon - */ - public function startOfPeriod(Carbon $theDate, string $repeatFreq): Carbon - { - $date = clone $theDate; - - $functionMap = [ - '1D' => 'startOfDay', - 'daily' => 'startOfDay', - '1W' => 'startOfWeek', - 'week' => 'startOfWeek', - 'weekly' => 'startOfWeek', - 'month' => 'startOfMonth', - '1M' => 'startOfMonth', - 'monthly' => 'startOfMonth', - '3M' => 'firstOfQuarter', - 'quarter' => 'firstOfQuarter', - 'quarterly' => 'firstOfQuarter', - 'year' => 'startOfYear', - 'yearly' => 'startOfYear', - '1Y' => 'startOfYear', - ]; - if (array_key_exists($repeatFreq, $functionMap)) { - $function = $functionMap[$repeatFreq]; - $date->$function(); - - return $date; - } - if ('half-year' === $repeatFreq || '6M' === $repeatFreq) { - $month = $date->month; - $date->startOfYear(); - if ($month >= 7) { - $date->addMonths(6); - } - - return $date; - } - - if ('custom' === $repeatFreq) { - return $date; // the date is already at the start. - } - Log::error(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $repeatFreq)); - - return $theDate; - - } - /** * @param Carbon $theDate * @param string $repeatFreq diff --git a/app/Support/NullArrayObject.php b/app/Support/NullArrayObject.php index 6a25fb8608..60d20319db 100644 --- a/app/Support/NullArrayObject.php +++ b/app/Support/NullArrayObject.php @@ -22,10 +22,12 @@ declare(strict_types=1); namespace FireflyIII\Support; + use ArrayObject; /** * Class NullArrayObject + * * @codeCoverageIgnore */ class NullArrayObject extends ArrayObject diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.php index 3fe2b018fb..bca98b29d6 100644 --- a/app/Support/ParseDateString.php +++ b/app/Support/ParseDateString.php @@ -21,6 +21,7 @@ */ declare(strict_types=1); + namespace FireflyIII\Support; use Carbon\Carbon; @@ -47,6 +48,30 @@ class ParseDateString 'end of this year', ]; + /** + * @param string $date + * + * @return bool + */ + public function isDateRange(string $date): bool + { + $date = strtolower($date); + // not 10 chars: + if (10 !== strlen($date)) { + return false; + } + // all x'es + if ('xxxx-xx-xx' === strtolower($date)) { + return false; + } + // no x'es + if (!str_contains($date, 'xx') && !str_contains($date, 'xxxx')) { + return false; + } + + return true; + } + /** * @param string $date * @@ -89,35 +114,99 @@ class ParseDateString return new Carbon('1984-09-17'); } // maybe a year, nothing else? - if (4 === strlen($date) && is_numeric($date) && (int) $date > 1000 && (int) $date <= 3000) { + if (4 === strlen($date) && is_numeric($date) && (int)$date > 1000 && (int)$date <= 3000) { return new Carbon(sprintf('%d-01-01', $date)); } throw new FireflyException(sprintf('[d]Not a recognised date format: "%s"', $date)); } + /** + * @param string $keyword + * + * @return Carbon + */ + protected function parseKeyword(string $keyword): Carbon + { + $today = Carbon::today()->startOfDay(); + + return match ($keyword) { + default => $today, + 'yesterday' => $today->subDay(), + 'tomorrow' => $today->addDay(), + 'start of this week' => $today->startOfWeek(), + 'end of this week' => $today->endOfWeek(), + 'start of this month' => $today->startOfMonth(), + 'end of this month' => $today->endOfMonth(), + 'start of this quarter' => $today->startOfQuarter(), + 'end of this quarter' => $today->endOfQuarter(), + 'start of this year' => $today->startOfYear(), + 'end of this year' => $today->endOfYear(), + }; + } + /** * @param string $date * - * @return bool + * @return Carbon */ - public function isDateRange(string $date): bool + protected function parseDefaultDate(string $date): Carbon { - $date = strtolower($date); - // not 10 chars: - if (10 !== strlen($date)) { - return false; - } - // all x'es - if ('xxxx-xx-xx' === strtolower($date)) { - return false; - } - // no x'es - if (!str_contains($date, 'xx') && !str_contains($date, 'xxxx')) { - return false; + return Carbon::createFromFormat('Y-m-d', $date); + } + + /** + * @param string $date + * + * @return Carbon + */ + protected function parseRelativeDate(string $date): Carbon + { + Log::debug(sprintf('Now in parseRelativeDate("%s")', $date)); + $parts = explode(' ', $date); + $today = Carbon::today()->startOfDay(); + $functions = [ + [ + 'd' => 'subDays', + 'w' => 'subWeeks', + 'm' => 'subMonths', + 'q' => 'subQuarters', + 'y' => 'subYears', + ], [ + 'd' => 'addDays', + 'w' => 'addWeeks', + 'm' => 'addMonths', + 'q' => 'addQuarters', + 'y' => 'addYears', + ], + ]; + + foreach ($parts as $part) { + Log::debug(sprintf('Now parsing part "%s"', $part)); + $part = trim($part); + + // verify if correct + $pattern = '/[+-]\d+[wqmdy]/'; + $res = preg_match($pattern, $part); + if (0 === $res || false === $res) { + Log::error(sprintf('Part "%s" does not match regular expression. Will be skipped.', $part)); + continue; + } + $direction = str_starts_with($part, '+') ? 1 : 0; + $period = $part[strlen($part) - 1]; + $number = (int)substr($part, 1, -1); + if (!array_key_exists($period, $functions[$direction])) { + Log::error(sprintf('No method for direction %d and period "%s".', $direction, $period)); + continue; + } + $func = $functions[$direction][$period]; + Log::debug(sprintf('Will now do %s(%d) on %s', $func, $number, $today->format('Y-m-d'))); + $today->$func($number); + Log::debug(sprintf('Resulting date is %s', $today->format('Y-m-d'))); + } - return true; + return $today; } /** @@ -213,21 +302,29 @@ class ParseDateString /** * @param string $date + * @param Carbon $journalDate * - * @return bool + * @return array */ - protected function isMonthYearRange(string $date): bool + protected function parseMonthRange(string $date, Carbon $journalDate): array { - // if regex for YYYY-MM-xx: - $pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-xx$/'; - if (preg_match($pattern, $date)) { - Log::debug(sprintf('"%s" is a month/year range.', $date)); - - return true; + // because 31 would turn February into March unexpectedly and the exact day is irrelevant here. + $day = $journalDate->format('d'); + if ((int)$day > 28) { + $day = '28'; } - Log::debug(sprintf('"%s" is not a month/year range.', $date)); - return false; + // format of string is xxxx-MM-xx + $validDate = str_replace(['xxxx'], [$journalDate->year], $date); + $validDate = str_replace(['xx'], [$day], $validDate); + Log::debug(sprintf('parseMonthRange: Parsed "%s" into "%s"', $date, $validDate)); + $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfMonth(); + $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfMonth(); + + return [ + 'start' => $start, + 'end' => $end, + ]; } /** @@ -248,146 +345,6 @@ class ParseDateString return false; } - /** - * @param string $date - * - * @return Carbon - */ - protected function parseDefaultDate(string $date): Carbon - { - return Carbon::createFromFormat('Y-m-d', $date); - } - - /** - * @param string $keyword - * - * @return Carbon - */ - protected function parseKeyword(string $keyword): Carbon - { - $today = Carbon::today()->startOfDay(); - - return match ($keyword) { - default => $today, - 'yesterday' => $today->subDay(), - 'tomorrow' => $today->addDay(), - 'start of this week' => $today->startOfWeek(), - 'end of this week' => $today->endOfWeek(), - 'start of this month' => $today->startOfMonth(), - 'end of this month' => $today->endOfMonth(), - 'start of this quarter' => $today->startOfQuarter(), - 'end of this quarter' => $today->endOfQuarter(), - 'start of this year' => $today->startOfYear(), - 'end of this year' => $today->endOfYear(), - }; - } - - /** - * @param string $date - * @param Carbon $journalDate - * - * @return array - */ - protected function parseMonthRange(string $date, Carbon $journalDate): array - { - // because 31 would turn February into March unexpectedly and the exact day is irrelevant here. - $day = $journalDate->format('d'); - if ((int) $day > 28) { - $day = '28'; - } - - // format of string is xxxx-MM-xx - $validDate = str_replace(['xxxx'], [$journalDate->year], $date); - $validDate = str_replace(['xx'], [$day], $validDate); - Log::debug(sprintf('parseMonthRange: Parsed "%s" into "%s"', $date, $validDate)); - $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfMonth(); - $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfMonth(); - - return [ - 'start' => $start, - 'end' => $end, - ]; - } - - /** - * @param string $date - * @param Carbon $journalDate - * - * @return array - */ - protected function parseMonthYearRange(string $date, Carbon $journalDate): array - { - // because 31 would turn February into March unexpectedly and the exact day is irrelevant here. - $day = $journalDate->format('d'); - if ((int) $day > 28) { - $day = '28'; - } - - // format of string is YYYY-MM-xx - $validDate = str_replace(['xx'], [$day], $date); - Log::debug(sprintf('parseMonthYearRange: Parsed "%s" into "%s"', $date, $validDate)); - $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfMonth(); - $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfMonth(); - - return [ - 'start' => $start, - 'end' => $end, - ]; - } - - /** - * @param string $date - * - * @return Carbon - */ - protected function parseRelativeDate(string $date): Carbon - { - Log::debug(sprintf('Now in parseRelativeDate("%s")', $date)); - $parts = explode(' ', $date); - $today = Carbon::today()->startOfDay(); - $functions = [ - [ - 'd' => 'subDays', - 'w' => 'subWeeks', - 'm' => 'subMonths', - 'q' => 'subQuarters', - 'y' => 'subYears', - ], [ - 'd' => 'addDays', - 'w' => 'addWeeks', - 'm' => 'addMonths', - 'q' => 'addQuarters', - 'y' => 'addYears', - ], - ]; - - foreach ($parts as $part) { - Log::debug(sprintf('Now parsing part "%s"', $part)); - $part = trim($part); - - // verify if correct - $pattern = '/[+-]\d+[wqmdy]/'; - $res = preg_match($pattern, $part); - if (0 === $res || false === $res) { - Log::error(sprintf('Part "%s" does not match regular expression. Will be skipped.', $part)); - continue; - } - $direction = str_starts_with($part, '+') ? 1 : 0; - $period = $part[strlen($part) - 1]; - $number = (int) substr($part, 1, -1); - if (!array_key_exists($period, $functions[$direction])) { - Log::error(sprintf('No method for direction %d and period "%s".', $direction, $period)); - continue; - } - $func = $functions[$direction][$period]; - Log::debug(sprintf('Will now do %s(%d) on %s', $func, $number, $today->format('Y-m-d'))); - $today->$func($number); - Log::debug(sprintf('Resulting date is %s', $today->format('Y-m-d'))); - - } - - return $today; - } /** * @param string $date @@ -430,6 +387,27 @@ class ParseDateString return false; } + /** + * @param string $date + * @param Carbon $journalDate + * + * @return array + */ + private function parseMonthDayRange(string $date, Carbon $journalDate): array + { + // Any year. + // format of string is xxxx-MM-DD + $validDate = str_replace(['xxxx'], [$journalDate->year], $date); + Log::debug(sprintf('parseMonthDayRange: Parsed "%s" into "%s"', $date, $validDate)); + $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfDay(); + $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfDay(); + + return [ + 'start' => $start, + 'end' => $end, + ]; + } + /** * @param string $date * @@ -449,27 +427,6 @@ class ParseDateString return false; } - /** - * @param string $date - * @param Carbon $journalDate - * - * @return array - */ - private function parseMonthDayRange(string $date, Carbon $journalDate): array - { - // Any year. - // format of string is xxxx-MM-DD - $validDate = str_replace(['xxxx'], [$journalDate->year], $date); - Log::debug(sprintf('parseMonthDayRange: Parsed "%s" into "%s"', $date, $validDate)); - $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfDay(); - $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfDay(); - - return [ - 'start' => $start, - 'end' => $end, - ]; - } - /** * @param string $date * @param Carbon $journalDate @@ -491,4 +448,49 @@ class ParseDateString ]; } + /** + * @param string $date + * + * @return bool + */ + protected function isMonthYearRange(string $date): bool + { + // if regex for YYYY-MM-xx: + $pattern = '/^(19|20)\d\d-(0[1-9]|1[012])-xx$/'; + if (preg_match($pattern, $date)) { + Log::debug(sprintf('"%s" is a month/year range.', $date)); + + return true; + } + Log::debug(sprintf('"%s" is not a month/year range.', $date)); + + return false; + } + + /** + * @param string $date + * @param Carbon $journalDate + * + * @return array + */ + protected function parseMonthYearRange(string $date, Carbon $journalDate): array + { + // because 31 would turn February into March unexpectedly and the exact day is irrelevant here. + $day = $journalDate->format('d'); + if ((int)$day > 28) { + $day = '28'; + } + + // format of string is YYYY-MM-xx + $validDate = str_replace(['xx'], [$day], $date); + Log::debug(sprintf('parseMonthYearRange: Parsed "%s" into "%s"', $date, $validDate)); + $start = Carbon::createFromFormat('Y-m-d', $validDate)->startOfMonth(); + $end = Carbon::createFromFormat('Y-m-d', $validDate)->endOfMonth(); + + return [ + 'start' => $start, + 'end' => $end, + ]; + } + } diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index de81c8e269..8f9a91862f 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -38,6 +38,19 @@ use Session; */ class Preferences { + /** + * @return Collection + */ + public function all(): Collection + { + $user = auth()->user(); + if (null === $user) { + return new Collection; + } + + return Preference::where('user_id', $user->id)->get(); + } + /** * @param User $user * @param string $search @@ -81,45 +94,14 @@ class Preferences } /** + * @param User $user * @param string $name - * @param mixed $default - * - * @return Preference|null - * @throws FireflyException */ - public function get(string $name, $default = null): ?Preference + public function forget(User $user, string $name): void { - /** @var User|null $user */ - $user = auth()->user(); - if (null === $user) { - $preference = new Preference; - $preference->data = $default; - - return $preference; - } - - return $this->getForUser($user, $name, $default); - } - - /** - * @param string $name - * @param mixed $default - * - * @return Preference|null - * @throws FireflyException - */ - public function getFresh(string $name, $default = null): ?Preference - { - /** @var User|null $user */ - $user = auth()->user(); - if (null === $user) { - $preference = new Preference; - $preference->data = $default; - - return $preference; - } - - return $this->getFreshForUser($user, $name, $default); + $key = sprintf('preference%s%s', $user->id, $name); + Cache::forget($key); + Cache::put($key, '', 5); } /** @@ -146,16 +128,38 @@ class Preferences } /** - * @return Collection + * @param string $name + * @param mixed $default + * + * @return Preference|null + * @throws FireflyException */ - public function all(): Collection + public function getFresh(string $name, $default = null): ?Preference { + /** @var User|null $user */ $user = auth()->user(); - if(null === $user) { - return new Collection; + if (null === $user) { + $preference = new Preference; + $preference->data = $default; + + return $preference; } - return Preference::where('user_id', $user->id)->get(); + return $this->getFreshForUser($user, $name, $default); + } + + /** + * @param User $user + * @param string $name + * @param null $default + * + * @return Preference|null + * See reference nr. 44 + * @throws FireflyException + */ + public function getFreshForUser(User $user, string $name, $default = null): ?Preference + { + return $this->getForUser($user, $name, $default); } /** @@ -168,7 +172,7 @@ class Preferences */ public function getForUser(User $user, string $name, $default = null): ?Preference { - $preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id','user_id', 'name', 'data', 'updated_at', 'created_at']); + $preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'user_id', 'name', 'data', 'updated_at', 'created_at']); if (null !== $preference && null === $preference->data) { try { $preference->delete(); @@ -194,15 +198,44 @@ class Preferences /** * @param User $user * @param string $name - * @param null $default + * @param mixed $value * - * @return Preference|null -* See reference nr. 44 + * @return Preference * @throws FireflyException */ - public function getFreshForUser(User $user, string $name, $default = null): ?Preference + public function setForUser(User $user, string $name, $value): Preference { - return $this->getForUser($user, $name, $default); + $fullName = sprintf('preference%s%s', $user->id, $name); + Cache::forget($fullName); + /** @var Preference|null $pref */ + $pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); + + if (null !== $pref && null === $value) { + try { + $pref->delete(); + } catch (Exception $e) { + throw new FireflyException(sprintf('Could not delete preference: %s', $e->getMessage()), 0, $e); + } + + return new Preference; + } + if (null === $value) { + return new Preference; + } + if (null === $pref) { + $pref = new Preference; + $pref->user_id = $user->id; + $pref->name = $name; + } + $pref->data = $value; + try { + $pref->save(); + } catch (PDOException $e) { + throw new FireflyException(sprintf('Could not save preference: %s', $e->getMessage()), 0, $e); + } + Cache::forever($fullName, $pref); + + return $pref; } /** @@ -224,6 +257,27 @@ class Preferences return hash('sha256', $lastActivity); } + /** + * @param string $name + * @param mixed $default + * + * @return Preference|null + * @throws FireflyException + */ + public function get(string $name, $default = null): ?Preference + { + /** @var User|null $user */ + $user = auth()->user(); + if (null === $user) { + $preference = new Preference; + $preference->data = $default; + + return $preference; + } + + return $this->getForUser($user, $name, $default); + } + /** * */ @@ -254,58 +308,4 @@ class Preferences return $this->setForUser(auth()->user(), $name, $value); } - - /** - * @param User $user - * @param string $name - */ - public function forget(User $user, string $name): void - { - $key = sprintf('preference%s%s', $user->id, $name); - Cache::forget($key); - Cache::put($key, '', 5); - } - - /** - * @param User $user - * @param string $name - * @param mixed $value - * - * @return Preference - * @throws FireflyException - */ - public function setForUser(User $user, string $name, $value): Preference - { - $fullName = sprintf('preference%s%s', $user->id, $name); - Cache::forget($fullName); - /** @var Preference|null $pref */ - $pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); - - if (null !== $pref && null === $value) { - try { - $pref->delete(); - } catch (Exception $e) { - throw new FireflyException(sprintf('Could not delete preference: %s', $e->getMessage()), 0, $e); - } - - return new Preference; - } - if (null === $value) { - return new Preference; - } - if(null === $pref) { - $pref = new Preference; - $pref->user_id = $user->id; - $pref->name = $name; - } - $pref->data = $value; - try { - $pref->save(); - } catch(PDOException $e) { - throw new FireflyException(sprintf('Could not save preference: %s', $e->getMessage()), 0, $e); - } - Cache::forever($fullName, $pref); - - return $pref; - } } diff --git a/app/Support/Report/Category/CategoryReportGenerator.php b/app/Support/Report/Category/CategoryReportGenerator.php index 5e4f9e45d1..cdaf8ac5e1 100644 --- a/app/Support/Report/Category/CategoryReportGenerator.php +++ b/app/Support/Report/Category/CategoryReportGenerator.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Report\Category; + use Carbon\Carbon; use FireflyIII\Repositories\Category\NoCategoryRepositoryInterface; use FireflyIII\Repositories\Category\OperationsRepositoryInterface; diff --git a/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php b/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php index 58530fec37..87d1f78ee7 100644 --- a/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php +++ b/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php @@ -56,6 +56,7 @@ trait CalculateRangeOccurrences return $return; } + /** * Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences. * @@ -88,6 +89,7 @@ trait CalculateRangeOccurrences return $return; } + /** * Get the number of daily occurrences for a recurring transaction until date $end is reached. Will skip every $skipMod-1 occurrences. * diff --git a/app/Support/Repositories/Recurring/CalculateXOccurrences.php b/app/Support/Repositories/Recurring/CalculateXOccurrences.php index 18265fcf02..e8ff1fc664 100644 --- a/app/Support/Repositories/Recurring/CalculateXOccurrences.php +++ b/app/Support/Repositories/Recurring/CalculateXOccurrences.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Repositories\Recurring; + use Carbon\Carbon; /** @@ -58,6 +59,7 @@ trait CalculateXOccurrences return $return; } + /** * Calculates the number of monthly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -94,6 +96,7 @@ trait CalculateXOccurrences return $return; } + /** * Calculates the number of NDOM occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -131,6 +134,7 @@ trait CalculateXOccurrences return $return; } + /** * Calculates the number of weekly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -172,6 +176,7 @@ trait CalculateXOccurrences return $return; } + /** * Calculates the number of yearly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. diff --git a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php index 2554a66acd..b3d4c56a35 100644 --- a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php +++ b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Repositories\Recurring; + use Carbon\Carbon; use Log; @@ -61,6 +62,7 @@ trait CalculateXOccurrencesSince return $return; } + /** * Calculates the number of monthly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -103,6 +105,7 @@ trait CalculateXOccurrencesSince return $return; } + /** * Calculates the number of NDOM occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -142,6 +145,7 @@ trait CalculateXOccurrencesSince return $return; } + /** * Calculates the number of weekly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. @@ -186,6 +190,7 @@ trait CalculateXOccurrencesSince return $return; } + /** * Calculates the number of yearly occurrences for a recurring transaction, starting at the date, until $count is reached. It will skip * over $skipMod -1 recurrences. diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php index 880d8ed6f2..3ce46b1500 100644 --- a/app/Support/Request/ConvertsDataTypes.php +++ b/app/Support/Request/ConvertsDataTypes.php @@ -32,6 +32,30 @@ use Log; */ trait ConvertsDataTypes { + /** + * Return integer value. + * + * @param string $field + * + * @return int + */ + public function integer(string $field): int + { + return (int)$this->get($field); + } + + /** + * Return string value. + * + * @param string $field + * + * @return string + */ + public function string(string $field): string + { + return $this->clearString((string)($this->get($field) ?? ''), false); + } + /** * @param string|null $string * @param bool $keepNewlines @@ -40,7 +64,7 @@ trait ConvertsDataTypes */ public function clearString(?string $string, bool $keepNewlines = true): ?string { - if(null === $string) { + if (null === $string) { return null; } $search = [ @@ -98,30 +122,6 @@ trait ConvertsDataTypes return trim($string); } - /** - * Return integer value. - * - * @param string $field - * - * @return int - */ - public function integer(string $field): int - { - return (int)$this->get($field); - } - - /** - * Return string value. - * - * @param string $field - * - * @return string - */ - public function string(string $field): string - { - return $this->clearString((string)($this->get($field) ?? ''), false); - } - /** * Return string value with newlines. * diff --git a/app/Support/Search/AccountSearch.php b/app/Support/Search/AccountSearch.php index 62b4c9a3bd..5a111c40ea 100644 --- a/app/Support/Search/AccountSearch.php +++ b/app/Support/Search/AccountSearch.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Search; + use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; @@ -61,11 +62,11 @@ class AccountSearch implements GenericSearchInterface public function search(): Collection { - $searchQuery = $this->user->accounts() - ->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id') - ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id') - ->whereIn('account_types.type', $this->types); - $like = sprintf('%%%s%%', $this->query); + $searchQuery = $this->user->accounts() + ->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id') + ->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id') + ->whereIn('account_types.type', $this->types); + $like = sprintf('%%%s%%', $this->query); $originalQuery = $this->query; switch ($this->field) { default: diff --git a/app/Support/Search/GenericSearchInterface.php b/app/Support/Search/GenericSearchInterface.php index 86273122a1..60b4539da7 100644 --- a/app/Support/Search/GenericSearchInterface.php +++ b/app/Support/Search/GenericSearchInterface.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Search; + use Illuminate\Support\Collection; /** diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index 002f96cb8e..e0d38266d2 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -50,7 +50,6 @@ use Gdbots\QueryParser\Node\Phrase; use Gdbots\QueryParser\Node\Subquery; use Gdbots\QueryParser\Node\Url; use Gdbots\QueryParser\Node\Word; -use Gdbots\QueryParser\ParsedQuery; use Gdbots\QueryParser\QueryParser; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; @@ -68,6 +67,7 @@ class OperatorQuerySearch implements SearchInterface private GroupCollectorInterface $collector; private CurrencyRepositoryInterface $currencyRepository; private Carbon $date; + private array $invalidOperators; private int $limit; private Collection $operators; private int $page; @@ -75,7 +75,6 @@ class OperatorQuerySearch implements SearchInterface private TagRepositoryInterface $tagRepository; private array $validOperators; private array $words; - private array $invalidOperators; /** * OperatorQuerySearch constructor. @@ -101,6 +100,14 @@ class OperatorQuerySearch implements SearchInterface $this->currencyRepository = app(CurrencyRepositoryInterface::class); } + /** + * @return array + */ + public function getInvalidOperators(): array + { + return $this->invalidOperators; + } + /** * @inheritDoc * @codeCoverageIgnore @@ -193,14 +200,6 @@ class OperatorQuerySearch implements SearchInterface $this->collector->setLimit($this->limit); } - /** - * @return array - */ - public function getInvalidOperators(): array - { - return $this->invalidOperators; - } - /** * @inheritDoc * @codeCoverageIgnore diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.php index 40ca2e7050..a50f35c833 100644 --- a/app/Support/Search/SearchInterface.php +++ b/app/Support/Search/SearchInterface.php @@ -32,6 +32,11 @@ use Illuminate\Support\Collection; */ interface SearchInterface { + /** + * @return array + */ + public function getInvalidOperators(): array; + /** * @return Collection */ @@ -42,11 +47,6 @@ interface SearchInterface */ public function getOperators(): Collection; - /** - * @return array - */ - public function getInvalidOperators(): array; - /** * @return string */ diff --git a/app/Support/Steam.php b/app/Support/Steam.php index c912b1a556..5287febaee 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -41,56 +41,6 @@ use stdClass; class Steam { - /** - * Gets balance at the end of current month by default - * - * @param Account $account - * @param Carbon $date - * @param TransactionCurrency|null $currency - * - * @return string - * @throws JsonException - */ - public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string - { - // abuse chart properties: - $cache = new CacheProperties; - $cache->addProperty($account->id); - $cache->addProperty('balance'); - $cache->addProperty($date); - $cache->addProperty($currency ? $currency->id : 0); - if ($cache->has()) { - return $cache->get(); - } - /** @var AccountRepositoryInterface $repository */ - $repository = app(AccountRepositoryInterface::class); - if (null === $currency) { - $currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user); - } - // first part: get all balances in own currency: - $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.transaction_currency_id', $currency->id) - ->get(['transactions.amount'])->toArray(); - $nativeBalance = $this->sumTransactions($transactions, 'amount'); - // get all balances in foreign currency: - $transactions = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->where('transactions.foreign_currency_id', $currency->id) - ->where('transactions.transaction_currency_id', '!=', $currency->id) - ->get(['transactions.foreign_amount'])->toArray(); - $foreignBalance = $this->sumTransactions($transactions, 'foreign_amount'); - $balance = bcadd($nativeBalance, $foreignBalance); - $virtual = null === $account->virtual_balance ? '0' : (string)$account->virtual_balance; - $balance = bcadd($balance, $virtual); - - $cache->store($balance); - - return $balance; - } - /** * @param Account $account * @param Carbon $date @@ -106,7 +56,7 @@ class Steam $cache->addProperty('balance-no-virtual'); $cache->addProperty($date); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } /** @var AccountRepositoryInterface $repository */ $repository = app(AccountRepositoryInterface::class); @@ -177,7 +127,7 @@ class Steam $cache->addProperty($start); $cache->addProperty($end); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $start->subDay(); @@ -208,11 +158,11 @@ class Steam ->whereNull('transaction_journals.deleted_at') ->get( [ // @phpstan-ignore-line - 'transaction_journals.date', - 'transactions.transaction_currency_id', - DB::raw('SUM(transactions.amount) AS modified'), - 'transactions.foreign_currency_id', - DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'), + 'transaction_journals.date', + 'transactions.transaction_currency_id', + DB::raw('SUM(transactions.amount) AS modified'), + 'transactions.foreign_currency_id', + DB::raw('SUM(transactions.foreign_amount) AS modified_foreign'), ] ); @@ -244,35 +194,53 @@ class Steam } /** - * @param Account $account - * @param Carbon $date + * Gets balance at the end of current month by default * - * @return array + * @param Account $account + * @param Carbon $date + * @param TransactionCurrency|null $currency + * + * @return string * @throws JsonException */ - public function balancePerCurrency(Account $account, Carbon $date): array + public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string { // abuse chart properties: $cache = new CacheProperties; $cache->addProperty($account->id); - $cache->addProperty('balance-per-currency'); + $cache->addProperty('balance'); $cache->addProperty($date); + $cache->addProperty($currency ? $currency->id : 0); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } - $query = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) - ->groupBy('transactions.transaction_currency_id'); - $balances = $query->get(['transactions.transaction_currency_id', DB::raw('SUM(transactions.amount) as sum_for_currency')]); // @phpstan-ignore-line - $return = []; - /** @var stdClass $entry */ - foreach ($balances as $entry) { - $return[(int)$entry->transaction_currency_id] = $entry->sum_for_currency; + /** @var AccountRepositoryInterface $repository */ + $repository = app(AccountRepositoryInterface::class); + if (null === $currency) { + $currency = $repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUser($account->user); } - $cache->store($return); + // first part: get all balances in own currency: + $transactions = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.transaction_currency_id', $currency->id) + ->get(['transactions.amount'])->toArray(); + $nativeBalance = $this->sumTransactions($transactions, 'amount'); + // get all balances in foreign currency: + $transactions = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->where('transactions.foreign_currency_id', $currency->id) + ->where('transactions.transaction_currency_id', '!=', $currency->id) + ->get(['transactions.foreign_amount'])->toArray(); + $foreignBalance = $this->sumTransactions($transactions, 'foreign_amount'); + $balance = bcadd($nativeBalance, $foreignBalance); + $virtual = null === $account->virtual_balance ? '0' : (string)$account->virtual_balance; + $balance = bcadd($balance, $virtual); - return $return; + $cache->store($balance); + + return $balance; } /** @@ -294,7 +262,7 @@ class Steam $cache->addProperty('balances'); $cache->addProperty($date); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } // need to do this per account. @@ -327,7 +295,7 @@ class Steam $cache->addProperty('balances-per-currency'); $cache->addProperty($date); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } // need to do this per account. @@ -342,6 +310,38 @@ class Steam return $result; } + /** + * @param Account $account + * @param Carbon $date + * + * @return array + * @throws JsonException + */ + public function balancePerCurrency(Account $account, Carbon $date): array + { + // abuse chart properties: + $cache = new CacheProperties; + $cache->addProperty($account->id); + $cache->addProperty('balance-per-currency'); + $cache->addProperty($date); + if ($cache->has()) { + return $cache->get(); + } + $query = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59')) + ->groupBy('transactions.transaction_currency_id'); + $balances = $query->get(['transactions.transaction_currency_id', DB::raw('SUM(transactions.amount) as sum_for_currency')]); // @phpstan-ignore-line + $return = []; + /** @var stdClass $entry */ + foreach ($balances as $entry) { + $return[(int)$entry->transaction_currency_id] = $entry->sum_for_currency; + } + $cache->store($return); + + return $return; + } + /** * @param array $accounts * @@ -365,6 +365,51 @@ class Steam return $list; } + /** + * Get user's locale. + * + * @return string + * @throws FireflyException + */ + public function getLocale(): string // get preference + { + $locale = app('preferences')->get('locale', config('firefly.default_locale', 'equal'))->data; + if ('equal' === $locale) { + $locale = $this->getLanguage(); + } + + // Check for Windows to replace the locale correctly. + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $locale = str_replace('_', '-', $locale); + } + + return $locale; + } + + /** + * Get user's language. + * + * @return string + * @throws FireflyException + */ + public function getLanguage(): string // get preference + { + return app('preferences')->get('language', config('firefly.default_language', 'en_US'))->data; + } + + /** + * @param string $locale + * + * @return array + */ + public function getLocaleArray(string $locale): array + { + return [ + sprintf('%s.utf8', $locale), + sprintf('%s.UTF-8', $locale), + ]; + } + /** * @param string $amount * @@ -446,49 +491,4 @@ class Steam return $amount; } - /** - * Get user's language. - * - * @return string - * @throws FireflyException - */ - public function getLanguage(): string // get preference - { - return app('preferences')->get('language', config('firefly.default_language', 'en_US'))->data; - } - - /** - * Get user's locale. - * - * @return string - * @throws FireflyException - */ - public function getLocale(): string // get preference - { - $locale = app('preferences')->get('locale', config('firefly.default_locale', 'equal'))->data; - if ('equal' === $locale) { - $locale = $this->getLanguage(); - } - - // Check for Windows to replace the locale correctly. - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $locale = str_replace('_', '-', $locale); - } - - return $locale; - } - - /** - * @param string $locale - * - * @return array - */ - public function getLocaleArray(string $locale): array - { - return [ - sprintf('%s.utf8', $locale), - sprintf('%s.UTF-8', $locale), - ]; - } - } diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php index a0f3f3d4b1..b874ba32ac 100644 --- a/app/Support/Twig/AmountFormat.php +++ b/app/Support/Twig/AmountFormat.php @@ -93,7 +93,7 @@ class AmountFormat extends AbstractExtension * Will format the amount by the currency related to the given account. * * @return TwigFunction -* See reference nr. 42 + * See reference nr. 42 */ protected function formatAmountByAccount(): TwigFunction { diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index 5c3b7d8d72..df8e37cf58 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -212,7 +212,7 @@ class General extends AbstractExtension $converter = new CommonMarkConverter(['allow_unsafe_links' => false, 'max_nesting_level' => 3, 'html_input' => 'escape'], $environment); - return (string) $converter->convertToHtml($text); + return (string)$converter->convertToHtml($text); }, ['is_safe' => ['html']] ); } diff --git a/app/Support/Twig/Translation.php b/app/Support/Twig/Translation.php index dafafca369..96dcd50083 100644 --- a/app/Support/Twig/Translation.php +++ b/app/Support/Twig/Translation.php @@ -65,7 +65,7 @@ class Translation extends AbstractExtension return new TwigFunction( 'journalLinkTranslation', static function (string $direction, string $original) { - $key = sprintf('firefly.%s_%s', $original, $direction); + $key = sprintf('firefly.%s_%s', $original, $direction); $translation = trans($key); if ($key === $translation) { return $original; diff --git a/app/TransactionRules/Actions/ConvertToTransfer.php b/app/TransactionRules/Actions/ConvertToTransfer.php index d13e00a083..4d9f3063a4 100644 --- a/app/TransactionRules/Actions/ConvertToTransfer.php +++ b/app/TransactionRules/Actions/ConvertToTransfer.php @@ -91,7 +91,7 @@ class ConvertToTransfer implements ActionInterface return $this->convertDepositArray($journal, $asset); } - return false; + return false; } /** diff --git a/app/TransactionRules/Actions/ConvertToWithdrawal.php b/app/TransactionRules/Actions/ConvertToWithdrawal.php index fa028db3f9..ea9faf6ec4 100644 --- a/app/TransactionRules/Actions/ConvertToWithdrawal.php +++ b/app/TransactionRules/Actions/ConvertToWithdrawal.php @@ -73,7 +73,7 @@ class ConvertToWithdrawal implements ActionInterface return $this->convertTransferArray($journal); } - return false; + return false; } private function convertDepositArray(array $journal): bool diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php index 6a7bf3e232..42e6c83356 100644 --- a/app/TransactionRules/Actions/SetSourceAccount.php +++ b/app/TransactionRules/Actions/SetSourceAccount.php @@ -55,8 +55,8 @@ class SetSourceAccount implements ActionInterface */ public function actOnArray(array $journal): bool { - $user = User::find($journal['user_id']); - $type = $journal['transaction_type_type']; + $user = User::find($journal['user_id']); + $type = $journal['transaction_type_type']; /** @var TransactionJournal|null $object */ $object = $user->transactionJournals()->find((int)$journal['transaction_journal_id']); $this->repository = app(AccountRepositoryInterface::class); diff --git a/app/TransactionRules/Actions/UpdatePiggybank.php b/app/TransactionRules/Actions/UpdatePiggybank.php index 4a274e91ac..6e4dcc0392 100644 --- a/app/TransactionRules/Actions/UpdatePiggybank.php +++ b/app/TransactionRules/Actions/UpdatePiggybank.php @@ -98,7 +98,11 @@ class UpdatePiggybank implements ActionInterface return true; } - Log::info(sprintf('Piggy bank is not linked to source ("#%d") or destination ("#%d"), so no action will be taken.', $source->account_id, $destination->account_id)); + Log::info( + sprintf( + 'Piggy bank is not linked to source ("#%d") or destination ("#%d"), so no action will be taken.', $source->account_id, $destination->account_id + ) + ); return true; } diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.php index 0604f46076..51bee50b61 100644 --- a/app/TransactionRules/Engine/SearchRuleEngine.php +++ b/app/TransactionRules/Engine/SearchRuleEngine.php @@ -164,59 +164,6 @@ class SearchRuleEngine implements RuleEngineInterface $this->operators = []; } - /** - * Returns true if the rule has been triggered. - * - * @param Rule $rule - * - * @return bool - * @throws FireflyException - */ - private function fireRule(Rule $rule): bool - { - Log::debug(sprintf('Now going to fire rule #%d', $rule->id)); - if (false === $rule->active) { - Log::debug(sprintf('Rule #%d is not active!', $rule->id)); - - return false; - } - if (true === $rule->strict) { - Log::debug(sprintf('Rule #%d is a strict rule.', $rule->id)); - - return $this->fireStrictRule($rule); - } - Log::debug(sprintf('Rule #%d is not strict rule.', $rule->id)); - - return $this->fireNonStrictRule($rule); - } - - /** - * Return true if the rule is fired (the collection is larger than zero). - * - * @param Rule $rule - * - * @return bool - * @throws FireflyException - */ - private function fireStrictRule(Rule $rule): bool - { - Log::debug(sprintf('SearchRuleEngine::fireStrictRule(%d)!', $rule->id)); - $collection = $this->findStrictRule($rule); - - $this->processResults($rule, $collection); - Log::debug(sprintf('SearchRuleEngine:: done processing strict rule #%d', $rule->id)); - - $result = $collection->count() > 0; - if (true === $result) { - Log::debug(sprintf('SearchRuleEngine:: rule #%d was triggered (on %d transaction(s)).', $rule->id, $collection->count())); - - return true; - } - Log::debug(sprintf('SearchRuleEngine:: rule #%d was not triggered (on %d transaction(s)).', $rule->id, $collection->count())); - - return false; - } - /** * Finds the transactions a strict rule will execute on. * @@ -339,6 +286,138 @@ class SearchRuleEngine implements RuleEngineInterface return today(config('app.timezone')); } + /** + * @param Rule $rule + * + * @return Collection + */ + private function findNonStrictRule(Rule $rule): Collection + { + // start a search query for individual each trigger: + $total = new Collection; + $count = 0; + + /** @var Collection $triggers */ + $triggers = $rule->ruleTriggers; + + /** @var RuleTrigger $ruleTrigger */ + foreach ($triggers as $ruleTrigger) { + if (false === $ruleTrigger->active) { + continue; + } + if ('user_action' === $ruleTrigger->trigger_type) { + Log::debug('Skip trigger type.'); + continue; + } + $searchArray = []; + $needsContext = config(sprintf('firefly.search.operators.%s.needs_context', $ruleTrigger->trigger_type)) ?? true; + if (false === $needsContext) { + Log::debug(sprintf('SearchRuleEngine:: non strict, will search for: %s:true', $ruleTrigger->trigger_type)); + $searchArray[$ruleTrigger->trigger_type] = 'true'; + } + if (true === $needsContext) { + Log::debug(sprintf('SearchRuleEngine:: non strict, will search for: %s:"%s"', $ruleTrigger->trigger_type, $ruleTrigger->trigger_value)); + $searchArray[$ruleTrigger->trigger_type] = sprintf('"%s"', $ruleTrigger->trigger_value); + } + + // then, add local operators as well: + foreach ($this->operators as $operator) { + Log::debug(sprintf('SearchRuleEngine:: add local added operator: %s:"%s"', $operator['type'], $operator['value'])); + $searchArray[$operator['type']] = sprintf('"%s"', $operator['value']); + } + + // build and run the search engine. + $searchEngine = app(SearchInterface::class); + $searchEngine->setUser($this->user); + $searchEngine->setPage(1); + $searchEngine->setLimit(31337); + + foreach ($searchArray as $type => $value) { + $searchEngine->parseQuery(sprintf('%s:%s', $type, $value)); + } + + $result = $searchEngine->searchTransactions(); + $collection = $result->getCollection(); + Log::debug(sprintf('Found in this run, %d transactions', $collection->count())); + $total = $total->merge($collection); + Log::debug(sprintf('Total collection is now %d transactions', $total->count())); + $count++; + } + Log::debug(sprintf('Total collection is now %d transactions', $total->count())); + Log::debug(sprintf('Done running %d trigger(s)', $count)); + + // make collection unique + $unique = $total->unique( + function (array $group) { + $str = ''; + foreach ($group['transactions'] as $transaction) { + $str = sprintf('%s%d', $str, $transaction['transaction_journal_id']); + } + $key = sprintf('%d%s', $group['id'], $str); + Log::debug(sprintf('Return key: %s ', $key)); + + return $key; + } + ); + + Log::debug(sprintf('SearchRuleEngine:: Found %d transactions using search engine.', $unique->count())); + + return $unique; + } + + /** + * Returns true if the rule has been triggered. + * + * @param Rule $rule + * + * @return bool + * @throws FireflyException + */ + private function fireRule(Rule $rule): bool + { + Log::debug(sprintf('Now going to fire rule #%d', $rule->id)); + if (false === $rule->active) { + Log::debug(sprintf('Rule #%d is not active!', $rule->id)); + + return false; + } + if (true === $rule->strict) { + Log::debug(sprintf('Rule #%d is a strict rule.', $rule->id)); + + return $this->fireStrictRule($rule); + } + Log::debug(sprintf('Rule #%d is not strict rule.', $rule->id)); + + return $this->fireNonStrictRule($rule); + } + + /** + * Return true if the rule is fired (the collection is larger than zero). + * + * @param Rule $rule + * + * @return bool + * @throws FireflyException + */ + private function fireStrictRule(Rule $rule): bool + { + Log::debug(sprintf('SearchRuleEngine::fireStrictRule(%d)!', $rule->id)); + $collection = $this->findStrictRule($rule); + + $this->processResults($rule, $collection); + Log::debug(sprintf('SearchRuleEngine:: done processing strict rule #%d', $rule->id)); + + $result = $collection->count() > 0; + if (true === $result) { + Log::debug(sprintf('SearchRuleEngine:: rule #%d was triggered (on %d transaction(s)).', $rule->id, $collection->count())); + + return true; + } + Log::debug(sprintf('SearchRuleEngine:: rule #%d was not triggered (on %d transaction(s)).', $rule->id, $collection->count())); + + return false; + } + /** * @param Rule $rule * @param Collection $collection @@ -444,85 +523,6 @@ class SearchRuleEngine implements RuleEngineInterface return $collection->count() > 0; } - /** - * @param Rule $rule - * - * @return Collection - */ - private function findNonStrictRule(Rule $rule): Collection - { - // start a search query for individual each trigger: - $total = new Collection; - $count = 0; - - /** @var Collection $triggers */ - $triggers = $rule->ruleTriggers; - - /** @var RuleTrigger $ruleTrigger */ - foreach ($triggers as $ruleTrigger) { - if (false === $ruleTrigger->active) { - continue; - } - if ('user_action' === $ruleTrigger->trigger_type) { - Log::debug('Skip trigger type.'); - continue; - } - $searchArray = []; - $needsContext = config(sprintf('firefly.search.operators.%s.needs_context', $ruleTrigger->trigger_type)) ?? true; - if (false === $needsContext) { - Log::debug(sprintf('SearchRuleEngine:: non strict, will search for: %s:true', $ruleTrigger->trigger_type)); - $searchArray[$ruleTrigger->trigger_type] = 'true'; - } - if (true === $needsContext) { - Log::debug(sprintf('SearchRuleEngine:: non strict, will search for: %s:"%s"', $ruleTrigger->trigger_type, $ruleTrigger->trigger_value)); - $searchArray[$ruleTrigger->trigger_type] = sprintf('"%s"', $ruleTrigger->trigger_value); - } - - // then, add local operators as well: - foreach ($this->operators as $operator) { - Log::debug(sprintf('SearchRuleEngine:: add local added operator: %s:"%s"', $operator['type'], $operator['value'])); - $searchArray[$operator['type']] = sprintf('"%s"', $operator['value']); - } - - // build and run the search engine. - $searchEngine = app(SearchInterface::class); - $searchEngine->setUser($this->user); - $searchEngine->setPage(1); - $searchEngine->setLimit(31337); - - foreach ($searchArray as $type => $value) { - $searchEngine->parseQuery(sprintf('%s:%s', $type, $value)); - } - - $result = $searchEngine->searchTransactions(); - $collection = $result->getCollection(); - Log::debug(sprintf('Found in this run, %d transactions', $collection->count())); - $total = $total->merge($collection); - Log::debug(sprintf('Total collection is now %d transactions', $total->count())); - $count++; - } - Log::debug(sprintf('Total collection is now %d transactions', $total->count())); - Log::debug(sprintf('Done running %d trigger(s)', $count)); - - // make collection unique - $unique = $total->unique( - function (array $group) { - $str = ''; - foreach ($group['transactions'] as $transaction) { - $str = sprintf('%s%d', $str, $transaction['transaction_journal_id']); - } - $key = sprintf('%d%s', $group['id'], $str); - Log::debug(sprintf('Return key: %s ', $key)); - - return $key; - } - ); - - Log::debug(sprintf('SearchRuleEngine:: Found %d transactions using search engine.', $unique->count())); - - return $unique; - } - /** * @param RuleGroup $group * diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php index 438f066229..2d99589767 100644 --- a/app/Transformers/AccountTransformer.php +++ b/app/Transformers/AccountTransformer.php @@ -24,8 +24,10 @@ declare(strict_types=1); namespace FireflyIII\Transformers; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use JsonException; /** * Class AccountTransformer @@ -51,8 +53,8 @@ class AccountTransformer extends AbstractTransformer * @param Account $account * * @return array - * @throws \FireflyIII\Exceptions\FireflyException - * @throws \JsonException + * @throws FireflyException + * @throws JsonException */ public function transform(Account $account): array { @@ -121,7 +123,7 @@ class AccountTransformer extends AbstractTransformer 'liability_direction' => $liabilityDirection, 'interest' => $interest, 'interest_period' => $interestPeriod, - 'current_debt' => $this->repository->getMetaValue($account,'current_debt'), + 'current_debt' => $this->repository->getMetaValue($account, 'current_debt'), 'include_net_worth' => $includeNetWorth, 'longitude' => $longitude, 'latitude' => $latitude, @@ -214,7 +216,7 @@ class AccountTransformer extends AbstractTransformer * * @return array * -* See reference nr. 20 + * See reference nr. 20 */ private function getOpeningBalance(Account $account, string $accountType): array { diff --git a/app/Transformers/AttachmentTransformer.php b/app/Transformers/AttachmentTransformer.php index 2d579f01cb..5d858ddd25 100644 --- a/app/Transformers/AttachmentTransformer.php +++ b/app/Transformers/AttachmentTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\Attachment; use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface; diff --git a/app/Transformers/AvailableBudgetTransformer.php b/app/Transformers/AvailableBudgetTransformer.php index 9ed54128b1..69ed09f4fa 100644 --- a/app/Transformers/AvailableBudgetTransformer.php +++ b/app/Transformers/AvailableBudgetTransformer.php @@ -97,7 +97,7 @@ class AvailableBudgetTransformer extends AbstractTransformer private function getSpentInBudgets(): array { $allActive = $this->repository->getActiveBudgets(); - $sums = $this->opsRepository->sumExpenses($this->parameters->get('start'), $this->parameters->get('end'), null, $allActive); + $sums = $this->opsRepository->sumExpenses($this->parameters->get('start'), $this->parameters->get('end'), null, $allActive); return array_values($sums); } diff --git a/app/Transformers/BudgetLimitTransformer.php b/app/Transformers/BudgetLimitTransformer.php index 264a53433e..dfcc2e43ba 100644 --- a/app/Transformers/BudgetLimitTransformer.php +++ b/app/Transformers/BudgetLimitTransformer.php @@ -62,7 +62,7 @@ class BudgetLimitTransformer extends AbstractTransformer { $repository = app(OperationsRepository::class); $repository->setUser($budgetLimit->budget->user); - $expenses = $repository->sumExpenses( + $expenses = $repository->sumExpenses( $budgetLimit->start_date, $budgetLimit->end_date, null, new Collection([$budgetLimit->budget]), $budgetLimit->transactionCurrency ); $currency = $budgetLimit->transactionCurrency; diff --git a/app/Transformers/BudgetTransformer.php b/app/Transformers/BudgetTransformer.php index c6f08544aa..4fcc75d2db 100644 --- a/app/Transformers/BudgetTransformer.php +++ b/app/Transformers/BudgetTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\AutoBudget; use FireflyIII\Models\Budget; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; diff --git a/app/Transformers/CategoryTransformer.php b/app/Transformers/CategoryTransformer.php index 4ece2543ca..129e95d357 100644 --- a/app/Transformers/CategoryTransformer.php +++ b/app/Transformers/CategoryTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\Category; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Category\OperationsRepositoryInterface; diff --git a/app/Transformers/LinkTypeTransformer.php b/app/Transformers/LinkTypeTransformer.php index 9bdf19cb2f..13f3b36eb5 100644 --- a/app/Transformers/LinkTypeTransformer.php +++ b/app/Transformers/LinkTypeTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\LinkType; /** diff --git a/app/Transformers/ObjectGroupTransformer.php b/app/Transformers/ObjectGroupTransformer.php index e6509fcc30..d8c19bc2bd 100644 --- a/app/Transformers/ObjectGroupTransformer.php +++ b/app/Transformers/ObjectGroupTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\ObjectGroup; use FireflyIII\Repositories\ObjectGroup\ObjectGroupRepositoryInterface; diff --git a/app/Transformers/PiggyBankEventTransformer.php b/app/Transformers/PiggyBankEventTransformer.php index ef4e34ed2b..7f5af318fe 100644 --- a/app/Transformers/PiggyBankEventTransformer.php +++ b/app/Transformers/PiggyBankEventTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\PiggyBankEvent; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; diff --git a/app/Transformers/PiggyBankTransformer.php b/app/Transformers/PiggyBankTransformer.php index 1116f3b63c..43abb9da39 100644 --- a/app/Transformers/PiggyBankTransformer.php +++ b/app/Transformers/PiggyBankTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\ObjectGroup; use FireflyIII\Models\PiggyBank; use FireflyIII\Repositories\Account\AccountRepositoryInterface; @@ -48,6 +49,7 @@ class PiggyBankTransformer extends AbstractTransformer $this->currencyRepos = app(CurrencyRepositoryInterface::class); $this->piggyRepos = app(PiggyBankRepositoryInterface::class); } + /** * Transform the piggy bank. * diff --git a/app/Transformers/PreferenceTransformer.php b/app/Transformers/PreferenceTransformer.php index f48b92f3e8..c085fbffd7 100644 --- a/app/Transformers/PreferenceTransformer.php +++ b/app/Transformers/PreferenceTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\Preference; /** diff --git a/app/Transformers/RecurrenceTransformer.php b/app/Transformers/RecurrenceTransformer.php index 77c4394dc3..0bbbb4d37b 100644 --- a/app/Transformers/RecurrenceTransformer.php +++ b/app/Transformers/RecurrenceTransformer.php @@ -42,11 +42,11 @@ use Log; */ class RecurrenceTransformer extends AbstractTransformer { + private BillRepositoryInterface $billRepos; private BudgetRepositoryInterface $budgetRepos; private CategoryFactory $factory; private PiggyBankRepositoryInterface $piggyRepos; private RecurringRepositoryInterface $repository; - private BillRepositoryInterface $billRepos; /** * RecurrenceTransformer constructor. diff --git a/app/Transformers/RuleTransformer.php b/app/Transformers/RuleTransformer.php index af403daaae..c21599ed35 100644 --- a/app/Transformers/RuleTransformer.php +++ b/app/Transformers/RuleTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Rule; use FireflyIII\Models\RuleAction; diff --git a/app/Transformers/TagTransformer.php b/app/Transformers/TagTransformer.php index 0f3e00d862..56978c9793 100644 --- a/app/Transformers/TagTransformer.php +++ b/app/Transformers/TagTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\Location; use FireflyIII\Models\Tag; @@ -34,7 +35,7 @@ class TagTransformer extends AbstractTransformer /** * Transform a tag. * -* See reference nr. 21 + * See reference nr. 21 * * @param Tag $tag * diff --git a/app/Transformers/TransactionLinkTransformer.php b/app/Transformers/TransactionLinkTransformer.php index e53bf42c72..b9f3ede0bf 100644 --- a/app/Transformers/TransactionLinkTransformer.php +++ b/app/Transformers/TransactionLinkTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; diff --git a/app/Transformers/UserTransformer.php b/app/Transformers/UserTransformer.php index 83aee3177a..39277ad186 100644 --- a/app/Transformers/UserTransformer.php +++ b/app/Transformers/UserTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; diff --git a/app/Transformers/WebhookAttemptTransformer.php b/app/Transformers/WebhookAttemptTransformer.php index 4e8c8a3990..082828e8ce 100644 --- a/app/Transformers/WebhookAttemptTransformer.php +++ b/app/Transformers/WebhookAttemptTransformer.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Transformers; + use FireflyIII\Models\WebhookAttempt; /** diff --git a/app/User.php b/app/User.php index 875f950a6b..ac707d8d60 100644 --- a/app/User.php +++ b/app/User.php @@ -151,10 +151,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; * @method static Builder|User whereGuid($value) * @method static Builder|User whereTwoFactorRecoveryCodes($value) * @method static Builder|User whereTwoFactorSecret($value) - * @property int|null $user_group_id - * @property-read \Illuminate\Database\Eloquent\Collection|GroupMembership[] $groupMemberships - * @property-read int|null $group_memberships_count - * @property-read UserGroup|null $userGroup + * @property int|null $user_group_id + * @property-read \Illuminate\Database\Eloquent\Collection|GroupMembership[] $groupMemberships + * @property-read int|null $group_memberships_count + * @property-read UserGroup|null $userGroup * @method static Builder|User whereUserGroupId($value) */ class User extends Authenticatable @@ -220,16 +220,6 @@ class User extends Authenticatable return $this->hasMany(Account::class); } - /** - * @codeCoverageIgnore - * - * @return HasMany - */ - public function groupMemberships(): HasMany - { - return $this->hasMany(GroupMembership::class)->with(['userGroup','userRole']); - } - /** * @codeCoverageIgnore * Link to attachments @@ -241,28 +231,6 @@ class User extends Authenticatable return $this->hasMany(Attachment::class); } - /** - * @codeCoverageIgnore - * - * Link to webhooks - * - * @return HasMany - */ - public function webhooks(): HasMany - { - return $this->hasMany(Webhook::class); - } - - /** - * @param string $role - * - * @return bool - */ - public function hasRole(string $role): bool - { - return $this->roles()->where('name', $role)->count() === 1; - } - /** * @codeCoverageIgnore * Link to available budgets @@ -296,17 +264,6 @@ class User extends Authenticatable return $this->hasMany(Budget::class); } - /** - * @codeCoverageIgnore - * Link to object groups. - * - * @return HasMany - */ - public function objectGroups(): HasMany - { - return $this->hasMany(ObjectGroup::class); - } - /** * @codeCoverageIgnore * Link to categories @@ -318,14 +275,6 @@ class User extends Authenticatable return $this->hasMany(Category::class); } - /** - * @codeCoverageIgnore - * @return BelongsTo - */ - public function userGroup(): BelongsTo - { - return $this->belongsTo(UserGroup::class,); - } /** * @codeCoverageIgnore * Link to currency exchange rates @@ -351,6 +300,88 @@ class User extends Authenticatable return bin2hex($bytes); } + /** + * Get the models LDAP domain. + * + * @return string + */ + public function getLdapDomain() + { + return $this->{$this->getLdapDomainColumn()}; + } + + /** + * Get the database column name of the domain. + * + * @return string + */ + public function getLdapDomainColumn() + { + return 'domain'; + } + + /** + * Get the models LDAP GUID. + * + * @return string + */ + public function getLdapGuid() + { + return $this->{$this->getLdapGuidColumn()}; + } + + /** + * Get the models LDAP GUID database column name. + * + * @return string + */ + public function getLdapGuidColumn() + { + return 'objectguid'; + } + + /** + * @codeCoverageIgnore + * + * @return HasMany + */ + public function groupMemberships(): HasMany + { + return $this->hasMany(GroupMembership::class)->with(['userGroup', 'userRole']); + } + + /** + * @param string $role + * + * @return bool + */ + public function hasRole(string $role): bool + { + return $this->roles()->where('name', $role)->count() === 1; + } + + /** + * @codeCoverageIgnore + * Link to roles. + * + * @return BelongsToMany + */ + public function roles(): BelongsToMany + { + return $this->belongsToMany(Role::class); + } + + /** + * @codeCoverageIgnore + * Link to object groups. + * + * @return HasMany + */ + public function objectGroups(): HasMany + { + return $this->hasMany(ObjectGroup::class); + } + /** * @codeCoverageIgnore * Link to piggy banks. @@ -384,17 +415,6 @@ class User extends Authenticatable return $this->hasMany(Recurrence::class); } - /** - * @codeCoverageIgnore - * Link to roles. - * - * @return BelongsToMany - */ - public function roles(): BelongsToMany - { - return $this->belongsToMany(Role::class); - } - /** * @codeCoverageIgnore * Link to rule groups. @@ -430,6 +450,32 @@ class User extends Authenticatable event(new RequestedNewPassword($this, $token, $ipAddress)); } + /** + * Set the models LDAP domain. + * + * @param string $domain + * + * @return void + */ + public function setLdapDomain($domain) + { + $this->{$this->getLdapDomainColumn()} = $domain; + } + + /** + * Set the models LDAP GUID. + * + * @param string $guid + * + * @return void + */ + public function setLdapGuid($guid) + { + $this->{$this->getLdapGuidColumn()} = $guid; + } + + // start LDAP related code + /** * @codeCoverageIgnore * Link to tags. @@ -474,70 +520,25 @@ class User extends Authenticatable return $this->hasManyThrough(Transaction::class, TransactionJournal::class); } - // start LDAP related code - /** - * Get the database column name of the domain. - * - * @return string + * @codeCoverageIgnore + * @return BelongsTo */ - public function getLdapDomainColumn() + public function userGroup(): BelongsTo { - return 'domain'; + return $this->belongsTo(UserGroup::class,); } /** - * Get the models LDAP domain. + * @codeCoverageIgnore * - * @return string + * Link to webhooks + * + * @return HasMany */ - public function getLdapDomain() + public function webhooks(): HasMany { - return $this->{$this->getLdapDomainColumn()}; - } - - /** - * Set the models LDAP domain. - * - * @param string $domain - * - * @return void - */ - public function setLdapDomain($domain) - { - $this->{$this->getLdapDomainColumn()} = $domain; - } - - /** - * Get the models LDAP GUID database column name. - * - * @return string - */ - public function getLdapGuidColumn() - { - return 'objectguid'; - } - - /** - * Get the models LDAP GUID. - * - * @return string - */ - public function getLdapGuid() - { - return $this->{$this->getLdapGuidColumn()}; - } - - /** - * Set the models LDAP GUID. - * - * @param string $guid - * - * @return void - */ - public function setLdapGuid($guid) - { - $this->{$this->getLdapGuidColumn()} = $guid; + return $this->hasMany(Webhook::class); } // end LDAP related code } diff --git a/app/Validation/Account/DepositValidation.php b/app/Validation/Account/DepositValidation.php index ecc3d6156e..d168e3add6 100644 --- a/app/Validation/Account/DepositValidation.php +++ b/app/Validation/Account/DepositValidation.php @@ -32,6 +32,22 @@ use Log; */ trait DepositValidation { + /** + * @param array $accountTypes + * + * @return bool + */ + abstract protected function canCreateTypes(array $accountTypes): bool; + + /** + * @param array $validTypes + * @param int $accountId + * @param string $accountName + * + * @return Account|null + */ + abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; + /** * @param int|null $accountId * @param mixed $accountName @@ -78,22 +94,6 @@ trait DepositValidation return $result; } - /** - * @param array $accountTypes - * - * @return bool - */ - abstract protected function canCreateTypes(array $accountTypes): bool; - - /** - * @param array $validTypes - * @param int $accountId - * @param string $accountName - * - * @return Account|null - */ - abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; - /** * @param int|null $accountId * @param string|null $accountName diff --git a/app/Validation/Account/LiabilityValidation.php b/app/Validation/Account/LiabilityValidation.php index f8990f4190..2c19b5e0a1 100644 --- a/app/Validation/Account/LiabilityValidation.php +++ b/app/Validation/Account/LiabilityValidation.php @@ -35,31 +35,6 @@ use Log; trait LiabilityValidation { - /** - * Source of an liability credit must be a liability. - * - * @param string|null $accountName - * - * @return bool - */ - protected function validateLCSource(?string $accountName): bool - { - $result = true; - Log::debug(sprintf('Now in validateLCDestination("%s")', $accountName)); - if ('' === $accountName || null === $accountName) { - $result = false; - } - if (true === $result) { - // set the source to be a (dummy) revenue account. - $account = new Account; - $accountType = AccountType::whereType(AccountType::LIABILITY_CREDIT)->first(); - $account->accountType = $accountType; - $this->source = $account; - } - - return $result; - } - /** * @param int|null $accountId * @@ -96,4 +71,29 @@ trait LiabilityValidation return $result ?? false; } + /** + * Source of an liability credit must be a liability. + * + * @param string|null $accountName + * + * @return bool + */ + protected function validateLCSource(?string $accountName): bool + { + $result = true; + Log::debug(sprintf('Now in validateLCDestination("%s")', $accountName)); + if ('' === $accountName || null === $accountName) { + $result = false; + } + if (true === $result) { + // set the source to be a (dummy) revenue account. + $account = new Account; + $accountType = AccountType::whereType(AccountType::LIABILITY_CREDIT)->first(); + $account->accountType = $accountType; + $this->source = $account; + } + + return $result; + } + } diff --git a/app/Validation/Account/OBValidation.php b/app/Validation/Account/OBValidation.php index 3f61b4d5a4..8b934cda2f 100644 --- a/app/Validation/Account/OBValidation.php +++ b/app/Validation/Account/OBValidation.php @@ -33,6 +33,13 @@ use Log; */ trait OBValidation { + /** + * @param array $accountTypes + * + * @return bool + */ + abstract protected function canCreateTypes(array $accountTypes): bool; + /** * @param int|null $accountId * @param mixed $accountName @@ -79,13 +86,6 @@ trait OBValidation return $result; } - /** - * @param array $accountTypes - * - * @return bool - */ - abstract protected function canCreateTypes(array $accountTypes): bool; - /** * Source of an opening balance can either be an asset account * or an "initial balance account". The latter can be created. diff --git a/app/Validation/Account/TransferValidation.php b/app/Validation/Account/TransferValidation.php index 70554a6f1c..e656883645 100644 --- a/app/Validation/Account/TransferValidation.php +++ b/app/Validation/Account/TransferValidation.php @@ -31,6 +31,22 @@ use Log; */ trait TransferValidation { + /** + * @param array $accountTypes + * + * @return bool + */ + abstract protected function canCreateTypes(array $accountTypes): bool; + + /** + * @param array $validTypes + * @param int $accountId + * @param string $accountName + * + * @return Account|null + */ + abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; + /** * @param int|null $accountId * @param mixed $accountName @@ -71,22 +87,6 @@ trait TransferValidation return true; } - /** - * @param array $accountTypes - * - * @return bool - */ - abstract protected function canCreateTypes(array $accountTypes): bool; - - /** - * @param array $validTypes - * @param int $accountId - * @param string $accountName - * - * @return Account|null - */ - abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; - /** * @param int|null $accountId * @param string|null $accountName diff --git a/app/Validation/Account/WithdrawalValidation.php b/app/Validation/Account/WithdrawalValidation.php index f3b5efa66f..49878cb253 100644 --- a/app/Validation/Account/WithdrawalValidation.php +++ b/app/Validation/Account/WithdrawalValidation.php @@ -32,6 +32,22 @@ use Log; */ trait WithdrawalValidation { + /** + * @param array $accountTypes + * + * @return bool + */ + abstract protected function canCreateTypes(array $accountTypes): bool; + + /** + * @param array $validTypes + * @param int $accountId + * @param string $accountName + * + * @return Account|null + */ + abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; + /** * @param int|null $accountId * @param string|null $accountName @@ -103,13 +119,6 @@ trait WithdrawalValidation return true === $this->canCreateTypes($validTypes); } - /** - * @param array $accountTypes - * - * @return bool - */ - abstract protected function canCreateTypes(array $accountTypes): bool; - /** * @param int|null $accountId * @param string|null $accountName @@ -143,13 +152,4 @@ trait WithdrawalValidation return true; } - - /** - * @param array $validTypes - * @param int $accountId - * @param string $accountName - * - * @return Account|null - */ - abstract protected function findExistingAccount(array $validTypes, int $accountId, string $accountName): ?Account; } diff --git a/app/Validation/AccountValidator.php b/app/Validation/AccountValidator.php index 7856a3e512..d440cfd786 100644 --- a/app/Validation/AccountValidator.php +++ b/app/Validation/AccountValidator.php @@ -30,11 +30,11 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use FireflyIII\Validation\Account\AccountValidatorProperties; use FireflyIII\Validation\Account\DepositValidation; +use FireflyIII\Validation\Account\LiabilityValidation; use FireflyIII\Validation\Account\OBValidation; use FireflyIII\Validation\Account\ReconciliationValidation; use FireflyIII\Validation\Account\TransferValidation; use FireflyIII\Validation\Account\WithdrawalValidation; -use FireflyIII\Validation\Account\LiabilityValidation; use Log; /** @@ -202,21 +202,6 @@ class AccountValidator return false; } - /** - * @param string $accountType - * - * @return bool - */ - protected function canCreateType(string $accountType): bool - { - $canCreate = [AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::LIABILITY_CREDIT]; - if (in_array($accountType, $canCreate, true)) { - return true; - } - - return false; - } - /** * @param array $validTypes * @param int $accountId @@ -242,4 +227,19 @@ class AccountValidator return null; } + /** + * @param string $accountType + * + * @return bool + */ + protected function canCreateType(string $accountType): bool + { + $canCreate = [AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::LIABILITY_CREDIT]; + if (in_array($accountType, $canCreate, true)) { + return true; + } + + return false; + } + } diff --git a/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php b/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php index 71c88d91d9..66175ddb8f 100644 --- a/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php +++ b/app/Validation/Api/Data/Bulk/ValidatesBulkTransactionQuery.php @@ -66,10 +66,11 @@ trait ValidatesBulkTransactionQuery } if ($source->accountType->type !== $dest->accountType->type) { $validator->errors()->add('query', (string)trans('validation.invalid_query_account_type')); + return; } // must have same currency: - if($repository->getAccountCurrency($source)->id !== $repository->getAccountCurrency($dest)->id) { + if ($repository->getAccountCurrency($source)->id !== $repository->getAccountCurrency($dest)->id) { $validator->errors()->add('query', (string)trans('validation.invalid_query_currency')); } } diff --git a/app/Validation/AutoBudget/ValidatesAutoBudgetRequest.php b/app/Validation/AutoBudget/ValidatesAutoBudgetRequest.php index 8ad87b7e61..b449eaf527 100644 --- a/app/Validation/AutoBudget/ValidatesAutoBudgetRequest.php +++ b/app/Validation/AutoBudget/ValidatesAutoBudgetRequest.php @@ -50,6 +50,7 @@ trait ValidatesAutoBudgetRequest // basic float check: if (!is_numeric($amount)) { $validator->errors()->add('auto_budget_amount', (string)trans('validation.amount_required_for_auto_budget')); + return; } diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index a8febacce8..69f6b11762 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -172,7 +172,7 @@ class FireflyValidator extends Validator "\u{3000}", // ideographic space "\u{FEFF}", // zero width no -break space '-', - '?' + '?', ]; $replace = ''; $value = str_replace($search, $replace, $value); @@ -198,6 +198,7 @@ class FireflyValidator extends Validator $message = sprintf('Could not validate IBAN check value "%s" (IBAN "%s")', $iban, $value); Log::error($message); Log::error($e->getTraceAsString()); + return false; } diff --git a/app/Validation/GroupValidation.php b/app/Validation/GroupValidation.php index a8dac63d20..78fc3760eb 100644 --- a/app/Validation/GroupValidation.php +++ b/app/Validation/GroupValidation.php @@ -36,6 +36,13 @@ use Log; trait GroupValidation { + /** + * @param Validator $validator + * + * @return array + */ + abstract protected function getTransactionsArray(Validator $validator): array; + /** * Adds an error to the "description" field when the user has submitted no descriptions and no * journal description. @@ -104,13 +111,6 @@ trait GroupValidation } } - /** - * @param Validator $validator - * - * @return array - */ - abstract protected function getTransactionsArray(Validator $validator): array; - /** * Do the validation required by validateJournalIds. * diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.php index 14f7ce6912..fe26e44eca 100644 --- a/app/Validation/TransactionValidation.php +++ b/app/Validation/TransactionValidation.php @@ -330,7 +330,7 @@ trait TransactionValidation /** * All types of splits must be equal. * - * @param Validator $validator + * @param Validator $validator */ public function validateTransactionTypesForUpdate(Validator $validator): void { From a2dedde094ec478dfa531252c563eb3b7875d670 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 08:27:52 +0200 Subject: [PATCH 10/30] Add links to endpoints. --- .../Models/AvailableBudget/ShowController.php | 3 +++ .../Models/AvailableBudget/StoreController.php | 7 +++++++ .../Models/AvailableBudget/UpdateController.php | 3 +++ .../Controllers/Models/Bill/DestroyController.php | 3 +++ .../V1/Controllers/Models/Bill/ListController.php | 9 +++++++++ .../V1/Controllers/Models/Bill/ShowController.php | 6 ++++++ .../V1/Controllers/Models/Bill/StoreController.php | 3 +++ .../V1/Controllers/Models/Bill/UpdateController.php | 3 +++ .../Controllers/Models/Budget/DestroyController.php | 3 +++ .../V1/Controllers/Models/Budget/ListController.php | 9 +++++++++ .../V1/Controllers/Models/Budget/ShowController.php | 3 +++ .../Controllers/Models/Budget/StoreController.php | 3 +++ .../Controllers/Models/Budget/UpdateController.php | 3 +++ .../Models/BudgetLimit/DestroyController.php | 3 +++ .../Models/BudgetLimit/ListController.php | 2 ++ .../Models/BudgetLimit/ShowController.php | 13 +++++++++++-- .../Models/BudgetLimit/StoreController.php | 3 +++ .../Models/BudgetLimit/UpdateController.php | 3 +++ 18 files changed, 80 insertions(+), 2 deletions(-) diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php b/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php index 212178597d..24d7a1608b 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/ShowController.php @@ -102,6 +102,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/available_budgets/getAvailableBudget + * * Display the specified resource. * * @param AvailableBudget $availableBudget diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/StoreController.php b/app/Api/V1/Controllers/Models/AvailableBudget/StoreController.php index 860688e55a..38deff3b1f 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/StoreController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/StoreController.php @@ -25,11 +25,13 @@ namespace FireflyIII\Api\V1\Controllers\Models\AvailableBudget; use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\Models\AvailableBudget\Request; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Factory\TransactionCurrencyFactory; use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface; use FireflyIII\Transformers\AvailableBudgetTransformer; use FireflyIII\User; use Illuminate\Http\JsonResponse; +use JsonException; use League\Fractal\Resource\Item; /** @@ -60,11 +62,16 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/available_budgets/storeAvailableBudget + * * Store a newly created resource in storage. * * @param Request $request * * @return JsonResponse + * @throws FireflyException + * @throws JsonException */ public function store(Request $request): JsonResponse { diff --git a/app/Api/V1/Controllers/Models/AvailableBudget/UpdateController.php b/app/Api/V1/Controllers/Models/AvailableBudget/UpdateController.php index 864c8d7840..bb0969260c 100644 --- a/app/Api/V1/Controllers/Models/AvailableBudget/UpdateController.php +++ b/app/Api/V1/Controllers/Models/AvailableBudget/UpdateController.php @@ -61,6 +61,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/available_budgets/updateAvailableBudget + * * Update the specified resource in storage. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Bill/DestroyController.php b/app/Api/V1/Controllers/Models/Bill/DestroyController.php index 271c593d1f..b9ca5e2531 100644 --- a/app/Api/V1/Controllers/Models/Bill/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Bill/DestroyController.php @@ -54,6 +54,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/deleteBill + * * Remove the specified resource from storage. * * @param Bill $bill diff --git a/app/Api/V1/Controllers/Models/Bill/ListController.php b/app/Api/V1/Controllers/Models/Bill/ListController.php index e9f5996fae..b73e94942b 100644 --- a/app/Api/V1/Controllers/Models/Bill/ListController.php +++ b/app/Api/V1/Controllers/Models/Bill/ListController.php @@ -67,6 +67,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/listAttachmentByBill + * * Display a listing of the resource. * * @param Bill $bill @@ -99,6 +102,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/listRuleByBill + * * List all of them. * * @param Bill $bill @@ -134,6 +140,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/listTransactionByBill + * * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Bill/ShowController.php b/app/Api/V1/Controllers/Models/Bill/ShowController.php index 58b0de32b4..5246af526a 100644 --- a/app/Api/V1/Controllers/Models/Bill/ShowController.php +++ b/app/Api/V1/Controllers/Models/Bill/ShowController.php @@ -60,6 +60,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/listBill + * * Display a listing of the resource. * * @return JsonResponse @@ -87,6 +90,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/getBill + * * Show the specified bill. * * @param Bill $bill diff --git a/app/Api/V1/Controllers/Models/Bill/StoreController.php b/app/Api/V1/Controllers/Models/Bill/StoreController.php index d3bfd2cc04..f28e8fbdfe 100644 --- a/app/Api/V1/Controllers/Models/Bill/StoreController.php +++ b/app/Api/V1/Controllers/Models/Bill/StoreController.php @@ -60,6 +60,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/storeBill + * * Store a bill. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Bill/UpdateController.php b/app/Api/V1/Controllers/Models/Bill/UpdateController.php index 23e1e92cdf..d5fdf38b03 100644 --- a/app/Api/V1/Controllers/Models/Bill/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Bill/UpdateController.php @@ -57,6 +57,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/bills/updateBill + * * Update a bill. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Budget/DestroyController.php b/app/Api/V1/Controllers/Models/Budget/DestroyController.php index 81b8012303..2d8f11cda1 100644 --- a/app/Api/V1/Controllers/Models/Budget/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Budget/DestroyController.php @@ -54,6 +54,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/deleteBudget + * * Remove the specified resource from storage. * * @param Budget $budget diff --git a/app/Api/V1/Controllers/Models/Budget/ListController.php b/app/Api/V1/Controllers/Models/Budget/ListController.php index 3130c016f6..8dc6ef727b 100644 --- a/app/Api/V1/Controllers/Models/Budget/ListController.php +++ b/app/Api/V1/Controllers/Models/Budget/ListController.php @@ -71,6 +71,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listAttachmentByBudget + * * @param Budget $budget * * @return JsonResponse @@ -101,6 +104,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listBudgetLimitByBudget + * * Display a listing of the resource. * * @param Budget $budget @@ -130,6 +136,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listTransactionByBudget + * * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Budget/ShowController.php b/app/Api/V1/Controllers/Models/Budget/ShowController.php index bfe12fcc3d..f2831e1918 100644 --- a/app/Api/V1/Controllers/Models/Budget/ShowController.php +++ b/app/Api/V1/Controllers/Models/Budget/ShowController.php @@ -64,6 +64,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listBudget + * * Display a listing of the resource. * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Models/Budget/StoreController.php b/app/Api/V1/Controllers/Models/Budget/StoreController.php index 6ea43ad78c..af1d80251b 100644 --- a/app/Api/V1/Controllers/Models/Budget/StoreController.php +++ b/app/Api/V1/Controllers/Models/Budget/StoreController.php @@ -57,6 +57,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/storeBudget + * * Store a budget. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Budget/UpdateController.php b/app/Api/V1/Controllers/Models/Budget/UpdateController.php index 94094a4f94..ce40281086 100644 --- a/app/Api/V1/Controllers/Models/Budget/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Budget/UpdateController.php @@ -57,6 +57,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/updateBudget + * * Update a budget. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/DestroyController.php b/app/Api/V1/Controllers/Models/BudgetLimit/DestroyController.php index 7da2351c0b..70535133a9 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/DestroyController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/DestroyController.php @@ -59,6 +59,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/deleteBudgetLimit + * * Remove the specified resource from storage. * * @param Budget $budget diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php b/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php index 4ac3877315..79a03c0cce 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/ListController.php @@ -67,6 +67,8 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listTransactionByBudgetLimit * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/ShowController.php b/app/Api/V1/Controllers/Models/BudgetLimit/ShowController.php index 8ca384fd8f..108a8612d8 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/ShowController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/ShowController.php @@ -70,7 +70,10 @@ class ShowController extends Controller } /** - * Display a listing of the budget limits for this budget.. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listBudgetLimitByBudget + * + * Display a listing of the budget limits for this budget. * * @param Request $request * @param Budget $budget @@ -101,7 +104,10 @@ class ShowController extends Controller } /** - * Display a listing of the budget limits for this budget.. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/listBudgetLimit + * + * Display a listing of the budget limits for this budget. * * @param DateRequest $request * @@ -131,6 +137,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/getBudgetLimit + * * @param Request $request * @param Budget $budget * @param BudgetLimit $budgetLimit diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php b/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php index 697c950aeb..d5630273fd 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/StoreController.php @@ -60,6 +60,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/storeBudgetLimit + * * Store a newly created resource in storage. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/BudgetLimit/UpdateController.php b/app/Api/V1/Controllers/Models/BudgetLimit/UpdateController.php index 055e91bd92..54150f26da 100644 --- a/app/Api/V1/Controllers/Models/BudgetLimit/UpdateController.php +++ b/app/Api/V1/Controllers/Models/BudgetLimit/UpdateController.php @@ -42,6 +42,9 @@ class UpdateController extends Controller private BudgetLimitRepositoryInterface $blRepository; /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/budgets/updateBudgetLimit + * * BudgetLimitController constructor. * * @codeCoverageIgnore From 060c08c011a40f79deba8ef2424617dc50fcf34f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 08:28:01 +0200 Subject: [PATCH 11/30] Return false --- app/Console/Commands/Tools/ApplyRules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Tools/ApplyRules.php b/app/Console/Commands/Tools/ApplyRules.php index fa46d79b46..5ad5c240c2 100644 --- a/app/Console/Commands/Tools/ApplyRules.php +++ b/app/Console/Commands/Tools/ApplyRules.php @@ -179,7 +179,7 @@ class ApplyRules extends Command // verify account. $result = $this->verifyInputAccounts(); if (false === $result) { - return $result; + return false; } // verify rule groups. From eae0cc17a483d641097c40cbc263fe606ec02714 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 08:28:10 +0200 Subject: [PATCH 12/30] No need for break --- app/Exceptions/GracefulNotFoundHandler.php | 4 ---- app/Jobs/CreateAutoBudgetLimits.php | 1 - 2 files changed, 5 deletions(-) diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php index cf8f061ca1..fe2b398947 100644 --- a/app/Exceptions/GracefulNotFoundHandler.php +++ b/app/Exceptions/GracefulNotFoundHandler.php @@ -81,23 +81,19 @@ class GracefulNotFoundHandler extends ExceptionHandler case 'attachments.view': // redirect to original attachment holder. return $this->handleAttachment($request, $e); - break; case 'bills.show': $request->session()->reflash(); return redirect(route('bills.index')); - break; case 'currencies.show': $request->session()->reflash(); return redirect(route('currencies.index')); - break; case 'budgets.show': case 'budgets.edit': $request->session()->reflash(); return redirect(route('budgets.index')); - break; case 'piggy-banks.show': $request->session()->reflash(); diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php index b3cd43ef7e..d66fd58c08 100644 --- a/app/Jobs/CreateAutoBudgetLimits.php +++ b/app/Jobs/CreateAutoBudgetLimits.php @@ -178,7 +178,6 @@ class CreateAutoBudgetLimits implements ShouldQueue $value = $this->date->format($format); return in_array($value, ['01-01', '07-01'], true); - break; case 'yearly': $format = 'm-d'; $value = $this->date->format($format); From 18fad5f115e377bb5477f0f07cd8757314f973b2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 08:28:18 +0200 Subject: [PATCH 13/30] API: add missing fields --- app/Transformers/BudgetTransformer.php | 1 + app/Transformers/RuleTransformer.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Transformers/BudgetTransformer.php b/app/Transformers/BudgetTransformer.php index 4fcc75d2db..7203cc5d83 100644 --- a/app/Transformers/BudgetTransformer.php +++ b/app/Transformers/BudgetTransformer.php @@ -93,6 +93,7 @@ class BudgetTransformer extends AbstractTransformer 'updated_at' => $budget->updated_at->toAtomString(), 'active' => $budget->active, 'name' => $budget->name, + 'order' => $budget->order, 'auto_budget_type' => $abType, 'auto_budget_period' => $abPeriod, 'auto_budget_currency_id' => $abCurrencyId, diff --git a/app/Transformers/RuleTransformer.php b/app/Transformers/RuleTransformer.php index c21599ed35..970884912d 100644 --- a/app/Transformers/RuleTransformer.php +++ b/app/Transformers/RuleTransformer.php @@ -64,6 +64,7 @@ class RuleTransformer extends AbstractTransformer 'created_at' => $rule->created_at->toAtomString(), 'updated_at' => $rule->updated_at->toAtomString(), 'rule_group_id' => (string)$rule->rule_group_id, + 'rule_group_title' => (string)$rule->ruleGroup->title, 'title' => $rule->title, 'description' => $rule->description, 'order' => (int)$rule->order, From 1efbbe4b840efe60f59565994343b5b0caa015a9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 10:20:28 +0200 Subject: [PATCH 14/30] Append API links --- .../Models/Category/DestroyController.php | 3 +++ .../Models/Category/ListController.php | 6 ++++++ .../Models/Category/ShowController.php | 6 ++++++ .../Models/Category/StoreController.php | 3 +++ .../Models/Category/UpdateController.php | 3 +++ .../Models/ObjectGroup/DestroyController.php | 3 +++ .../Models/ObjectGroup/ListController.php | 8 +++++++- .../Models/ObjectGroup/ShowController.php | 6 ++++++ .../Models/ObjectGroup/UpdateController.php | 3 +++ .../Models/PiggyBank/DestroyController.php | 3 +++ .../Models/PiggyBank/ListController.php | 6 ++++++ .../Models/PiggyBank/ShowController.php | 6 ++++++ .../Models/PiggyBank/StoreController.php | 3 +++ .../Models/PiggyBank/UpdateController.php | 3 +++ .../Models/Recurrence/DestroyController.php | 3 +++ .../Models/Recurrence/ListController.php | 3 +++ .../Models/Recurrence/ShowController.php | 6 ++++++ .../Models/Recurrence/StoreController.php | 3 +++ .../Models/Recurrence/UpdateController.php | 3 +++ .../Models/Rule/DestroyController.php | 3 +++ .../Models/Rule/ShowController.php | 6 ++++++ .../Models/Rule/StoreController.php | 3 +++ .../Models/Rule/TriggerController.php | 6 ++++++ .../Models/Rule/UpdateController.php | 3 +++ .../Models/RuleGroup/DestroyController.php | 3 +++ .../Models/RuleGroup/ListController.php | 3 +++ .../Models/RuleGroup/ShowController.php | 5 +++++ .../Models/RuleGroup/StoreController.php | 3 +++ .../Models/RuleGroup/TriggerController.php | 6 ++++++ .../Models/RuleGroup/UpdateController.php | 3 +++ .../Models/Tag/DestroyController.php | 3 +++ .../Controllers/Models/Tag/ListController.php | 6 ++++++ .../Controllers/Models/Tag/ShowController.php | 6 ++++++ .../Models/Tag/StoreController.php | 3 +++ .../Models/Tag/UpdateController.php | 3 +++ .../Models/Transaction/DestroyController.php | 6 ++++++ .../Models/Transaction/ListController.php | 9 +++++++++ .../Models/Transaction/ShowController.php | 9 +++++++++ .../Models/Transaction/StoreController.php | 3 +++ .../Models/Transaction/UpdateController.php | 3 +++ .../TransactionCurrency/DestroyController.php | 3 +++ .../TransactionCurrency/ListController.php | 20 +++++++++++++++++++ .../TransactionCurrency/ShowController.php | 9 +++++++++ .../TransactionCurrency/StoreController.php | 3 +++ .../TransactionCurrency/UpdateController.php | 12 +++++++++++ .../TransactionLink/DestroyController.php | 3 +++ .../Models/TransactionLink/ShowController.php | 8 +++++++- .../TransactionLink/StoreController.php | 3 +++ .../TransactionLink/UpdateController.php | 3 +++ .../TransactionLinkType/DestroyController.php | 3 +++ .../TransactionLinkType/ListController.php | 3 ++- .../TransactionLinkType/ShowController.php | 7 ++++++- .../TransactionLinkType/StoreController.php | 3 +++ .../TransactionLinkType/UpdateController.php | 3 +++ 54 files changed, 254 insertions(+), 4 deletions(-) diff --git a/app/Api/V1/Controllers/Models/Category/DestroyController.php b/app/Api/V1/Controllers/Models/Category/DestroyController.php index 2890584cbb..4d7b1e1681 100644 --- a/app/Api/V1/Controllers/Models/Category/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Category/DestroyController.php @@ -54,6 +54,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/deleteCategory + * * Remove the specified resource from storage. * * @param Category $category diff --git a/app/Api/V1/Controllers/Models/Category/ListController.php b/app/Api/V1/Controllers/Models/Category/ListController.php index d4be312707..ceb2fd5d1e 100644 --- a/app/Api/V1/Controllers/Models/Category/ListController.php +++ b/app/Api/V1/Controllers/Models/Category/ListController.php @@ -66,6 +66,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/listAttachmentByCategory + * * @param Category $category * * @return JsonResponse @@ -96,6 +99,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/listTransactionByCategory + * * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Category/ShowController.php b/app/Api/V1/Controllers/Models/Category/ShowController.php index 3b4d6418b2..d463a6ce52 100644 --- a/app/Api/V1/Controllers/Models/Category/ShowController.php +++ b/app/Api/V1/Controllers/Models/Category/ShowController.php @@ -60,6 +60,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/listCategory + * * Display a listing of the resource. * * @return JsonResponse @@ -92,6 +95,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/getCategory + * * Show the category. * * @param Category $category diff --git a/app/Api/V1/Controllers/Models/Category/StoreController.php b/app/Api/V1/Controllers/Models/Category/StoreController.php index 161987545d..3b93112db7 100644 --- a/app/Api/V1/Controllers/Models/Category/StoreController.php +++ b/app/Api/V1/Controllers/Models/Category/StoreController.php @@ -57,6 +57,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/storeCategory + * * Store new category. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Category/UpdateController.php b/app/Api/V1/Controllers/Models/Category/UpdateController.php index 1c1975a8d4..66bfce6859 100644 --- a/app/Api/V1/Controllers/Models/Category/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Category/UpdateController.php @@ -57,6 +57,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/categories/updateCategory + * * Update the category. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php b/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php index 0fc6447f84..cc8211b4dd 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/DestroyController.php @@ -57,6 +57,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/deleteObjectGroup + * * Remove the specified resource from storage. * * @param ObjectGroup $objectGroup diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php index 7b3db64c16..8ac8308e6f 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/ListController.php @@ -63,7 +63,10 @@ class ListController extends Controller } /** - * List all bills + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/listBillByObjectGroup + * + * List all bills in this object group * * @param ObjectGroup $objectGroup * @@ -96,6 +99,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/listPiggyBankByObjectGroup + * * List all piggies under the object group. * * @param ObjectGroup $objectGroup diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php b/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php index 15e97c5798..c11d756761 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/ShowController.php @@ -64,6 +64,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/listObjectGroups + * * Display a listing of the resource. * * @param Request $request @@ -99,6 +102,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/getObjectGroup + * * Show single instance. * * @param ObjectGroup $objectGroup diff --git a/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php b/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php index 4f60d9b37e..45a8858f39 100644 --- a/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php +++ b/app/Api/V1/Controllers/Models/ObjectGroup/UpdateController.php @@ -60,6 +60,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/object_groups/updateObjectGroup + * * @param UpdateRequest $request * @param ObjectGroup $objectGroup * diff --git a/app/Api/V1/Controllers/Models/PiggyBank/DestroyController.php b/app/Api/V1/Controllers/Models/PiggyBank/DestroyController.php index 0f85923d97..27b8ce10c0 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/DestroyController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/DestroyController.php @@ -54,6 +54,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/deletePiggyBank + * * Delete the resource. * * @param PiggyBank $piggyBank diff --git a/app/Api/V1/Controllers/Models/PiggyBank/ListController.php b/app/Api/V1/Controllers/Models/PiggyBank/ListController.php index a4d771e8de..264e5dc528 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/ListController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/ListController.php @@ -60,6 +60,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/listAttachmentByPiggyBank + * * @param PiggyBank $piggyBank * * @return JsonResponse @@ -90,6 +93,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/listEventByPiggyBank + * * List single resource. * * @param PiggyBank $piggyBank diff --git a/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php b/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php index 24b9e5b1ab..37e86c867d 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/ShowController.php @@ -60,6 +60,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/listPiggyBank + * * List all of them. * * @return JsonResponse @@ -93,6 +96,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/getPiggyBank + * * List single resource. * * @param PiggyBank $piggyBank diff --git a/app/Api/V1/Controllers/Models/PiggyBank/StoreController.php b/app/Api/V1/Controllers/Models/PiggyBank/StoreController.php index 0f4e7a01f1..a1bdd1dfc1 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/StoreController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/StoreController.php @@ -57,6 +57,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/storePiggyBank + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php b/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php index a48678d439..e6634cf5e2 100644 --- a/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php +++ b/app/Api/V1/Controllers/Models/PiggyBank/UpdateController.php @@ -57,6 +57,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/piggy_banks/updatePiggyBank + * * Update piggy bank. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php b/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php index 59ebdf7b0c..0eb3bb0bf3 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/DestroyController.php @@ -54,6 +54,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/deleteRecurrence + * * Delete the resource. * * @param Recurrence $recurrence diff --git a/app/Api/V1/Controllers/Models/Recurrence/ListController.php b/app/Api/V1/Controllers/Models/Recurrence/ListController.php index 6e96436048..17cf615b66 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/ListController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/ListController.php @@ -64,6 +64,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/listTransactionByRecurrence + * * Show transactions for this recurrence. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Recurrence/ShowController.php b/app/Api/V1/Controllers/Models/Recurrence/ShowController.php index 71a66bca59..bad3f2fbc5 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/ShowController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/ShowController.php @@ -60,6 +60,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/listRecurrence + * * List all of them. * * @return JsonResponse @@ -94,6 +97,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/getRecurrence + * * List single resource. * * @param Recurrence $recurrence diff --git a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php index fdf2ce0761..03c60fd43a 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/StoreController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/StoreController.php @@ -57,6 +57,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/storeRecurrence + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php index 2df4087347..18696ee68e 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/UpdateController.php @@ -57,6 +57,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/recurrences/updateRecurrence + * * Update single recurrence. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Rule/DestroyController.php b/app/Api/V1/Controllers/Models/Rule/DestroyController.php index 97b3313b3d..a2503c116e 100644 --- a/app/Api/V1/Controllers/Models/Rule/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Rule/DestroyController.php @@ -58,6 +58,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/deleteRule + * * Delete the resource. * * @param Rule $rule diff --git a/app/Api/V1/Controllers/Models/Rule/ShowController.php b/app/Api/V1/Controllers/Models/Rule/ShowController.php index 38e6e60cbc..6ab5b01e2c 100644 --- a/app/Api/V1/Controllers/Models/Rule/ShowController.php +++ b/app/Api/V1/Controllers/Models/Rule/ShowController.php @@ -64,6 +64,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/listRule + * * List all of them. * * @return JsonResponse @@ -98,6 +101,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/getRule + * * List single resource. * * @param Rule $rule diff --git a/app/Api/V1/Controllers/Models/Rule/StoreController.php b/app/Api/V1/Controllers/Models/Rule/StoreController.php index a51870c668..7d861c71f4 100644 --- a/app/Api/V1/Controllers/Models/Rule/StoreController.php +++ b/app/Api/V1/Controllers/Models/Rule/StoreController.php @@ -60,6 +60,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/storeRule + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Rule/TriggerController.php b/app/Api/V1/Controllers/Models/Rule/TriggerController.php index dd7b818fa1..7f5f2eae8d 100644 --- a/app/Api/V1/Controllers/Models/Rule/TriggerController.php +++ b/app/Api/V1/Controllers/Models/Rule/TriggerController.php @@ -66,6 +66,9 @@ class TriggerController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/testRule + * * @param TestRequest $request * @param Rule $rule * @@ -113,6 +116,9 @@ class TriggerController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/fireRule + * * Execute the given rule group on a set of existing transactions. * * @param TriggerRequest $request diff --git a/app/Api/V1/Controllers/Models/Rule/UpdateController.php b/app/Api/V1/Controllers/Models/Rule/UpdateController.php index 28a25fe7d4..28859b99de 100644 --- a/app/Api/V1/Controllers/Models/Rule/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Rule/UpdateController.php @@ -61,6 +61,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rules/updateRule + * * Update a rule. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/RuleGroup/DestroyController.php b/app/Api/V1/Controllers/Models/RuleGroup/DestroyController.php index 037ba21be3..f520f18544 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/DestroyController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/DestroyController.php @@ -58,6 +58,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/deleteRuleGroup + * * Delete the resource. * * @param RuleGroup $ruleGroup diff --git a/app/Api/V1/Controllers/Models/RuleGroup/ListController.php b/app/Api/V1/Controllers/Models/RuleGroup/ListController.php index 73b8780155..30e7c3a68b 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/ListController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/ListController.php @@ -63,6 +63,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/listRuleByGroup + * * @param RuleGroup $group * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php b/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php index 3f053495a9..7e77e6fd41 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/ShowController.php @@ -64,6 +64,8 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/listRuleGroup * List all of them. * * @return JsonResponse @@ -96,6 +98,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/getRuleGroup + * * List single resource. * * @param RuleGroup $ruleGroup diff --git a/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php b/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php index cb1319368e..0487988536 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/StoreController.php @@ -66,6 +66,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/storeRuleGroup + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php index 31fccaca88..98c4d37793 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/TriggerController.php @@ -67,6 +67,9 @@ class TriggerController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/testRuleGroup + * * @param TestRequest $request * @param RuleGroup $group * @@ -120,6 +123,9 @@ class TriggerController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/fireRuleGroup + * * Execute the given rule group on a set of existing transactions. * * @param TriggerRequest $request diff --git a/app/Api/V1/Controllers/Models/RuleGroup/UpdateController.php b/app/Api/V1/Controllers/Models/RuleGroup/UpdateController.php index 840c1f43e4..2cb39726ac 100644 --- a/app/Api/V1/Controllers/Models/RuleGroup/UpdateController.php +++ b/app/Api/V1/Controllers/Models/RuleGroup/UpdateController.php @@ -62,6 +62,9 @@ class UpdateController extends Controller } /** + * This is endpoint is documented at: + * https://api-docs.firefly-iii.org/#/rule_groups/updateRuleGroup + * * Update a rule group. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Tag/DestroyController.php b/app/Api/V1/Controllers/Models/Tag/DestroyController.php index dd7a5f8068..c7c339d0aa 100644 --- a/app/Api/V1/Controllers/Models/Tag/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Tag/DestroyController.php @@ -58,6 +58,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/deleteTag + * * Delete the resource. * * @param Tag $tag diff --git a/app/Api/V1/Controllers/Models/Tag/ListController.php b/app/Api/V1/Controllers/Models/Tag/ListController.php index 3bde6c175b..51ef7f7307 100644 --- a/app/Api/V1/Controllers/Models/Tag/ListController.php +++ b/app/Api/V1/Controllers/Models/Tag/ListController.php @@ -69,6 +69,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/listAttachmentByTag + * * @param Tag $tag * * @return JsonResponse @@ -99,6 +102,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/listTransactionByTag + * * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/Tag/ShowController.php b/app/Api/V1/Controllers/Models/Tag/ShowController.php index 162936208f..dc4e58162d 100644 --- a/app/Api/V1/Controllers/Models/Tag/ShowController.php +++ b/app/Api/V1/Controllers/Models/Tag/ShowController.php @@ -64,6 +64,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/listTag + * * List all of them. * * @return JsonResponse @@ -96,6 +99,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/getTag + * * List single resource. * * @param Tag $tag diff --git a/app/Api/V1/Controllers/Models/Tag/StoreController.php b/app/Api/V1/Controllers/Models/Tag/StoreController.php index fd8346887f..c31e903c6a 100644 --- a/app/Api/V1/Controllers/Models/Tag/StoreController.php +++ b/app/Api/V1/Controllers/Models/Tag/StoreController.php @@ -60,6 +60,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/storeTag + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Tag/UpdateController.php b/app/Api/V1/Controllers/Models/Tag/UpdateController.php index 5bc869d5b3..377c362f3f 100644 --- a/app/Api/V1/Controllers/Models/Tag/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Tag/UpdateController.php @@ -61,6 +61,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/tags/updateTag + * * Update a rule. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/Transaction/DestroyController.php b/app/Api/V1/Controllers/Models/Transaction/DestroyController.php index a3ac9dc901..7d46ffad4a 100644 --- a/app/Api/V1/Controllers/Models/Transaction/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Transaction/DestroyController.php @@ -60,6 +60,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/deleteTransaction + * * Remove the specified resource from storage. * * @param TransactionGroup $transactionGroup @@ -77,6 +80,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/deleteTransactionJournal + * * Remove the specified resource from storage. * * @param TransactionJournal $transactionJournal diff --git a/app/Api/V1/Controllers/Models/Transaction/ListController.php b/app/Api/V1/Controllers/Models/Transaction/ListController.php index 2903499ebe..19e9569df1 100644 --- a/app/Api/V1/Controllers/Models/Transaction/ListController.php +++ b/app/Api/V1/Controllers/Models/Transaction/ListController.php @@ -67,6 +67,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/listAttachmentByTransaction + * * @param TransactionGroup $transactionGroup * * @return JsonResponse @@ -100,6 +103,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/listEventByTransaction + * * @param TransactionGroup $transactionGroup * * @return JsonResponse @@ -136,6 +142,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/listLinksByJournal + * * @param TransactionJournal $transactionJournal * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Models/Transaction/ShowController.php b/app/Api/V1/Controllers/Models/Transaction/ShowController.php index d14e6245f7..20af38f182 100644 --- a/app/Api/V1/Controllers/Models/Transaction/ShowController.php +++ b/app/Api/V1/Controllers/Models/Transaction/ShowController.php @@ -46,6 +46,9 @@ class ShowController extends Controller use TransactionFilter; /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/listTransaction + * * Show all transactions. * * @param Request $request @@ -96,6 +99,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/getTransactionByJournal + * * Show a single transaction, by transaction journal. * * @param TransactionJournal $transactionJournal @@ -109,6 +115,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/getTransaction + * * Show a single transaction. * * @param TransactionGroup $transactionGroup diff --git a/app/Api/V1/Controllers/Models/Transaction/StoreController.php b/app/Api/V1/Controllers/Models/Transaction/StoreController.php index 486c2eb7e6..29d43b8d9e 100644 --- a/app/Api/V1/Controllers/Models/Transaction/StoreController.php +++ b/app/Api/V1/Controllers/Models/Transaction/StoreController.php @@ -71,6 +71,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/storeTransaction + * * Store a new transaction. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php index 7363895779..500ad0d508 100644 --- a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php @@ -65,6 +65,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/transactions/updateTransaction + * * Update a transaction. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php index e22ee27ecc..f09bbc82d2 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/DestroyController.php @@ -60,6 +60,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/deleteCurrency + * * Remove the specified resource from storage. * * @param TransactionCurrency $currency diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php index c782690af0..94a8f80457 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php @@ -88,6 +88,8 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listAccountByCurrency * Display a list of accounts. * * @param Request $request @@ -140,6 +142,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listAvailableBudgetByCurrency + * * Display a listing of the resource. * * @param TransactionCurrency $currency @@ -176,6 +181,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listBillByCurrency + * * List all bills * * @param TransactionCurrency $currency @@ -217,6 +225,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listBudgetLimitByCurrency + * * List all budget limits * * @param TransactionCurrency $currency @@ -249,6 +260,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listRecurrenceByCurrency + * * List all recurring transactions. * * @param TransactionCurrency $currency @@ -300,6 +314,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listRuleByCurrency + * * List all of them. * * @param TransactionCurrency $currency @@ -350,6 +367,9 @@ class ListController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listTransactionByCurrency + * * Show all transactions. * * @param Request $request diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php index bdf8630082..919a8ed085 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ShowController.php @@ -65,6 +65,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/listCurrency + * * Display a listing of the resource. * * @return JsonResponse @@ -95,6 +98,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/getCurrency + * * Show a currency. * * @param TransactionCurrency $currency @@ -118,6 +124,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/getDefaultCurrency + * * Show a currency. * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php index bbab73e2e1..8902cc47cb 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/StoreController.php @@ -65,6 +65,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/storeCurrency + * * Store new currency. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php index 5f50d1886b..211b5cf964 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/UpdateController.php @@ -67,6 +67,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/disableCurrency + * * Disable a currency. * * @param TransactionCurrency $currency @@ -97,6 +100,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/enableCurrency + * * Enable a currency. * * @param TransactionCurrency $currency @@ -123,6 +129,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/defaultCurrency + * * Make the currency a default currency. * * @param TransactionCurrency $currency @@ -153,6 +162,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/currencies/updateCurrency + * * Update a currency. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php b/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php index b70feb91b0..cc50a7feed 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/DestroyController.php @@ -58,6 +58,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/deleteTransactionLink + * * Delete the resource. * * @param TransactionJournalLink $link diff --git a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php index c24ac20190..db0a6aaf31 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php @@ -64,7 +64,10 @@ class ShowController extends Controller } /** - * List all of the transaction links there are. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/listTransactionLink + * + * List all transaction links there are. * * @param Request $request * @@ -104,6 +107,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/getTransactionLink + * * List single resource. * * @param TransactionJournalLink $journalLink diff --git a/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php b/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php index 83305edd53..08eaf6de80 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/StoreController.php @@ -67,6 +67,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/storeTransactionLink + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php index 3e9459070b..e95de834a9 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/UpdateController.php @@ -64,6 +64,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/updateTransactionLink + * * Update object. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/DestroyController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/DestroyController.php index 67d093b513..165185c146 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/DestroyController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/DestroyController.php @@ -65,6 +65,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/deleteLinkType + * * Delete the resource. * * @param LinkType $linkType diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php index 0964dbd90d..dd843887dd 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/ListController.php @@ -70,7 +70,8 @@ class ListController extends Controller } /** - * Delete the resource. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/listTransactionByLinkType * * @param Request $request * @param LinkType $linkType diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php index 081eff43f6..5046570c87 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/ShowController.php @@ -70,7 +70,9 @@ class ShowController extends Controller } /** - * List all of them. + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/listLinkType + * * * @return JsonResponse * @throws FireflyException @@ -103,6 +105,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/getLinkType + * * List single resource. * * @param LinkType $linkType diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php index f7917138e9..6a16ca9c34 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/StoreController.php @@ -67,6 +67,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/storeLinkType + * * Store new object. * * @param StoreRequest $request diff --git a/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php b/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php index 5ed66ec7e9..4eb5ad9ee4 100644 --- a/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php +++ b/app/Api/V1/Controllers/Models/TransactionLinkType/UpdateController.php @@ -68,6 +68,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/links/updateLinkType + * * Update object. * * @param UpdateRequest $request From 915f4a004558bcb4224051e50ef42d8ce2ab7c2c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 17:22:16 +0200 Subject: [PATCH 15/30] Add endpoint links. --- .../V1/Controllers/Search/AccountController.php | 2 ++ .../Controllers/Search/TransactionController.php | 3 +++ .../V1/Controllers/Summary/BasicController.php | 3 +++ app/Api/V1/Controllers/System/AboutController.php | 6 ++++++ .../System/ConfigurationController.php | 9 +++++++++ app/Api/V1/Controllers/System/CronController.php | 3 +++ app/Api/V1/Controllers/System/UserController.php | 15 +++++++++++++++ .../V1/Controllers/User/PreferencesController.php | 12 ++++++++++++ .../V1/Controllers/Webhook/AttemptController.php | 6 ++++++ .../V1/Controllers/Webhook/DestroyController.php | 9 +++++++++ .../V1/Controllers/Webhook/MessageController.php | 6 ++++++ app/Api/V1/Controllers/Webhook/ShowController.php | 6 ++++++ .../V1/Controllers/Webhook/StoreController.php | 3 +++ .../V1/Controllers/Webhook/SubmitController.php | 3 +++ .../V1/Controllers/Webhook/UpdateController.php | 3 +++ 15 files changed, 89 insertions(+) diff --git a/app/Api/V1/Controllers/Search/AccountController.php b/app/Api/V1/Controllers/Search/AccountController.php index 6bb2441c92..bc7adc0965 100644 --- a/app/Api/V1/Controllers/Search/AccountController.php +++ b/app/Api/V1/Controllers/Search/AccountController.php @@ -59,6 +59,8 @@ class AccountController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/search/searchAccounts * @param Request $request * * @return JsonResponse|Response diff --git a/app/Api/V1/Controllers/Search/TransactionController.php b/app/Api/V1/Controllers/Search/TransactionController.php index 1916b8ba31..a2464313a3 100644 --- a/app/Api/V1/Controllers/Search/TransactionController.php +++ b/app/Api/V1/Controllers/Search/TransactionController.php @@ -39,6 +39,9 @@ use League\Fractal\Resource\Collection; class TransactionController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/search/searchTransactions + * * @param Request $request * @param SearchInterface $searcher * diff --git a/app/Api/V1/Controllers/Summary/BasicController.php b/app/Api/V1/Controllers/Summary/BasicController.php index 86d72982e1..e596549bb9 100644 --- a/app/Api/V1/Controllers/Summary/BasicController.php +++ b/app/Api/V1/Controllers/Summary/BasicController.php @@ -87,6 +87,9 @@ class BasicController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/summary/getBasicSummary + * * @param DateRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/System/AboutController.php b/app/Api/V1/Controllers/System/AboutController.php index 054c8fa0d8..8c2cf0995a 100644 --- a/app/Api/V1/Controllers/System/AboutController.php +++ b/app/Api/V1/Controllers/System/AboutController.php @@ -39,6 +39,9 @@ use League\Fractal\Resource\Item; class AboutController extends Controller { /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/about/getAbout + * * Returns system information. * * @return JsonResponse @@ -63,6 +66,9 @@ class AboutController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/about/getCurrentUser + * * Returns information about the user. * * @return JsonResponse diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php index 885175837c..dce33eafbb 100644 --- a/app/Api/V1/Controllers/System/ConfigurationController.php +++ b/app/Api/V1/Controllers/System/ConfigurationController.php @@ -54,6 +54,9 @@ class ConfigurationController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/configuration/getConfiguration + * * @return JsonResponse * @throws FireflyException */ @@ -122,6 +125,9 @@ class ConfigurationController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/configuration/getSingleConfiguration + * * @param string $configKey * * @return JsonResponse @@ -151,6 +157,9 @@ class ConfigurationController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/configuration/setConfiguration + * * Update the configuration. * * @param UpdateRequest $request diff --git a/app/Api/V1/Controllers/System/CronController.php b/app/Api/V1/Controllers/System/CronController.php index c33373f240..aac11c2447 100644 --- a/app/Api/V1/Controllers/System/CronController.php +++ b/app/Api/V1/Controllers/System/CronController.php @@ -37,6 +37,9 @@ class CronController extends Controller use CronRunner; /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/about/getCron + * * @param CronRequest $request * @param string $token * diff --git a/app/Api/V1/Controllers/System/UserController.php b/app/Api/V1/Controllers/System/UserController.php index 368359afe9..536f0bc6ba 100644 --- a/app/Api/V1/Controllers/System/UserController.php +++ b/app/Api/V1/Controllers/System/UserController.php @@ -62,6 +62,9 @@ class UserController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/users/deleteUser + * * Remove the specified resource from storage. * * @param User $user @@ -87,6 +90,9 @@ class UserController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/users/listUser + * * Display a listing of the resource. * * @return JsonResponse @@ -120,6 +126,9 @@ class UserController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/users/getUser + * * Show a single user. * * @param User $user @@ -142,6 +151,9 @@ class UserController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/users/storeUser + * * Store a new user. * * @param UserStoreRequest $request @@ -166,6 +178,9 @@ class UserController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/users/updateUser + * * Update a user. * * @param UserUpdateRequest $request diff --git a/app/Api/V1/Controllers/User/PreferencesController.php b/app/Api/V1/Controllers/User/PreferencesController.php index f9cced2fe4..2eb2533c0d 100644 --- a/app/Api/V1/Controllers/User/PreferencesController.php +++ b/app/Api/V1/Controllers/User/PreferencesController.php @@ -45,6 +45,9 @@ class PreferencesController extends Controller public const RESOURCE_KEY = 'preferences'; /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/preferences/listPreference + * * List all of them. * * @return JsonResponse @@ -75,6 +78,9 @@ class PreferencesController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/preferences/getPreference + * * Return a single preference by name. * * @param Preference $preference @@ -95,6 +101,9 @@ class PreferencesController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/preferences/storePreference + * * @param PreferenceStoreRequest $request * * @return JsonResponse @@ -116,6 +125,9 @@ class PreferencesController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/preferences/updatePreference + * * @param PreferenceUpdateRequest $request * @param Preference $preference * diff --git a/app/Api/V1/Controllers/Webhook/AttemptController.php b/app/Api/V1/Controllers/Webhook/AttemptController.php index 775821dbbd..eaad374f1a 100644 --- a/app/Api/V1/Controllers/Webhook/AttemptController.php +++ b/app/Api/V1/Controllers/Webhook/AttemptController.php @@ -61,6 +61,9 @@ class AttemptController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/getWebhookMessageAttempts + * * @param Webhook $webhook * @param WebhookMessage $message * @@ -94,6 +97,9 @@ class AttemptController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/getSingleWebhookMessageAttempt + * * Show single instance. * * @param Webhook $webhook diff --git a/app/Api/V1/Controllers/Webhook/DestroyController.php b/app/Api/V1/Controllers/Webhook/DestroyController.php index 8832c342ea..8bee3a7d34 100644 --- a/app/Api/V1/Controllers/Webhook/DestroyController.php +++ b/app/Api/V1/Controllers/Webhook/DestroyController.php @@ -56,6 +56,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/deleteWebhook + * * Remove the specified resource from storage. * * @param Webhook $webhook @@ -71,6 +74,9 @@ class DestroyController extends Controller } /** + * This webhook is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/deleteWebhookMessageAttempt + * * Remove the specified resource from storage. * * @param Webhook $webhook @@ -97,6 +103,9 @@ class DestroyController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/deleteWebhookMessage + * * Remove the specified resource from storage. * * @param Webhook $webhook diff --git a/app/Api/V1/Controllers/Webhook/MessageController.php b/app/Api/V1/Controllers/Webhook/MessageController.php index e98d9a05a5..e6ee8a1c5d 100644 --- a/app/Api/V1/Controllers/Webhook/MessageController.php +++ b/app/Api/V1/Controllers/Webhook/MessageController.php @@ -57,6 +57,9 @@ class MessageController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/getWebhookMessages + * * @param Webhook $webhook * * @return JsonResponse @@ -86,6 +89,9 @@ class MessageController extends Controller } /** + * This endpoint is documented: + * https://api-docs.firefly-iii.org/#/webhooks/getSingleWebhookMessage + * * Show single instance. * * @param Webhook $webhook diff --git a/app/Api/V1/Controllers/Webhook/ShowController.php b/app/Api/V1/Controllers/Webhook/ShowController.php index cfa77aef1e..6baa755cd3 100644 --- a/app/Api/V1/Controllers/Webhook/ShowController.php +++ b/app/Api/V1/Controllers/Webhook/ShowController.php @@ -59,6 +59,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/listWebhook + * * Display a listing of the webhooks of the user. * * @return JsonResponse @@ -88,6 +91,9 @@ class ShowController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/getWebhook + * * Show single instance. * * @param Webhook $webhook diff --git a/app/Api/V1/Controllers/Webhook/StoreController.php b/app/Api/V1/Controllers/Webhook/StoreController.php index ffd6c292d0..933b7331dd 100644 --- a/app/Api/V1/Controllers/Webhook/StoreController.php +++ b/app/Api/V1/Controllers/Webhook/StoreController.php @@ -55,6 +55,9 @@ class StoreController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/storeWebhook + * * @param CreateRequest $request * * @return JsonResponse diff --git a/app/Api/V1/Controllers/Webhook/SubmitController.php b/app/Api/V1/Controllers/Webhook/SubmitController.php index 7ed448636e..989a118b26 100644 --- a/app/Api/V1/Controllers/Webhook/SubmitController.php +++ b/app/Api/V1/Controllers/Webhook/SubmitController.php @@ -53,6 +53,9 @@ class SubmitController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/submitWebook + * * Remove the specified resource from storage. * * @param Webhook $webhook diff --git a/app/Api/V1/Controllers/Webhook/UpdateController.php b/app/Api/V1/Controllers/Webhook/UpdateController.php index bb245102e7..2ac56df45d 100644 --- a/app/Api/V1/Controllers/Webhook/UpdateController.php +++ b/app/Api/V1/Controllers/Webhook/UpdateController.php @@ -55,6 +55,9 @@ class UpdateController extends Controller } /** + * This endpoint is documented at: + * https://api-docs.firefly-iii.org/#/webhooks/updateWebhook + * * @param Webhook $webhook * @param UpdateRequest $request * From 048ba35d520ad7911c658719c429d6a3b108b476 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 17:29:04 +0200 Subject: [PATCH 16/30] Update changelog --- changelog.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/changelog.md b/changelog.md index 595b508d92..6a4e32535c 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,33 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 5.6.1 - 2020-09-xx + +### Added +- Initial release. + +### Changed +- Initial release. + +### Deprecated +- Initial release. + +### Removed +- Initial release. + +### Fixed +- Initial release. + +### Security +- Initial release. + +### API +- Deprecated the "currencies with code"-endpoint (see the [API documentation](https://api-docs.firefly-iii.org/#/autocomplete/getCurrenciesCodeAC)). +- Add missing "order" field to budget. +- Add missing "rule_group_title" to rules. +- Attachment endpoint returns "upload_url" and "download_url" instead of "*_uri". + + ## 5.6.0 - 2021-09-17 ⚠️ This release features new LDAP libraries. Your mileage may vary. Make sure you back up everything. Firefly III may accidentally create a new account for you instead of reusing the old one. There is no option for LDAP filters yet. From 8f0a55feb037c673df74328f061892c3ab561620 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Sep 2021 17:29:15 +0200 Subject: [PATCH 17/30] Fix link --- app/Api/V1/Controllers/Insight/Expense/BudgetController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Api/V1/Controllers/Insight/Expense/BudgetController.php b/app/Api/V1/Controllers/Insight/Expense/BudgetController.php index dac96322a7..e8881e09ef 100644 --- a/app/Api/V1/Controllers/Insight/Expense/BudgetController.php +++ b/app/Api/V1/Controllers/Insight/Expense/BudgetController.php @@ -66,7 +66,7 @@ class BudgetController extends Controller /** * This endpoint is documented at: - * http://10.0.0.15/FF3/api/api-docs/#/insight/insightExpenseBudget + * https://api-docs.firefly-iii.org/#/insight/insightExpenseBudget * * @param GenericRequest $request * From 578f350498b75f31d321c78a608c7f7b3b7b07e9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 20 Sep 2021 06:39:10 +0200 Subject: [PATCH 18/30] Convert GET routes to POST. --- app/Http/Controllers/CurrencyController.php | 92 +++++++++++-------- .../Transaction/CreateController.php | 45 +++++---- public/v1/js/ff/currencies/index.js | 35 +++++++ public/v1/js/ff/list/groups.js | 18 +++- public/v1/js/ff/transactions/show.js | 17 ++++ resources/views/v1/currencies/index.twig | 10 +- resources/views/v1/list/groups.twig | 7 +- resources/views/v1/transactions/show.twig | 8 +- routes/web.php | 6 +- 9 files changed, 167 insertions(+), 71 deletions(-) diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 22cd0a8cba..c2781f39e3 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -213,53 +213,60 @@ class CurrencyController extends Controller * @return RedirectResponse|Redirector * @throws FireflyException */ - public function disableCurrency(Request $request, TransactionCurrency $currency) + public function disableCurrency(Request $request) { - app('preferences')->mark(); + $currencyId = (int)$request->get('id'); + if ($currencyId > 0) { + // valid currency? + $currency = $this->repository->find($currencyId); + if (null !== $currency) { + app('preferences')->mark(); - /** @var User $user */ - $user = auth()->user(); - if (!$this->userRepository->hasRole($user, 'owner')) { + /** @var User $user */ + $user = auth()->user(); + if (!$this->userRepository->hasRole($user, 'owner')) { - $request->session()->flash('error', (string)trans('firefly.ask_site_owner', ['owner' => e(config('firefly.site_owner'))])); - Log::channel('audit')->info(sprintf('Tried to disable currency %s but is not site owner.', $currency->code)); + $request->session()->flash('error', (string)trans('firefly.ask_site_owner', ['owner' => e(config('firefly.site_owner'))])); + Log::channel('audit')->info(sprintf('Tried to disable currency %s but is not site owner.', $currency->code)); - return redirect(route('currencies.index')); + return redirect(route('currencies.index')); - } + } - if ($this->repository->currencyInUse($currency)) { + if ($this->repository->currencyInUse($currency)) { - $location = $this->repository->currencyInUseAt($currency); - $message = (string)trans(sprintf('firefly.cannot_disable_currency_%s', $location), ['name' => e($currency->name)]); + $location = $this->repository->currencyInUseAt($currency); + $message = (string)trans(sprintf('firefly.cannot_disable_currency_%s', $location), ['name' => e($currency->name)]); - $request->session()->flash('error', $message); - Log::channel('audit')->info(sprintf('Tried to disable currency %s but is in use.', $currency->code)); + $request->session()->flash('error', $message); + Log::channel('audit')->info(sprintf('Tried to disable currency %s but is in use.', $currency->code)); - return redirect(route('currencies.index')); - } + return redirect(route('currencies.index')); + } - $this->repository->disable($currency); - Log::channel('audit')->info(sprintf('Disabled currency %s.', $currency->code)); - // if no currencies are enabled, enable the first one in the DB (usually the EUR) - if (0 === $this->repository->get()->count()) { - /** @var TransactionCurrency $first */ - $first = $this->repository->getAll()->first(); - if (null === $first) { - throw new FireflyException('No currencies found.'); + $this->repository->disable($currency); + Log::channel('audit')->info(sprintf('Disabled currency %s.', $currency->code)); + // if no currencies are enabled, enable the first one in the DB (usually the EUR) + if (0 === $this->repository->get()->count()) { + /** @var TransactionCurrency $first */ + $first = $this->repository->getAll()->first(); + if (null === $first) { + throw new FireflyException('No currencies found.'); + } + Log::channel('audit')->info(sprintf('Auto-enabled currency %s.', $first->code)); + $this->repository->enable($first); + app('preferences')->set('currencyPreference', $first->code); + app('preferences')->mark(); + } + + if ('EUR' === $currency->code) { + session()->flash('warning', (string)trans('firefly.disable_EUR_side_effects')); + } + + session()->flash('success', (string)trans('firefly.currency_is_now_disabled', ['name' => $currency->name])); } - Log::channel('audit')->info(sprintf('Auto-enabled currency %s.', $first->code)); - $this->repository->enable($first); - app('preferences')->set('currencyPreference', $first->code); - app('preferences')->mark(); } - if ('EUR' === $currency->code) { - session()->flash('warning', (string)trans('firefly.disable_EUR_side_effects')); - } - - session()->flash('success', (string)trans('firefly.currency_is_now_disabled', ['name' => $currency->name])); - return redirect(route('currencies.index')); } @@ -311,13 +318,20 @@ class CurrencyController extends Controller * * @return RedirectResponse|Redirector */ - public function enableCurrency(TransactionCurrency $currency) + public function enableCurrency(Request $request) { - app('preferences')->mark(); + $currencyId = (int)$request->get('id'); + if ($currencyId > 0) { + // valid currency? + $currency = $this->repository->find($currencyId); + if (null !== $currency) { + app('preferences')->mark(); - $this->repository->enable($currency); - session()->flash('success', (string)trans('firefly.currency_is_now_enabled', ['name' => $currency->name])); - Log::channel('audit')->info(sprintf('Enabled currency %s.', $currency->code)); + $this->repository->enable($currency); + session()->flash('success', (string)trans('firefly.currency_is_now_enabled', ['name' => $currency->name])); + Log::channel('audit')->info(sprintf('Enabled currency %s.', $currency->code)); + } + } return redirect(route('currencies.index')); } diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php index 4fc8d3c426..5664a0e012 100644 --- a/app/Http/Controllers/Transaction/CreateController.php +++ b/app/Http/Controllers/Transaction/CreateController.php @@ -28,17 +28,20 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\TransactionGroup; use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface; use FireflyIII\Services\Internal\Update\GroupCloneService; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; -use Illuminate\Http\RedirectResponse; -use Illuminate\Routing\Redirector; +use Illuminate\Http\JsonResponse; +use Illuminate\Http\Request; /** * Class CreateController */ class CreateController extends Controller { + private TransactionGroupRepositoryInterface $repository; + /** * CreateController constructor. * @@ -49,9 +52,10 @@ class CreateController extends Controller parent::__construct(); $this->middleware( - static function ($request, $next) { + function ($request, $next) { app('view')->share('title', (string)trans('firefly.transactions')); app('view')->share('mainTitleIcon', 'fa-exchange'); + $this->repository = app(TransactionGroupRepositoryInterface::class); return $next($request); } @@ -59,28 +63,35 @@ class CreateController extends Controller } /** - * @param TransactionGroup $group + * @param Request $request * - * @return RedirectResponse|Redirector + * @return JsonResponse */ - public function cloneGroup(TransactionGroup $group) + public function cloneGroup(Request $request): JsonResponse { + $groupId = (int)$request->get('id'); + if (0 !== $groupId) { + $group = $this->repository->find($groupId); + if (null !== $group) { + /** @var GroupCloneService $service */ + $service = app(GroupCloneService::class); + $newGroup = $service->cloneGroup($group); - /** @var GroupCloneService $service */ - $service = app(GroupCloneService::class); - $newGroup = $service->cloneGroup($group); + // event! + event(new StoredTransactionGroup($newGroup)); - // event! - event(new StoredTransactionGroup($newGroup)); + app('preferences')->mark(); - app('preferences')->mark(); + $title = $newGroup->title ?? $newGroup->transactionJournals->first()->description; + $link = route('transactions.show', [$newGroup->id]); + session()->flash('success', trans('firefly.stored_journal', ['description' => $title])); + session()->flash('success_url', $link); - $title = $newGroup->title ?? $newGroup->transactionJournals->first()->description; - $link = route('transactions.show', [$newGroup->id]); - session()->flash('success', trans('firefly.stored_journal', ['description' => $title])); - session()->flash('success_url', $link); + return response()->json(['redirect' => route('transactions.show', [$newGroup->id])]); + } + } - return redirect(route('transactions.show', [$newGroup->id])); + return response()->json(['redirect' => route('transactions.show', [$groupId])]); } /** diff --git a/public/v1/js/ff/currencies/index.js b/public/v1/js/ff/currencies/index.js index eb0ad1f1f2..dbccfae942 100644 --- a/public/v1/js/ff/currencies/index.js +++ b/public/v1/js/ff/currencies/index.js @@ -25,6 +25,8 @@ $(function () { "use strict"; $('.make_default').on('click', setDefaultCurrency); + $('.enable-currency').on('click', enableCurrency); + $('.disable-currency').on('click', disableCurrency); }); function setDefaultCurrency(e) { @@ -40,4 +42,37 @@ function setDefaultCurrency(e) { }).fail(function () { console.error('I failed :('); }); + return false; +} + +function enableCurrency(e) { + var button = $(e.currentTarget); + var currencyId = parseInt(button.data('id')); + + $.post(enableCurrencyUrl, { + _token: token, + id: currencyId + }).done(function (data) { + // lame but it works + location.reload(); + }).fail(function () { + console.error('I failed :('); + }); + return false; +} + +function disableCurrency(e) { + var button = $(e.currentTarget); + var currencyId = parseInt(button.data('id')); + + $.post(disableCurrencyUrl, { + _token: token, + id: currencyId + }).done(function (data) { + // lame but it works + location.reload(); + }).fail(function () { + console.error('I failed :('); + }); + return false; } diff --git a/public/v1/js/ff/list/groups.js b/public/v1/js/ff/list/groups.js index 98bc371cf5..a18a1cca6e 100644 --- a/public/v1/js/ff/list/groups.js +++ b/public/v1/js/ff/list/groups.js @@ -23,6 +23,7 @@ var count = 0; $(document).ready(function () { updateListButtons(); addSort(); + $('.clone-transaction').click(cloneTransaction); }); var fixHelper = function (e, tr) { @@ -206,4 +207,19 @@ function updateActionButtons() { if (0 === count) { $('.action-menu').hide(); } -} \ No newline at end of file +} +function cloneTransaction(e) { + var button = $(e.currentTarget); + var groupId = parseInt(button.data('id')); + + $.post(cloneGroupUrl, { + _token: token, + id: groupId + }).done(function (data) { + // lame but it works + location.href = data.redirect; + }).fail(function () { + console.error('I failed :('); + }); + return false; +} diff --git a/public/v1/js/ff/transactions/show.js b/public/v1/js/ff/transactions/show.js index ada41fc76b..72ad1490b3 100644 --- a/public/v1/js/ff/transactions/show.js +++ b/public/v1/js/ff/transactions/show.js @@ -23,6 +23,7 @@ $(function () { "use strict"; $('.link-modal').click(getLinkModal); + $('.clone-transaction').click(cloneTransaction); $('#linkJournalModal').on('shown.bs.modal', function () { makeAutoComplete(); }) @@ -80,3 +81,19 @@ function selectedJournal(event, journal) { $('#selected-journal').html('' + journal.description + '').show(); $('input[name="opposing"]').val(journal.id); } + +function cloneTransaction(e) { + var button = $(e.currentTarget); + var groupId = parseInt(button.data('id')); + + $.post(cloneGroupUrl, { + _token: token, + id: groupId + }).done(function (data) { + // lame but it works + location.href = data.redirect; + }).fail(function () { + console.error('I failed :('); + }); + return false; +} \ No newline at end of file diff --git a/resources/views/v1/currencies/index.twig b/resources/views/v1/currencies/index.twig index 8320003ba7..40ecba9111 100644 --- a/resources/views/v1/currencies/index.twig +++ b/resources/views/v1/currencies/index.twig @@ -69,14 +69,14 @@ class="fa fa-fw fa-star"> {{ 'make_default_currency'|_ }} {% endif %} {% if currency.enabled %} - + {{ 'disable_currency'|_ }} {% endif %} {% if not currency.enabled %} - + {{ 'enable_currency'|_ }} {% endif %} @@ -101,6 +101,8 @@ {% block scripts %} {% endblock %} diff --git a/resources/views/v1/list/groups.twig b/resources/views/v1/list/groups.twig index e799367791..1ce20727fe 100644 --- a/resources/views/v1/list/groups.twig +++ b/resources/views/v1/list/groups.twig @@ -85,7 +85,7 @@ class="fa fa-fw fa-pencil"> {{ 'edit'|_ }}
  • {{ 'delete'|_ }}
  • -
  • {{ 'clone'|_ }}
  • @@ -249,7 +249,7 @@ class="fa fa-fw fa-pencil"> {{ 'edit'|_ }}
  • {{ 'delete'|_ }}
  • -
  • {{ 'clone'|_ }}
  • + diff --git a/resources/views/v1/transactions/show.twig b/resources/views/v1/transactions/show.twig index 668c9c3609..f00d0303bd 100644 --- a/resources/views/v1/transactions/show.twig +++ b/resources/views/v1/transactions/show.twig @@ -35,9 +35,8 @@ {# clone #} {% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %} -
  • -
  • {{ 'clone'|_ }}
  • +
  • {{ 'clone'|_ }}
  • {% endif %} @@ -208,9 +207,8 @@ {# clone #} {% if groupArray.transactions[0].type != 'opening balance' and groupArray.transactions[0].type != 'reconciliation' %} - -
  • {{ 'clone'|_ }}
  • +
  • {{ 'clone'|_ }}
  • {% endif %}
  • {{ 'link_transaction'|_ }}
  • @@ -219,7 +217,6 @@
  • {{ 'create_recurring_from_transaction'|_ }}
  • -
    @@ -425,6 +422,7 @@ var modalDialogURI = '{{ route('transactions.link.modal', ['%JOURNAL%']) }}'; var acURI = '{{ route('api.v1.autocomplete.transactions-with-id') }}'; var groupURI = '{{ route('transactions.show',['%GROUP%']) }}'; + var cloneGroupUrl = '{{ route('transactions.clone') }}'; diff --git a/routes/web.php b/routes/web.php index d9b42c4b44..5452cae5dc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -338,8 +338,8 @@ Route::group( Route::get('edit/{currency}', ['uses' => 'CurrencyController@edit', 'as' => 'edit']); Route::get('delete/{currency}', ['uses' => 'CurrencyController@delete', 'as' => 'delete']); Route::post('default', ['uses' => 'CurrencyController@defaultCurrency', 'as' => 'default']); - Route::get('enable/{currency}', ['uses' => 'CurrencyController@enableCurrency', 'as' => 'enable']); - Route::get('disable/{currency}', ['uses' => 'CurrencyController@disableCurrency', 'as' => 'disable']); + Route::post('enable', ['uses' => 'CurrencyController@enableCurrency', 'as' => 'enable']); + Route::post('disable', ['uses' => 'CurrencyController@disableCurrency', 'as' => 'disable']); Route::post('store', ['uses' => 'CurrencyController@store', 'as' => 'store']); Route::post('update/{currency}', ['uses' => 'CurrencyController@update', 'as' => 'update']); @@ -1012,7 +1012,7 @@ Route::group( Route::post('store', ['uses' => 'Transaction\CreateController@store', 'as' => 'store']); // clone group - Route::get('clone/{transactionGroup}', ['uses' => 'Transaction\CreateController@cloneGroup', 'as' => 'clone']); + Route::post('clone', ['uses' => 'Transaction\CreateController@cloneGroup', 'as' => 'clone']); // edit group Route::get('edit/{transactionGroup}', ['uses' => 'Transaction\EditController@edit', 'as' => 'edit']); From 71ff4b8fe03293bb914db370e2e163ec524fdff1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 23 Sep 2021 19:33:00 +0200 Subject: [PATCH 19/30] Update composer file. --- composer.lock | 65 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/composer.lock b/composer.lock index 29a14c5ef1..3588370974 100644 --- a/composer.lock +++ b/composer.lock @@ -3165,20 +3165,20 @@ }, { "name": "nette/utils", - "version": "v3.2.3", + "version": "v3.2.5", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822" + "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822", - "reference": "5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822", + "url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e", + "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e", "shasum": "" }, "require": { - "php": ">=7.2 <8.1" + "php": ">=7.2 <8.2" }, "conflict": { "nette/di": "<3.0.6" @@ -3244,9 +3244,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.3" + "source": "https://github.com/nette/utils/tree/v3.2.5" }, - "time": "2021-08-16T21:05:00+00:00" + "time": "2021-09-20T10:50:11+00:00" }, { "name": "nyholm/psr7", @@ -8381,16 +8381,16 @@ }, { "name": "filp/whoops", - "version": "2.14.1", + "version": "2.14.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "15ead64e9828f0fc90932114429c4f7923570cb1" + "reference": "89584ce67dd32307f1063cc43846674f4679feda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/15ead64e9828f0fc90932114429c4f7923570cb1", - "reference": "15ead64e9828f0fc90932114429c4f7923570cb1", + "url": "https://api.github.com/repos/filp/whoops/zipball/89584ce67dd32307f1063cc43846674f4679feda", + "reference": "89584ce67dd32307f1063cc43846674f4679feda", "shasum": "" }, "require": { @@ -8440,7 +8440,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.1" + "source": "https://github.com/filp/whoops/tree/2.14.3" }, "funding": [ { @@ -8448,7 +8448,7 @@ "type": "github" } ], - "time": "2021-08-29T12:00:00+00:00" + "time": "2021-09-19T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -8768,16 +8768,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.12.0", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -8818,9 +8818,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "time": "2021-07-21T10:44:31+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "nunomaduro/larastan", @@ -9141,16 +9141,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", "shasum": "" }, "require": { @@ -9158,7 +9158,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -9184,9 +9185,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-09-17T15:28:14+00:00" }, { "name": "phpspec/prophecy", @@ -9847,12 +9848,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "94b1ad0f093b41a6cfccbe1272026cbc1ebaad5c" + "reference": "4911abe63afbbba425931f44a3c62fc002973935" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/94b1ad0f093b41a6cfccbe1272026cbc1ebaad5c", - "reference": "94b1ad0f093b41a6cfccbe1272026cbc1ebaad5c", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4911abe63afbbba425931f44a3c62fc002973935", + "reference": "4911abe63afbbba425931f44a3c62fc002973935", "shasum": "" }, "conflict": { @@ -10044,7 +10045,7 @@ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.1.1", + "pimcore/pimcore": "<10.1.3", "pocketmine/pocketmine-mp": "<3.15.4", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", @@ -10179,7 +10180,7 @@ "yiisoft/yii2-jui": "<2.0.4", "yiisoft/yii2-redis": "<2.0.8", "yoast-seo-for-typo3/yoast_seo": "<7.2.3", - "yourls/yourls": "<=1.8.1", + "yourls/yourls": "<=1.8.2", "zendesk/zendesk_api_client_php": "<2.2.11", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -10240,7 +10241,7 @@ "type": "tidelift" } ], - "time": "2021-09-14T21:02:42+00:00" + "time": "2021-09-20T21:03:12+00:00" }, { "name": "sebastian/cli-parser", From bf30b8027e5280f8ed0ecbf76623aa9a5423bda2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 23 Sep 2021 19:47:24 +0200 Subject: [PATCH 20/30] Experimental update composer file. --- composer.json | 19 +- composer.lock | 4175 +------------------------------------------------ 2 files changed, 15 insertions(+), 4179 deletions(-) diff --git a/composer.json b/composer.json index 8f22c23e49..42b75c7753 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,7 @@ } ], "require": { - "php": ">=8.0.0", + "php": ">=8", "ext-bcmath": "*", "ext-curl": "*", "ext-fileinfo": "*", @@ -104,22 +104,7 @@ "pragmarx/google2fa": "^8.0", "predis/predis": "^1.1", "ramsey/uuid": "^4.1", - "rcrowe/twigbridge": "^0.12.1", - "spatie/data-transfer-object": "^3.1" - }, - "require-dev": { - "barryvdh/laravel-debugbar": "^3.3", - "barryvdh/laravel-ide-helper": "2.*", - "ergebnis/phpstan-rules": "^0.15.0", - "filp/whoops": "2.*", - "fakerphp/faker": "1.*", - "mockery/mockery": "1.*", - "nunomaduro/larastan": "^0.7.11", - "phpstan/phpstan": "^0.12.94", - "phpstan/phpstan-deprecation-rules": "^0.12.5", - "phpunit/phpunit": "^9.5", - "roave/security-advisories": "dev-master", - "thecodingmachine/phpstan-strict-rules": "^0.12.0" + "rcrowe/twigbridge": "^0.12.1" }, "suggest": { "directorytree/ldaprecord-laravel": "If you want to login using LDAP.", diff --git a/composer.lock b/composer.lock index 3588370974..c8aafe2a10 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c19a37b351fec82778f5d1acf69dd7d7", + "content-hash": "7f8c062f8d740d4f2e27aa895067387c", "packages": [ { "name": "bacon/bacon-qr-code", @@ -4248,30 +4248,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4292,9 +4292,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { "name": "psr/simple-cache", @@ -4644,72 +4644,6 @@ }, "time": "2020-10-14T18:14:32+00:00" }, - { - "name": "spatie/data-transfer-object", - "version": "3.7.2", - "source": { - "type": "git", - "url": "https://github.com/spatie/data-transfer-object.git", - "reference": "56fcac4ba39c9307a9514d49d3435f8a48409bee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/56fcac4ba39c9307a9514d49d3435f8a48409bee", - "reference": "56fcac4ba39c9307a9514d49d3435f8a48409bee", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "illuminate/collections": "^8.36", - "jetbrains/phpstorm-attributes": "^1.0", - "larapack/dd": "^1.1", - "phpunit/phpunit": "^9.0" - }, - "suggest": { - "phpstan/phpstan": "Take advantage of checkUninitializedProperties with \\Spatie\\DataTransferObject\\PHPstan\\PropertiesAreAlwaysInitializedExtension" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\DataTransferObject\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brent Roose", - "email": "brent@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Data transfer objects with batteries included", - "homepage": "https://github.com/spatie/data-transfer-object", - "keywords": [ - "data-transfer-object", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/data-transfer-object/issues", - "source": "https://github.com/spatie/data-transfer-object/tree/3.7.2" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-09-17T04:04:12+00:00" - }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.7", @@ -7473,4097 +7407,14 @@ "time": "2021-03-09T10:59:23+00:00" } ], - "packages-dev": [ - { - "name": "barryvdh/laravel-debugbar", - "version": "v3.6.2", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", - "shasum": "" - }, - "require": { - "illuminate/routing": "^6|^7|^8", - "illuminate/session": "^6|^7|^8", - "illuminate/support": "^6|^7|^8", - "maximebf/debugbar": "^1.16.3", - "php": ">=7.2", - "symfony/debug": "^4.3|^5", - "symfony/finder": "^4.3|^5" - }, - "require-dev": { - "mockery/mockery": "^1.3.3", - "orchestra/testbench-dusk": "^4|^5|^6", - "phpunit/phpunit": "^8.5|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facade" - } - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2021-06-14T14:29:26+00:00" - }, - { - "name": "barryvdh/laravel-ide-helper", - "version": "v2.10.0", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/73b1012b927633a1b4cd623c2e6b1678e6faef08", - "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08", - "shasum": "" - }, - "require": { - "barryvdh/reflection-docblock": "^2.0.6", - "composer/composer": "^1.6 || ^2", - "doctrine/dbal": "^2.6 || ^3", - "ext-json": "*", - "illuminate/console": "^8", - "illuminate/filesystem": "^8", - "illuminate/support": "^8", - "nikic/php-parser": "^4.7", - "php": "^7.3 || ^8.0", - "phpdocumentor/type-resolver": "^1.1.0" - }, - "require-dev": { - "ext-pdo_sqlite": "*", - "friendsofphp/php-cs-fixer": "^2", - "illuminate/config": "^8", - "illuminate/view": "^8", - "mockery/mockery": "^1.4", - "orchestra/testbench": "^6", - "phpunit/phpunit": "^8.5 || ^9", - "spatie/phpunit-snapshot-assertions": "^3 || ^4", - "vimeo/psalm": "^3.12" - }, - "suggest": { - "illuminate/events": "Required for automatic helper generation (^6|^7|^8)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.9-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\LaravelIdeHelper\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", - "keywords": [ - "autocomplete", - "codeintel", - "helper", - "ide", - "laravel", - "netbeans", - "phpdoc", - "phpstorm", - "sublime" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", - "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.10.0" - }, - "funding": [ - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2021-04-09T06:17:55+00:00" - }, - { - "name": "barryvdh/reflection-docblock", - "version": "v2.0.6", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/ReflectionDocBlock.git", - "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", - "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0,<4.5" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Barryvdh": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "support": { - "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.0.6" - }, - "time": "2018-12-13T10:34:14+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.2.10", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.10" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-06-07T13:58:28+00:00" - }, - { - "name": "composer/composer", - "version": "2.1.8", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "24d38e9686092de05214cafa187dc282a5d89497" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497", - "reference": "24d38e9686092de05214cafa187dc282a5d89497", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0", - "justinrainbow/json-schema": "^5.2.11", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0", - "react/promise": "^1.2 || ^2.7", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" - }, - "require-dev": { - "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.1.8" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-09-15T11:55:15+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/semver", - "version": "3.2.5", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-05-24T12:41:47+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.5", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "de30328a7af8680efdc03e396aad24befd513200" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", - "reference": "de30328a7af8680efdc03e396aad24befd513200", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-12-03T16:04:16+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-07-31T17:03:58+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "ergebnis/phpstan-rules", - "version": "0.15.3", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/78a3dd88893cf3250ba339843503dcea7e9bee64", - "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "nikic/php-parser": "^4.2.3", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "~0.11.15 || ~0.12.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.9.0", - "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "^2.5.1", - "ergebnis/test-util": "^1.3.0", - "infection/infection": "~0.15.3", - "nette/di": "^3.0.1", - "phpstan/phpstan-deprecation-rules": "~0.11.2", - "phpstan/phpstan-strict-rules": "~0.11.1", - "phpunit/phpunit": "^8.5.8", - "psalm/plugin-phpunit": "~0.12.2", - "psr/container": "^1.0.0", - "vimeo/psalm": "^3.18", - "zendframework/zend-servicemanager": "^2.0.0" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\PHPStan\\Rules\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides additional rules for phpstan/phpstan.", - "homepage": "https://github.com/ergebnis/phpstan-rules", - "keywords": [ - "PHPStan", - "phpstan-extreme-rules", - "phpstan-rules" - ], - "support": { - "issues": "https://github.com/ergebnis/phpstan-rules/issues", - "source": "https://github.com/ergebnis/phpstan-rules" - }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2020-10-30T09:50:34+00:00" - }, - { - "name": "fakerphp/faker", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/FakerPHP/Faker.git", - "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", - "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.2" - }, - "conflict": { - "fzaninotto/faker": "*" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" - }, - "suggest": { - "ext-curl": "Required by Faker\\Provider\\Image to download images.", - "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", - "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", - "ext-mbstring": "Required for multibyte Unicode string functionality." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.16-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "support": { - "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" - }, - "time": "2021-09-06T14:53:37+00:00" - }, - { - "name": "filp/whoops", - "version": "2.14.3", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "89584ce67dd32307f1063cc43846674f4679feda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/89584ce67dd32307f1063cc43846674f4679feda", - "reference": "89584ce67dd32307f1063cc43846674f4679feda", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.3" - }, - "funding": [ - { - "url": "https://github.com/denis-sokolov", - "type": "github" - } - ], - "time": "2021-09-19T12:00:00+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0|^8.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" - }, - "time": "2020-07-09T08:09:16+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.11", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" - }, - "time": "2021-07-22T09:24:00+00:00" - }, - { - "name": "maximebf/debugbar", - "version": "v1.17.1", - "source": { - "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", - "shasum": "" - }, - "require": { - "php": "^7.1|^8", - "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3|^4|^5" - }, - "require-dev": { - "phpunit/phpunit": "^7.5.20 || ^9.4.2" - }, - "suggest": { - "kriswallsmith/assetic": "The best way to manage assets", - "monolog/monolog": "Log using Monolog", - "predis/predis": "Redis storage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.17-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\": "src/DebugBar/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": [ - "debug", - "debugbar" - ], - "support": { - "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" - }, - "time": "2021-08-01T09:19:02+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.4.4", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", - "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" - }, - "conflict": { - "phpunit/phpunit": "<8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.4" - }, - "time": "2021-09-13T15:28:59+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.13.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" - }, - "time": "2021-09-20T12:20:58+00:00" - }, - { - "name": "nunomaduro/larastan", - "version": "v0.7.12", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/larastan.git", - "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/b2da312efe88d501aeeb867ba857e8c4198d43c0", - "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0", - "shasum": "" - }, - "require": { - "composer/composer": "^1.0 || ^2.0", - "ext-json": "*", - "illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "mockery/mockery": "^0.9 || ^1.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^0.12.90", - "symfony/process": "^4.3 || ^5.0 || ^6.0" - }, - "require-dev": { - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^7.3 || ^8.2 || ^9.3" - }, - "suggest": { - "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.6-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Larastan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", - "keywords": [ - "PHPStan", - "code analyse", - "code analysis", - "larastan", - "laravel", - "package", - "php", - "static analysis" - ], - "support": { - "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/v0.7.12" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/canvural", - "type": "github" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2021-07-26T12:12:39+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" - }, - "time": "2021-09-17T15:28:14+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.14.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" - }, - "time": "2021-09-10T09:02:12+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "0.12.99", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2021-09-12T20:09:55+00:00" - }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "0.12.6", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^0.12.60" - }, - "require-dev": { - "phing/phing": "^2.16.3", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/0.12.6" - }, - "time": "2020-12-13T10:20:54+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-09-17T05:39:03+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-08-31T06:47:40+00:00" - }, - { - "name": "react/promise", - "version": "v2.8.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" - }, - "time": "2020-05-12T15:16:56+00:00" - }, - { - "name": "roave/security-advisories", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "4911abe63afbbba425931f44a3c62fc002973935" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4911abe63afbbba425931f44a3c62fc002973935", - "reference": "4911abe63afbbba425931f44a3c62fc002973935", - "shasum": "" - }, - "conflict": { - "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.12", - "akaunting/akaunting": "<2.1.13", - "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", - "amazing/media2click": ">=1,<1.3.3", - "amphp/artax": "<1.0.6|>=2,<2.0.6", - "amphp/http": "<1.0.1", - "amphp/http-client": ">=4,<4.4", - "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", - "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", - "aws/aws-sdk-php": ">=3,<3.2.1", - "bagisto/bagisto": "<0.1.5", - "barrelstrength/sprout-base-email": "<1.2.7", - "barrelstrength/sprout-forms": "<3.9", - "baserproject/basercms": "<=4.5", - "billz/raspap-webgui": "<=2.6.6", - "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", - "bolt/bolt": "<3.7.2", - "bolt/core": "<4.1.13", - "brightlocal/phpwhois": "<=4.2.5", - "buddypress/buddypress": "<5.1.2", - "bugsnag/bugsnag-laravel": ">=2,<2.0.2", - "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", - "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", - "cartalyst/sentry": "<=2.1.6", - "centreon/centreon": "<20.10.7", - "cesnet/simplesamlphp-module-proxystatistics": "<3.1", - "codeception/codeception": "<3.1.3|>=4,<4.1.22", - "codeigniter/framework": "<=3.0.6", - "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", - "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/core": ">=2,<3.5.39", - "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", - "contao/listing-bundle": ">=4,<4.4.8", - "craftcms/cms": "<3.6.7", - "croogo/croogo": "<3.0.7", - "datadog/dd-trace": ">=0.30,<0.30.2", - "david-garcia/phpwhois": "<=4.3.1", - "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", - "directmailteam/direct-mail": "<5.2.4", - "doctrine/annotations": ">=1,<1.2.7", - "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", - "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", - "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2", - "doctrine/doctrine-bundle": "<1.5.2", - "doctrine/doctrine-module": "<=0.7.1", - "doctrine/mongodb-odm": ">=1,<1.0.2", - "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<14|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", - "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", - "dweeves/magmi": "<=0.7.24", - "ecodev/newsletter": "<=4", - "endroid/qr-code-bundle": "<3.4.2", - "enshrined/svg-sanitize": "<0.13.1", - "erusev/parsedown": "<1.7.2", - "ether/logs": "<3.0.4", - "ezsystems/demobundle": ">=5.4,<5.4.6.1", - "ezsystems/ez-support-tools": ">=2.2,<2.2.3", - "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", - "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", - "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", - "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", - "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<=1.3.1", - "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", - "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", - "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", - "ezsystems/repository-forms": ">=2.3,<2.3.2.1", - "ezyang/htmlpurifier": "<4.1.1", - "facade/ignition": "<1.16.14|>=2,<2.4.2|>=2.5,<2.5.2", - "feehi/cms": "<=2.1.1", - "feehi/feehicms": "<=0.1.3", - "firebase/php-jwt": "<2", - "flarum/core": ">=1,<=1.0.1", - "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", - "flarum/tags": "<=0.1-beta.13", - "fluidtypo3/vhs": "<5.1.1", - "fooman/tcpdf": "<6.2.22", - "forkcms/forkcms": "<=5.9.2", - "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<6.5.1", - "friendsofsymfony/oauth2-php": "<1.3", - "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", - "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", - "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", - "froala/wysiwyg-editor": "<3.2.7", - "fuel/core": "<1.8.1", - "getgrav/grav": "<=1.7.10", - "getkirby/cms": "<=3.5.6", - "getkirby/panel": "<2.5.14", - "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", - "gree/jose": "<=2.2", - "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.6", - "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", - "helloxz/imgurl": "<=2.31", - "ibexa/post-install": "<=1.0.4", - "icecoder/icecoder": "<=8", - "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", - "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.26|>=7,<8.40", - "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", - "illuminate/view": ">=7,<7.1.2", - "impresscms/impresscms": "<=1.4.2", - "in2code/femanager": "<5.5.1|>=6,<6.3.1", - "intelliants/subrion": "<=4.2.1", - "ivankristianto/phpwhois": "<=4.3", - "james-heinrich/getid3": "<1.9.9", - "joomla/archive": "<1.1.10", - "joomla/session": "<1.3.1", - "jsmitty12/phpwhois": "<5.1", - "kazist/phpwhois": "<=4.2.6", - "kitodo/presentation": "<3.1.2", - "klaviyo/magento2-extension": ">=1,<3", - "kreait/firebase-php": ">=3.2,<3.8.1", - "la-haute-societe/tcpdf": "<6.2.22", - "laminas/laminas-http": "<2.14.2", - "laravel/framework": "<6.20.26|>=7,<8.40", - "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", - "lavalite/cms": "<=5.8", - "league/commonmark": "<0.18.3", - "league/flysystem": "<1.1.4|>=2,<2.1.1", - "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<21.1", - "livewire/livewire": ">2.2.4,<2.2.6", - "lms/routes": "<2.1.1", - "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", - "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", - "magento/magento1ce": "<1.9.4.3", - "magento/magento1ee": ">=1,<1.14.4.3", - "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", - "marcwillmann/turn": "<0.3.3", - "mautic/core": "<4|= 2.13.1", - "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", - "miniorange/miniorange-saml": "<1.4.3", - "mittwald/typo3_forum": "<1.2.1", - "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", - "namshi/jose": "<2.2", - "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", - "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", - "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", - "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<=2.1.27.36", - "nukeviet/nukeviet": "<4.3.4", - "nystudio107/craft-seomatic": "<3.3", - "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", - "october/backend": "<1.1.2", - "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", - "october/october": ">=1.0.319,<1.0.466", - "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.472|>=1.1.1,<1.1.5", - "onelogin/php-saml": "<2.10.4", - "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", - "opencart/opencart": "<=3.0.3.2", - "openid/php-openid": "<2.3", - "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", - "orchid/platform": ">=9,<9.4.4", - "oro/crm": ">=1.7,<1.7.4", - "oro/platform": ">=1.7,<1.7.4", - "padraic/humbug_get_contents": "<1.1.2", - "pagarme/pagarme-php": ">=0,<3", - "pagekit/pagekit": "<=1.0.18", - "paragonie/random_compat": "<2", - "passbolt/passbolt_api": "<2.11", - "paypal/merchant-sdk-php": "<3.12", - "pear/archive_tar": "<1.4.14", - "personnummer/personnummer": "<3.0.2", - "phanan/koel": "<5.1.4", - "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", - "phpmailer/phpmailer": "<6.5", - "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", - "phpoffice/phpexcel": "<1.8.2", - "phpoffice/phpspreadsheet": "<1.16", - "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", - "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", - "phpwhois/phpwhois": "<=4.2.5", - "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.1.3", - "pocketmine/pocketmine-mp": "<3.15.4", - "pressbooks/pressbooks": "<5.18", - "prestashop/autoupgrade": ">=4,<4.10.1", - "prestashop/contactform": ">1.0.1,<4.3", - "prestashop/gamification": "<2.3.2", - "prestashop/productcomments": ">=4,<4.2.1", - "prestashop/ps_emailsubscription": "<2.6.1", - "prestashop/ps_facetedsearch": "<3.4.1", - "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", - "propel/propel": ">=2-alpha.1,<=2-alpha.7", - "propel/propel1": ">=1,<=1.7.1", - "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", - "pusher/pusher-php-server": "<2.2.1", - "pwweb/laravel-core": "<=0.3.6-beta", - "rainlab/debugbar-plugin": "<3.1", - "rmccue/requests": ">=1.6,<1.8", - "robrichards/xmlseclibs": "<3.0.4", - "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", - "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", - "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", - "sensiolabs/connect": "<4.2.3", - "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.3", - "shopware/platform": "<=6.4.3", - "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.6.10", - "showdoc/showdoc": "<=2.9.8", - "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", - "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", - "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", - "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", - "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.7.4", - "silverstripe/graphql": "<=3.5|>=4-alpha.1,<4-alpha.2", - "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", - "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", - "silverstripe/subsites": ">=2,<2.1.1", - "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", - "silverstripe/userforms": "<3", - "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.18.6", - "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", - "simplito/elliptic-php": "<1.0.6", - "slim/slim": "<2.6", - "smarty/smarty": "<3.1.39", - "socalnick/scn-social-auth": "<1.15.2", - "socialiteproviders/steam": "<1.1", - "spoonity/tcpdf": "<6.2.22", - "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<0.29.2", - "stormpath/sdk": ">=0,<9.9.99", - "studio-42/elfinder": "<2.1.59", - "subrion/cms": "<=4.2.1", - "sulu/sulu": "<1.6.41|>=2,<2.0.10|>=2.1,<2.1.1", - "swiftmailer/swiftmailer": ">=4,<5.4.5", - "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", - "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", - "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", - "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", - "symbiote/silverstripe-versionedfiles": "<=2.0.3", - "symfont/process": ">=0,<4", - "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", - "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", - "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", - "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", - "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", - "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", - "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", - "symfony/mime": ">=4.3,<4.3.8", - "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/polyfill": ">=1,<1.10", - "symfony/polyfill-php55": ">=1,<1.10", - "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", - "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", - "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", - "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.24|>=5,<5.2.9|>=5.3,<5.3.2", - "symfony/translation": ">=2,<2.0.17", - "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", - "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", - "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", - "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", - "t3/dce": ">=2.2,<2.6.2", - "t3g/svg-sanitizer": "<1.0.3", - "tecnickcom/tcpdf": "<6.2.22", - "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1-beta.1,<2.1.3", - "theonedemon/phpwhois": "<=4.2.5", - "titon/framework": ">=0,<9.9.99", - "topthink/think": "<=6.0.9", - "tribalsystems/zenario": "<8.8.53370", - "truckersmp/phpwhois": "<=4.3.1", - "twig/twig": "<1.38|>=2,<2.7", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", - "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", - "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", - "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", - "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", - "ua-parser/uap-php": "<3.8", - "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", - "vanilla/safecurl": "<0.9.2", - "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", - "vrana/adminer": "<4.7.9", - "wallabag/tcpdf": "<6.2.22", - "webcoast/deferred-image-processing": "<1.0.2", - "wikimedia/parsoid": "<0.12.2", - "willdurand/js-translation-bundle": "<2.1.1", - "wp-cli/wp-cli": "<2.5", - "yidashi/yii2cmf": "<=2", - "yii2mod/yii2-cms": "<1.9.2", - "yiisoft/yii": ">=1.1.14,<1.1.15", - "yiisoft/yii2": "<2.0.38", - "yiisoft/yii2-bootstrap": "<2.0.4", - "yiisoft/yii2-dev": "<2.0.43", - "yiisoft/yii2-elasticsearch": "<2.0.5", - "yiisoft/yii2-gii": "<2.0.4", - "yiisoft/yii2-jui": "<2.0.4", - "yiisoft/yii2-redis": "<2.0.8", - "yoast-seo-for-typo3/yoast_seo": "<7.2.3", - "yourls/yourls": "<=1.8.2", - "zendesk/zendesk_api_client_php": "<2.2.11", - "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", - "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", - "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", - "zendframework/zend-diactoros": ">=1,<1.8.4", - "zendframework/zend-feed": ">=1,<2.10.3", - "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-http": ">=1,<2.8.1", - "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", - "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", - "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", - "zendframework/zend-validator": ">=2.3,<2.3.6", - "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zendframework": "<=3", - "zendframework/zendframework1": "<1.12.20", - "zendframework/zendopenid": ">=2,<2.0.2", - "zendframework/zendxml": ">=1,<1.0.1", - "zetacomponents/mail": "<1.8.2", - "zf-commons/zfc-user": "<1.2.2", - "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", - "zfr/zfr-oauth2-server-module": "<0.1.2", - "zoujingli/thinkadmin": "<6.0.22" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "role": "maintainer" - }, - { - "name": "Ilya Tribusean", - "email": "slash3b@gmail.com", - "role": "maintainer" - } - ], - "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "support": { - "issues": "https://github.com/Roave/SecurityAdvisories/issues", - "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", - "type": "tidelift" - } - ], - "time": "2021-09-20T21:03:12+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:24:23+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-11T13:31:12+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.8.3", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2020-11-11T09:19:24+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" - }, - "time": "2021-08-19T21:01:38+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.4.27", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.27" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-22T07:21:39+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-21T12:40:44+00:00" - }, - { - "name": "thecodingmachine/phpstan-strict-rules", - "version": "v0.12.1", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", - "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", - "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0", - "phpstan/phpstan": "^0.12" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.1" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "phpstan-strict-rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "TheCodingMachine\\PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com" - } - ], - "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", - "support": { - "issues": "https://github.com/thecodingmachine/phpstan-strict-rules/issues", - "source": "https://github.com/thecodingmachine/phpstan-strict-rules/tree/master" - }, - "time": "2020-09-08T09:14:10+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - } - ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "roave/security-advisories": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0.0", + "php": ">=8", "ext-bcmath": "*", "ext-curl": "*", "ext-fileinfo": "*", From 6e084e662e856cbe53aafcc1f1eb3bf525aff83e Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 23 Sep 2021 19:56:27 +0200 Subject: [PATCH 21/30] Experimental update composer file. --- composer.json | 49 +- composer.lock | 4173 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 4192 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 42b75c7753..616d779a73 100644 --- a/composer.json +++ b/composer.json @@ -54,20 +54,20 @@ "source": "https://github.com/firefly-iii/firefly-iii", "docs": "https://docs.firefly-iii.org/" }, - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/JC5" - }, - { - "type": "github", - "url": "https://github.com/sponsors/JC5" - }, - { - "type": "paypal", - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L62W7DVD5ETPC&source=url" - } - ], + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/JC5" + }, + { + "type": "github", + "url": "https://github.com/sponsors/JC5" + }, + { + "type": "paypal", + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L62W7DVD5ETPC&source=url" + } + ], "require": { "php": ">=8", "ext-bcmath": "*", @@ -104,7 +104,23 @@ "pragmarx/google2fa": "^8.0", "predis/predis": "^1.1", "ramsey/uuid": "^4.1", - "rcrowe/twigbridge": "^0.12.1" + "rcrowe/twigbridge": "^0.12.1", + "spatie/data-transfer-object": "^3.1", + "psr/log": "<2" + }, + "require-dev": { + "barryvdh/laravel-debugbar": "^3.3", + "barryvdh/laravel-ide-helper": "2.*", + "ergebnis/phpstan-rules": "^0.15.0", + "filp/whoops": "2.*", + "fakerphp/faker": "1.*", + "mockery/mockery": "1.*", + "nunomaduro/larastan": "^0.7.11", + "phpstan/phpstan": "^0.12.94", + "phpstan/phpstan-deprecation-rules": "^0.12.5", + "phpunit/phpunit": "^9.5", + "roave/security-advisories": "dev-master", + "thecodingmachine/phpstan-strict-rules": "^0.12.0" }, "suggest": { "directorytree/ldaprecord-laravel": "If you want to login using LDAP.", @@ -145,7 +161,6 @@ "@php artisan cache:clear", "@php artisan firefly-iii:fix-pgsql-sequences", "@php artisan firefly-iii:decrypt-all", - "@php artisan firefly-iii:transaction-identifiers", "@php artisan firefly-iii:migrate-to-groups", "@php artisan firefly-iii:account-currencies", @@ -163,7 +178,6 @@ "@php artisan firefly-iii:migrate-recurrence-type", "@php artisan firefly-iii:upgrade-liabilities", "@php artisan firefly-iii:create-group-memberships", - "@php artisan firefly-iii:fix-piggies", "@php artisan firefly-iii:create-link-types", "@php artisan firefly-iii:create-access-tokens", @@ -184,7 +198,6 @@ "@php artisan firefly-iii:unify-group-accounts", "@php artisan firefly-iii:fix-transaction-types", "@php artisan firefly-iii:fix-frontpage-accounts", - "@php artisan firefly-iii:report-empty-objects", "@php artisan firefly-iii:report-sum", "@php artisan firefly-iii:restore-oauth-keys", diff --git a/composer.lock b/composer.lock index c8aafe2a10..84ce867d2e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7f8c062f8d740d4f2e27aa895067387c", + "content-hash": "4315b4e2a580e0c46ed41ad6d2c25107", "packages": [ { "name": "bacon/bacon-qr-code", @@ -4248,30 +4248,30 @@ }, { "name": "psr/log", - "version": "2.0.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4292,9 +4292,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -4644,6 +4644,72 @@ }, "time": "2020-10-14T18:14:32+00:00" }, + { + "name": "spatie/data-transfer-object", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/data-transfer-object.git", + "reference": "56fcac4ba39c9307a9514d49d3435f8a48409bee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/56fcac4ba39c9307a9514d49d3435f8a48409bee", + "reference": "56fcac4ba39c9307a9514d49d3435f8a48409bee", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "illuminate/collections": "^8.36", + "jetbrains/phpstorm-attributes": "^1.0", + "larapack/dd": "^1.1", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "phpstan/phpstan": "Take advantage of checkUninitializedProperties with \\Spatie\\DataTransferObject\\PHPstan\\PropertiesAreAlwaysInitializedExtension" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\DataTransferObject\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Roose", + "email": "brent@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Data transfer objects with batteries included", + "homepage": "https://github.com/spatie/data-transfer-object", + "keywords": [ + "data-transfer-object", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/data-transfer-object/issues", + "source": "https://github.com/spatie/data-transfer-object/tree/3.7.2" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2021-09-17T04:04:12+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.7", @@ -7407,10 +7473,4093 @@ "time": "2021-03-09T10:59:23+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.6.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", + "shasum": "" + }, + "require": { + "illuminate/routing": "^6|^7|^8", + "illuminate/session": "^6|^7|^8", + "illuminate/support": "^6|^7|^8", + "maximebf/debugbar": "^1.16.3", + "php": ">=7.2", + "symfony/debug": "^4.3|^5", + "symfony/finder": "^4.3|^5" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^4|^5|^6", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2021-06-14T14:29:26+00:00" + }, + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/73b1012b927633a1b4cd623c2e6b1678e6faef08", + "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08", + "shasum": "" + }, + "require": { + "barryvdh/reflection-docblock": "^2.0.6", + "composer/composer": "^1.6 || ^2", + "doctrine/dbal": "^2.6 || ^3", + "ext-json": "*", + "illuminate/console": "^8", + "illuminate/filesystem": "^8", + "illuminate/support": "^8", + "nikic/php-parser": "^4.7", + "php": "^7.3 || ^8.0", + "phpdocumentor/type-resolver": "^1.1.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "friendsofphp/php-cs-fixer": "^2", + "illuminate/config": "^8", + "illuminate/view": "^8", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^6", + "phpunit/phpunit": "^8.5 || ^9", + "spatie/phpunit-snapshot-assertions": "^3 || ^4", + "vimeo/psalm": "^3.12" + }, + "suggest": { + "illuminate/events": "Required for automatic helper generation (^6|^7|^8)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.9-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.10.0" + }, + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2021-04-09T06:17:55+00:00" + }, + { + "name": "barryvdh/reflection-docblock", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/ReflectionDocBlock.git", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0,<4.5" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Barryvdh": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "support": { + "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.0.6" + }, + "time": "2018-12-13T10:34:14+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.2.10", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-06-07T13:58:28+00:00" + }, + { + "name": "composer/composer", + "version": "2.1.8", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "24d38e9686092de05214cafa187dc282a5d89497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497", + "reference": "24d38e9686092de05214cafa187dc282a5d89497", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/semver": "^3.0", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^2.0", + "justinrainbow/json-schema": "^5.2.11", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0", + "react/promise": "^1.2 || ^2.7", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.1.8" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-09-15T11:55:15+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "de30328a7af8680efdc03e396aad24befd513200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T16:04:16+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-07-31T17:03:58+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "ergebnis/phpstan-rules", + "version": "0.15.3", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/phpstan-rules.git", + "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/78a3dd88893cf3250ba339843503dcea7e9bee64", + "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "nikic/php-parser": "^4.2.3", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "~0.11.15 || ~0.12.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.9.0", + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^2.5.1", + "ergebnis/test-util": "^1.3.0", + "infection/infection": "~0.15.3", + "nette/di": "^3.0.1", + "phpstan/phpstan-deprecation-rules": "~0.11.2", + "phpstan/phpstan-strict-rules": "~0.11.1", + "phpunit/phpunit": "^8.5.8", + "psalm/plugin-phpunit": "~0.12.2", + "psr/container": "^1.0.0", + "vimeo/psalm": "^3.18", + "zendframework/zend-servicemanager": "^2.0.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\PHPStan\\Rules\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides additional rules for phpstan/phpstan.", + "homepage": "https://github.com/ergebnis/phpstan-rules", + "keywords": [ + "PHPStan", + "phpstan-extreme-rules", + "phpstan-rules" + ], + "support": { + "issues": "https://github.com/ergebnis/phpstan-rules/issues", + "source": "https://github.com/ergebnis/phpstan-rules" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2020-10-30T09:50:34+00:00" + }, + { + "name": "fakerphp/faker", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-intl": "*", + "symfony/phpunit-bridge": "^4.4 || ^5.2" + }, + "suggest": { + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.16-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" + }, + "time": "2021-09-06T14:53:37+00:00" + }, + { + "name": "filp/whoops", + "version": "2.14.3", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "89584ce67dd32307f1063cc43846674f4679feda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/89584ce67dd32307f1063cc43846674f4679feda", + "reference": "89584ce67dd32307f1063cc43846674f4679feda", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.3" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2021-09-19T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.11", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" + }, + { + "name": "maximebf/debugbar", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" + }, + "time": "2021-08-01T09:19:02+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.4.4", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.4" + }, + "time": "2021-09-13T15:28:59+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.13.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + }, + "time": "2021-09-20T12:20:58+00:00" + }, + { + "name": "nunomaduro/larastan", + "version": "v0.7.12", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/larastan.git", + "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/b2da312efe88d501aeeb867ba857e8c4198d43c0", + "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0", + "shasum": "" + }, + "require": { + "composer/composer": "^1.0 || ^2.0", + "ext-json": "*", + "illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "mockery/mockery": "^0.9 || ^1.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^0.12.90", + "symfony/process": "^4.3 || ^5.0 || ^6.0" + }, + "require-dev": { + "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "phpunit/phpunit": "^7.3 || ^8.2 || ^9.3" + }, + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.6-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Larastan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/nunomaduro/larastan/issues", + "source": "https://github.com/nunomaduro/larastan/tree/v0.7.12" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/canvural", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-07-26T12:12:39+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + }, + "time": "2021-09-17T15:28:14+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.14.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "0.12.99", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", + "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-09-12T20:09:55+00:00" + }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "0.12.6", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", + "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^0.12.60" + }, + "require-dev": { + "phing/phing": "^2.16.3", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.5.20" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/0.12.6" + }, + "time": "2020-12-13T10:20:54+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.12.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-17T05:39:03+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-08-31T06:47:40+00:00" + }, + { + "name": "react/promise", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.8.0" + }, + "time": "2020-05-12T15:16:56+00:00" + }, + { + "name": "roave/security-advisories", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "4911abe63afbbba425931f44a3c62fc002973935" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4911abe63afbbba425931f44a3c62fc002973935", + "reference": "4911abe63afbbba425931f44a3c62fc002973935", + "shasum": "" + }, + "conflict": { + "3f/pygmentize": "<1.2", + "adodb/adodb-php": "<5.20.12", + "akaunting/akaunting": "<2.1.13", + "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", + "amazing/media2click": ">=1,<1.3.3", + "amphp/artax": "<1.0.6|>=2,<2.0.6", + "amphp/http": "<1.0.1", + "amphp/http-client": ">=4,<4.4", + "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", + "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", + "aws/aws-sdk-php": ">=3,<3.2.1", + "bagisto/bagisto": "<0.1.5", + "barrelstrength/sprout-base-email": "<1.2.7", + "barrelstrength/sprout-forms": "<3.9", + "baserproject/basercms": "<=4.5", + "billz/raspap-webgui": "<=2.6.6", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", + "bolt/bolt": "<3.7.2", + "bolt/core": "<4.1.13", + "brightlocal/phpwhois": "<=4.2.5", + "buddypress/buddypress": "<5.1.2", + "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "cachethq/cachet": "<2.5.1", + "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", + "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cartalyst/sentry": "<=2.1.6", + "centreon/centreon": "<20.10.7", + "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "codeception/codeception": "<3.1.3|>=4,<4.1.22", + "codeigniter/framework": "<=3.0.6", + "codiad/codiad": "<=2.8.4", + "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", + "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/core": ">=2,<3.5.39", + "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", + "contao/listing-bundle": ">=4,<4.4.8", + "craftcms/cms": "<3.6.7", + "croogo/croogo": "<3.0.7", + "datadog/dd-trace": ">=0.30,<0.30.2", + "david-garcia/phpwhois": "<=4.3.1", + "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", + "directmailteam/direct-mail": "<5.2.4", + "doctrine/annotations": ">=1,<1.2.7", + "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", + "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2", + "doctrine/doctrine-bundle": "<1.5.2", + "doctrine/doctrine-module": "<=0.7.1", + "doctrine/mongodb-odm": ">=1,<1.0.2", + "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", + "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", + "dolibarr/dolibarr": "<14|>= 3.3.beta1, < 13.0.2", + "dompdf/dompdf": ">=0.6,<0.6.2", + "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", + "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", + "dweeves/magmi": "<=0.7.24", + "ecodev/newsletter": "<=4", + "endroid/qr-code-bundle": "<3.4.2", + "enshrined/svg-sanitize": "<0.13.1", + "erusev/parsedown": "<1.7.2", + "ether/logs": "<3.0.4", + "ezsystems/demobundle": ">=5.4,<5.4.6.1", + "ezsystems/ez-support-tools": ">=2.2,<2.2.3", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", + "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", + "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", + "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", + "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", + "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", + "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<=1.3.1", + "ezsystems/ezplatform-user": ">=1,<1.0.1", + "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", + "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", + "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", + "ezsystems/repository-forms": ">=2.3,<2.3.2.1", + "ezyang/htmlpurifier": "<4.1.1", + "facade/ignition": "<1.16.14|>=2,<2.4.2|>=2.5,<2.5.2", + "feehi/cms": "<=2.1.1", + "feehi/feehicms": "<=0.1.3", + "firebase/php-jwt": "<2", + "flarum/core": ">=1,<=1.0.1", + "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", + "flarum/tags": "<=0.1-beta.13", + "fluidtypo3/vhs": "<5.1.1", + "fooman/tcpdf": "<6.2.22", + "forkcms/forkcms": "<=5.9.2", + "fossar/tcpdf-parser": "<6.2.22", + "francoisjacquet/rosariosis": "<6.5.1", + "friendsofsymfony/oauth2-php": "<1.3", + "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", + "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", + "froala/wysiwyg-editor": "<3.2.7", + "fuel/core": "<1.8.1", + "getgrav/grav": "<=1.7.10", + "getkirby/cms": "<=3.5.6", + "getkirby/panel": "<2.5.14", + "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", + "gree/jose": "<=2.2", + "gregwar/rst": "<1.0.3", + "grumpydictator/firefly-iii": "<5.6", + "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", + "helloxz/imgurl": "<=2.31", + "ibexa/post-install": "<=1.0.4", + "icecoder/icecoder": "<=8", + "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", + "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", + "illuminate/database": "<6.20.26|>=7,<8.40", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/view": ">=7,<7.1.2", + "impresscms/impresscms": "<=1.4.2", + "in2code/femanager": "<5.5.1|>=6,<6.3.1", + "intelliants/subrion": "<=4.2.1", + "ivankristianto/phpwhois": "<=4.3", + "james-heinrich/getid3": "<1.9.9", + "joomla/archive": "<1.1.10", + "joomla/session": "<1.3.1", + "jsmitty12/phpwhois": "<5.1", + "kazist/phpwhois": "<=4.2.6", + "kitodo/presentation": "<3.1.2", + "klaviyo/magento2-extension": ">=1,<3", + "kreait/firebase-php": ">=3.2,<3.8.1", + "la-haute-societe/tcpdf": "<6.2.22", + "laminas/laminas-http": "<2.14.2", + "laravel/framework": "<6.20.26|>=7,<8.40", + "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", + "lavalite/cms": "<=5.8", + "league/commonmark": "<0.18.3", + "league/flysystem": "<1.1.4|>=2,<2.1.1", + "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", + "librenms/librenms": "<21.1", + "livewire/livewire": ">2.2.4,<2.2.6", + "lms/routes": "<2.1.1", + "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", + "magento/magento1ce": "<1.9.4.3", + "magento/magento1ee": ">=1,<1.14.4.3", + "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", + "marcwillmann/turn": "<0.3.3", + "mautic/core": "<4|= 2.13.1", + "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "miniorange/miniorange-saml": "<1.4.3", + "mittwald/typo3_forum": "<1.2.1", + "monolog/monolog": ">=1.8,<1.12", + "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", + "namshi/jose": "<2.2", + "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", + "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", + "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", + "nilsteampassnet/teampass": "<=2.1.27.36", + "nukeviet/nukeviet": "<4.3.4", + "nystudio107/craft-seomatic": "<3.3", + "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", + "october/backend": "<1.1.2", + "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", + "october/october": ">=1.0.319,<1.0.466", + "october/rain": "<1.0.472|>=1.1,<1.1.2", + "october/system": "<1.0.472|>=1.1.1,<1.1.5", + "onelogin/php-saml": "<2.10.4", + "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", + "opencart/opencart": "<=3.0.3.2", + "openid/php-openid": "<2.3", + "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", + "orchid/platform": ">=9,<9.4.4", + "oro/crm": ">=1.7,<1.7.4", + "oro/platform": ">=1.7,<1.7.4", + "padraic/humbug_get_contents": "<1.1.2", + "pagarme/pagarme-php": ">=0,<3", + "pagekit/pagekit": "<=1.0.18", + "paragonie/random_compat": "<2", + "passbolt/passbolt_api": "<2.11", + "paypal/merchant-sdk-php": "<3.12", + "pear/archive_tar": "<1.4.14", + "personnummer/personnummer": "<3.0.2", + "phanan/koel": "<5.1.4", + "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", + "phpmailer/phpmailer": "<6.5", + "phpmussel/phpmussel": ">=1,<1.6", + "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", + "phpoffice/phpexcel": "<1.8.2", + "phpoffice/phpspreadsheet": "<1.16", + "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", + "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", + "phpwhois/phpwhois": "<=4.2.5", + "phpxmlrpc/extras": "<0.6.1", + "pimcore/pimcore": "<10.1.3", + "pocketmine/pocketmine-mp": "<3.15.4", + "pressbooks/pressbooks": "<5.18", + "prestashop/autoupgrade": ">=4,<4.10.1", + "prestashop/contactform": ">1.0.1,<4.3", + "prestashop/gamification": "<2.3.2", + "prestashop/productcomments": ">=4,<4.2.1", + "prestashop/ps_emailsubscription": "<2.6.1", + "prestashop/ps_facetedsearch": "<3.4.1", + "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", + "propel/propel": ">=2-alpha.1,<=2-alpha.7", + "propel/propel1": ">=1,<=1.7.1", + "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", + "pusher/pusher-php-server": "<2.2.1", + "pwweb/laravel-core": "<=0.3.6-beta", + "rainlab/debugbar-plugin": "<3.1", + "rmccue/requests": ">=1.6,<1.8", + "robrichards/xmlseclibs": "<3.0.4", + "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", + "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", + "sensiolabs/connect": "<4.2.3", + "serluck/phpwhois": "<=4.2.6", + "shopware/core": "<=6.4.3", + "shopware/platform": "<=6.4.3", + "shopware/production": "<=6.3.5.2", + "shopware/shopware": "<5.6.10", + "showdoc/showdoc": "<=2.9.8", + "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", + "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", + "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", + "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", + "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", + "silverstripe/framework": "<4.7.4", + "silverstripe/graphql": "<=3.5|>=4-alpha.1,<4-alpha.2", + "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", + "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", + "silverstripe/subsites": ">=2,<2.1.1", + "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", + "silverstripe/userforms": "<3", + "simple-updates/phpwhois": "<=1", + "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", + "simplesamlphp/simplesamlphp": "<1.18.6", + "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "simplito/elliptic-php": "<1.0.6", + "slim/slim": "<2.6", + "smarty/smarty": "<3.1.39", + "socalnick/scn-social-auth": "<1.15.2", + "socialiteproviders/steam": "<1.1", + "spoonity/tcpdf": "<6.2.22", + "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "ssddanbrown/bookstack": "<0.29.2", + "stormpath/sdk": ">=0,<9.9.99", + "studio-42/elfinder": "<2.1.59", + "subrion/cms": "<=4.2.1", + "sulu/sulu": "<1.6.41|>=2,<2.0.10|>=2.1,<2.1.1", + "swiftmailer/swiftmailer": ">=4,<5.4.5", + "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", + "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", + "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", + "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", + "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", + "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", + "symbiote/silverstripe-versionedfiles": "<=2.0.3", + "symfont/process": ">=0,<4", + "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", + "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", + "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", + "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", + "symfony/mime": ">=4.3,<4.3.8", + "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill-php55": ">=1,<1.10", + "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/routing": ">=2,<2.0.19", + "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", + "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", + "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", + "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", + "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", + "symfony/serializer": ">=2,<2.0.11", + "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.24|>=5,<5.2.9|>=5.3,<5.3.2", + "symfony/translation": ">=2,<2.0.17", + "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", + "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "t3/dce": ">=2.2,<2.6.2", + "t3g/svg-sanitizer": "<1.0.3", + "tecnickcom/tcpdf": "<6.2.22", + "thelia/backoffice-default-template": ">=2.1,<2.1.2", + "thelia/thelia": ">=2.1-beta.1,<2.1.3", + "theonedemon/phpwhois": "<=4.2.5", + "titon/framework": ">=0,<9.9.99", + "topthink/think": "<=6.0.9", + "tribalsystems/zenario": "<8.8.53370", + "truckersmp/phpwhois": "<=4.3.1", + "twig/twig": "<1.38|>=2,<2.7", + "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", + "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", + "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", + "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", + "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", + "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", + "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", + "ua-parser/uap-php": "<3.8", + "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", + "vanilla/safecurl": "<0.9.2", + "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", + "vrana/adminer": "<4.7.9", + "wallabag/tcpdf": "<6.2.22", + "webcoast/deferred-image-processing": "<1.0.2", + "wikimedia/parsoid": "<0.12.2", + "willdurand/js-translation-bundle": "<2.1.1", + "wp-cli/wp-cli": "<2.5", + "yidashi/yii2cmf": "<=2", + "yii2mod/yii2-cms": "<1.9.2", + "yiisoft/yii": ">=1.1.14,<1.1.15", + "yiisoft/yii2": "<2.0.38", + "yiisoft/yii2-bootstrap": "<2.0.4", + "yiisoft/yii2-dev": "<2.0.43", + "yiisoft/yii2-elasticsearch": "<2.0.5", + "yiisoft/yii2-gii": "<2.0.4", + "yiisoft/yii2-jui": "<2.0.4", + "yiisoft/yii2-redis": "<2.0.8", + "yoast-seo-for-typo3/yoast_seo": "<7.2.3", + "yourls/yourls": "<=1.8.2", + "zendesk/zendesk_api_client_php": "<2.2.11", + "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", + "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", + "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", + "zendframework/zend-diactoros": ">=1,<1.8.4", + "zendframework/zend-feed": ">=1,<2.10.3", + "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-http": ">=1,<2.8.1", + "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", + "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", + "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-validator": ">=2.3,<2.3.6", + "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zendframework": "<=3", + "zendframework/zendframework1": "<1.12.20", + "zendframework/zendopenid": ">=2,<2.0.2", + "zendframework/zendxml": ">=1,<1.0.1", + "zetacomponents/mail": "<1.8.2", + "zf-commons/zfc-user": "<1.2.2", + "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", + "zfr/zfr-oauth2-server-module": "<0.1.2", + "zoujingli/thinkadmin": "<6.0.22" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "role": "maintainer" + }, + { + "name": "Ilya Tribusean", + "email": "slash3b@gmail.com", + "role": "maintainer" + } + ], + "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "support": { + "issues": "https://github.com/Roave/SecurityAdvisories/issues", + "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2021-09-20T21:03:12+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.8.3", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-11-11T09:19:24+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" + }, + "time": "2021-08-19T21:01:38+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.4.27", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "^3.4|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-22T07:21:39+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:40:44+00:00" + }, + { + "name": "thecodingmachine/phpstan-strict-rules", + "version": "v0.12.1", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", + "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", + "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0", + "phpstan/phpstan": "^0.12" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^7.1" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "phpstan-strict-rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" + } + ], + "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", + "support": { + "issues": "https://github.com/thecodingmachine/phpstan-strict-rules/issues", + "source": "https://github.com/thecodingmachine/phpstan-strict-rules/tree/master" + }, + "time": "2020-09-08T09:14:10+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "roave/security-advisories": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From b06d296a44493a1ff15007c04168064b68493431 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 23 Sep 2021 20:03:39 +0200 Subject: [PATCH 22/30] Step by step. --- composer.json | 15 +- composer.lock | 4089 +------------------------------------------------ 2 files changed, 4 insertions(+), 4100 deletions(-) diff --git a/composer.json b/composer.json index 616d779a73..cfd6a16029 100644 --- a/composer.json +++ b/composer.json @@ -108,20 +108,7 @@ "spatie/data-transfer-object": "^3.1", "psr/log": "<2" }, - "require-dev": { - "barryvdh/laravel-debugbar": "^3.3", - "barryvdh/laravel-ide-helper": "2.*", - "ergebnis/phpstan-rules": "^0.15.0", - "filp/whoops": "2.*", - "fakerphp/faker": "1.*", - "mockery/mockery": "1.*", - "nunomaduro/larastan": "^0.7.11", - "phpstan/phpstan": "^0.12.94", - "phpstan/phpstan-deprecation-rules": "^0.12.5", - "phpunit/phpunit": "^9.5", - "roave/security-advisories": "dev-master", - "thecodingmachine/phpstan-strict-rules": "^0.12.0" - }, + "suggest": { "directorytree/ldaprecord-laravel": "If you want to login using LDAP.", "ext-ldap": "Needed to support LDAP." diff --git a/composer.lock b/composer.lock index 84ce867d2e..8ce7a4600a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4315b4e2a580e0c46ed41ad6d2c25107", + "content-hash": "f71284c03d79d3d1f8b3edfff2dc3779", "packages": [ { "name": "bacon/bacon-qr-code", @@ -7473,4093 +7473,10 @@ "time": "2021-03-09T10:59:23+00:00" } ], - "packages-dev": [ - { - "name": "barryvdh/laravel-debugbar", - "version": "v3.6.2", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", - "shasum": "" - }, - "require": { - "illuminate/routing": "^6|^7|^8", - "illuminate/session": "^6|^7|^8", - "illuminate/support": "^6|^7|^8", - "maximebf/debugbar": "^1.16.3", - "php": ">=7.2", - "symfony/debug": "^4.3|^5", - "symfony/finder": "^4.3|^5" - }, - "require-dev": { - "mockery/mockery": "^1.3.3", - "orchestra/testbench-dusk": "^4|^5|^6", - "phpunit/phpunit": "^8.5|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.5-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facade" - } - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - }, - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2021-06-14T14:29:26+00:00" - }, - { - "name": "barryvdh/laravel-ide-helper", - "version": "v2.10.0", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/73b1012b927633a1b4cd623c2e6b1678e6faef08", - "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08", - "shasum": "" - }, - "require": { - "barryvdh/reflection-docblock": "^2.0.6", - "composer/composer": "^1.6 || ^2", - "doctrine/dbal": "^2.6 || ^3", - "ext-json": "*", - "illuminate/console": "^8", - "illuminate/filesystem": "^8", - "illuminate/support": "^8", - "nikic/php-parser": "^4.7", - "php": "^7.3 || ^8.0", - "phpdocumentor/type-resolver": "^1.1.0" - }, - "require-dev": { - "ext-pdo_sqlite": "*", - "friendsofphp/php-cs-fixer": "^2", - "illuminate/config": "^8", - "illuminate/view": "^8", - "mockery/mockery": "^1.4", - "orchestra/testbench": "^6", - "phpunit/phpunit": "^8.5 || ^9", - "spatie/phpunit-snapshot-assertions": "^3 || ^4", - "vimeo/psalm": "^3.12" - }, - "suggest": { - "illuminate/events": "Required for automatic helper generation (^6|^7|^8)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.9-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Barryvdh\\LaravelIdeHelper\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", - "keywords": [ - "autocomplete", - "codeintel", - "helper", - "ide", - "laravel", - "netbeans", - "phpdoc", - "phpstorm", - "sublime" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", - "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.10.0" - }, - "funding": [ - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2021-04-09T06:17:55+00:00" - }, - { - "name": "barryvdh/reflection-docblock", - "version": "v2.0.6", - "source": { - "type": "git", - "url": "https://github.com/barryvdh/ReflectionDocBlock.git", - "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", - "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0,<4.5" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Barryvdh": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "support": { - "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.0.6" - }, - "time": "2018-12-13T10:34:14+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.2.10", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.10" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-06-07T13:58:28+00:00" - }, - { - "name": "composer/composer", - "version": "2.1.8", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "24d38e9686092de05214cafa187dc282a5d89497" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497", - "reference": "24d38e9686092de05214cafa187dc282a5d89497", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0", - "justinrainbow/json-schema": "^5.2.11", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0", - "react/promise": "^1.2 || ^2.7", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" - }, - "require-dev": { - "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.1.8" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-09-15T11:55:15+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/semver", - "version": "3.2.5", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-05-24T12:41:47+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.5", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "de30328a7af8680efdc03e396aad24befd513200" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", - "reference": "de30328a7af8680efdc03e396aad24befd513200", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-12-03T16:04:16+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-07-31T17:03:58+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "ergebnis/phpstan-rules", - "version": "0.15.3", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/phpstan-rules.git", - "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/78a3dd88893cf3250ba339843503dcea7e9bee64", - "reference": "78a3dd88893cf3250ba339843503dcea7e9bee64", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "nikic/php-parser": "^4.2.3", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "~0.11.15 || ~0.12.0" - }, - "require-dev": { - "ergebnis/composer-normalize": "^2.9.0", - "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "^2.5.1", - "ergebnis/test-util": "^1.3.0", - "infection/infection": "~0.15.3", - "nette/di": "^3.0.1", - "phpstan/phpstan-deprecation-rules": "~0.11.2", - "phpstan/phpstan-strict-rules": "~0.11.1", - "phpunit/phpunit": "^8.5.8", - "psalm/plugin-phpunit": "~0.12.2", - "psr/container": "^1.0.0", - "vimeo/psalm": "^3.18", - "zendframework/zend-servicemanager": "^2.0.0" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\PHPStan\\Rules\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides additional rules for phpstan/phpstan.", - "homepage": "https://github.com/ergebnis/phpstan-rules", - "keywords": [ - "PHPStan", - "phpstan-extreme-rules", - "phpstan-rules" - ], - "support": { - "issues": "https://github.com/ergebnis/phpstan-rules/issues", - "source": "https://github.com/ergebnis/phpstan-rules" - }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2020-10-30T09:50:34+00:00" - }, - { - "name": "fakerphp/faker", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/FakerPHP/Faker.git", - "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", - "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.2" - }, - "conflict": { - "fzaninotto/faker": "*" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" - }, - "suggest": { - "ext-curl": "Required by Faker\\Provider\\Image to download images.", - "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", - "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", - "ext-mbstring": "Required for multibyte Unicode string functionality." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.16-dev" - } - }, - "autoload": { - "psr-4": { - "Faker\\": "src/Faker/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "François Zaninotto" - } - ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ], - "support": { - "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" - }, - "time": "2021-09-06T14:53:37+00:00" - }, - { - "name": "filp/whoops", - "version": "2.14.3", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "89584ce67dd32307f1063cc43846674f4679feda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/89584ce67dd32307f1063cc43846674f4679feda", - "reference": "89584ce67dd32307f1063cc43846674f4679feda", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ], - "support": { - "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.3" - }, - "funding": [ - { - "url": "https://github.com/denis-sokolov", - "type": "github" - } - ], - "time": "2021-09-19T12:00:00+00:00" - }, - { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0|^8.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "hamcrest" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" - ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" - }, - "time": "2020-07-09T08:09:16+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.11", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" - }, - "time": "2021-07-22T09:24:00+00:00" - }, - { - "name": "maximebf/debugbar", - "version": "v1.17.1", - "source": { - "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", - "shasum": "" - }, - "require": { - "php": "^7.1|^8", - "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3|^4|^5" - }, - "require-dev": { - "phpunit/phpunit": "^7.5.20 || ^9.4.2" - }, - "suggest": { - "kriswallsmith/assetic": "The best way to manage assets", - "monolog/monolog": "Log using Monolog", - "predis/predis": "Redis storage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.17-dev" - } - }, - "autoload": { - "psr-4": { - "DebugBar\\": "src/DebugBar/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maxime Bouroumeau-Fuseau", - "email": "maxime.bouroumeau@gmail.com", - "homepage": "http://maximebf.com" - }, - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "Debug bar in the browser for php application", - "homepage": "https://github.com/maximebf/php-debugbar", - "keywords": [ - "debug", - "debugbar" - ], - "support": { - "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" - }, - "time": "2021-08-01T09:19:02+00:00" - }, - { - "name": "mockery/mockery", - "version": "1.4.4", - "source": { - "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", - "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", - "shasum": "" - }, - "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" - }, - "conflict": { - "phpunit/phpunit": "<8.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.4" - }, - "time": "2021-09-13T15:28:59+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.13.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" - }, - "time": "2021-09-20T12:20:58+00:00" - }, - { - "name": "nunomaduro/larastan", - "version": "v0.7.12", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/larastan.git", - "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/b2da312efe88d501aeeb867ba857e8c4198d43c0", - "reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0", - "shasum": "" - }, - "require": { - "composer/composer": "^1.0 || ^2.0", - "ext-json": "*", - "illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "mockery/mockery": "^0.9 || ^1.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^0.12.90", - "symfony/process": "^4.3 || ^5.0 || ^6.0" - }, - "require-dev": { - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^7.3 || ^8.2 || ^9.3" - }, - "suggest": { - "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.6-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Larastan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", - "keywords": [ - "PHPStan", - "code analyse", - "code analysis", - "larastan", - "laravel", - "package", - "php", - "static analysis" - ], - "support": { - "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/v0.7.12" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/canvural", - "type": "github" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2021-07-26T12:12:39+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" - }, - "time": "2021-09-17T15:28:14+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.14.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" - }, - "time": "2021-09-10T09:02:12+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "0.12.99", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2021-09-12T20:09:55+00:00" - }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "0.12.6", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^0.12.60" - }, - "require-dev": { - "phing/phing": "^2.16.3", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/0.12.6" - }, - "time": "2020-12-13T10:20:54+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-09-17T05:39:03+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-08-31T06:47:40+00:00" - }, - { - "name": "react/promise", - "version": "v2.8.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" - }, - "time": "2020-05-12T15:16:56+00:00" - }, - { - "name": "roave/security-advisories", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "4911abe63afbbba425931f44a3c62fc002973935" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4911abe63afbbba425931f44a3c62fc002973935", - "reference": "4911abe63afbbba425931f44a3c62fc002973935", - "shasum": "" - }, - "conflict": { - "3f/pygmentize": "<1.2", - "adodb/adodb-php": "<5.20.12", - "akaunting/akaunting": "<2.1.13", - "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", - "amazing/media2click": ">=1,<1.3.3", - "amphp/artax": "<1.0.6|>=2,<2.0.6", - "amphp/http": "<1.0.1", - "amphp/http-client": ">=4,<4.4", - "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6", - "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", - "aws/aws-sdk-php": ">=3,<3.2.1", - "bagisto/bagisto": "<0.1.5", - "barrelstrength/sprout-base-email": "<1.2.7", - "barrelstrength/sprout-forms": "<3.9", - "baserproject/basercms": "<=4.5", - "billz/raspap-webgui": "<=2.6.6", - "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", - "bolt/bolt": "<3.7.2", - "bolt/core": "<4.1.13", - "brightlocal/phpwhois": "<=4.2.5", - "buddypress/buddypress": "<5.1.2", - "bugsnag/bugsnag-laravel": ">=2,<2.0.2", - "cachethq/cachet": "<2.5.1", - "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7", - "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", - "cartalyst/sentry": "<=2.1.6", - "centreon/centreon": "<20.10.7", - "cesnet/simplesamlphp-module-proxystatistics": "<3.1", - "codeception/codeception": "<3.1.3|>=4,<4.1.22", - "codeigniter/framework": "<=3.0.6", - "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", - "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/core": ">=2,<3.5.39", - "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0", - "contao/listing-bundle": ">=4,<4.4.8", - "craftcms/cms": "<3.6.7", - "croogo/croogo": "<3.0.7", - "datadog/dd-trace": ">=0.30,<0.30.2", - "david-garcia/phpwhois": "<=4.3.1", - "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", - "directmailteam/direct-mail": "<5.2.4", - "doctrine/annotations": ">=1,<1.2.7", - "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", - "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", - "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2", - "doctrine/doctrine-bundle": "<1.5.2", - "doctrine/doctrine-module": "<=0.7.1", - "doctrine/mongodb-odm": ">=1,<1.0.2", - "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<14|>= 3.3.beta1, < 13.0.2", - "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", - "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", - "dweeves/magmi": "<=0.7.24", - "ecodev/newsletter": "<=4", - "endroid/qr-code-bundle": "<3.4.2", - "enshrined/svg-sanitize": "<0.13.1", - "erusev/parsedown": "<1.7.2", - "ether/logs": "<3.0.4", - "ezsystems/demobundle": ">=5.4,<5.4.6.1", - "ezsystems/ez-support-tools": ">=2.2,<2.2.3", - "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", - "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", - "ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24", - "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", - "ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1", - "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1", - "ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<=1.3.1", - "ezsystems/ezplatform-user": ">=1,<1.0.1", - "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1", - "ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1", - "ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3", - "ezsystems/repository-forms": ">=2.3,<2.3.2.1", - "ezyang/htmlpurifier": "<4.1.1", - "facade/ignition": "<1.16.14|>=2,<2.4.2|>=2.5,<2.5.2", - "feehi/cms": "<=2.1.1", - "feehi/feehicms": "<=0.1.3", - "firebase/php-jwt": "<2", - "flarum/core": ">=1,<=1.0.1", - "flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15", - "flarum/tags": "<=0.1-beta.13", - "fluidtypo3/vhs": "<5.1.1", - "fooman/tcpdf": "<6.2.22", - "forkcms/forkcms": "<=5.9.2", - "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<6.5.1", - "friendsofsymfony/oauth2-php": "<1.3", - "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", - "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", - "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", - "froala/wysiwyg-editor": "<3.2.7", - "fuel/core": "<1.8.1", - "getgrav/grav": "<=1.7.10", - "getkirby/cms": "<=3.5.6", - "getkirby/panel": "<2.5.14", - "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", - "gree/jose": "<=2.2", - "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<5.6", - "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", - "helloxz/imgurl": "<=2.31", - "ibexa/post-install": "<=1.0.4", - "icecoder/icecoder": "<=8", - "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", - "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.26|>=7,<8.40", - "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", - "illuminate/view": ">=7,<7.1.2", - "impresscms/impresscms": "<=1.4.2", - "in2code/femanager": "<5.5.1|>=6,<6.3.1", - "intelliants/subrion": "<=4.2.1", - "ivankristianto/phpwhois": "<=4.3", - "james-heinrich/getid3": "<1.9.9", - "joomla/archive": "<1.1.10", - "joomla/session": "<1.3.1", - "jsmitty12/phpwhois": "<5.1", - "kazist/phpwhois": "<=4.2.6", - "kitodo/presentation": "<3.1.2", - "klaviyo/magento2-extension": ">=1,<3", - "kreait/firebase-php": ">=3.2,<3.8.1", - "la-haute-societe/tcpdf": "<6.2.22", - "laminas/laminas-http": "<2.14.2", - "laravel/framework": "<6.20.26|>=7,<8.40", - "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", - "lavalite/cms": "<=5.8", - "league/commonmark": "<0.18.3", - "league/flysystem": "<1.1.4|>=2,<2.1.1", - "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", - "librenms/librenms": "<21.1", - "livewire/livewire": ">2.2.4,<2.2.6", - "lms/routes": "<2.1.1", - "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", - "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", - "magento/magento1ce": "<1.9.4.3", - "magento/magento1ee": ">=1,<1.14.4.3", - "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", - "marcwillmann/turn": "<0.3.3", - "mautic/core": "<4|= 2.13.1", - "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", - "miniorange/miniorange-saml": "<1.4.3", - "mittwald/typo3_forum": "<1.2.1", - "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10,<3.10.2", - "namshi/jose": "<2.2", - "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", - "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", - "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", - "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<=2.1.27.36", - "nukeviet/nukeviet": "<4.3.4", - "nystudio107/craft-seomatic": "<3.3", - "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", - "october/backend": "<1.1.2", - "october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469", - "october/october": ">=1.0.319,<1.0.466", - "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<1.0.472|>=1.1.1,<1.1.5", - "onelogin/php-saml": "<2.10.4", - "oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5", - "opencart/opencart": "<=3.0.3.2", - "openid/php-openid": "<2.3", - "openmage/magento-lts": "<19.4.15|>=20,<20.0.13", - "orchid/platform": ">=9,<9.4.4", - "oro/crm": ">=1.7,<1.7.4", - "oro/platform": ">=1.7,<1.7.4", - "padraic/humbug_get_contents": "<1.1.2", - "pagarme/pagarme-php": ">=0,<3", - "pagekit/pagekit": "<=1.0.18", - "paragonie/random_compat": "<2", - "passbolt/passbolt_api": "<2.11", - "paypal/merchant-sdk-php": "<3.12", - "pear/archive_tar": "<1.4.14", - "personnummer/personnummer": "<3.0.2", - "phanan/koel": "<5.1.4", - "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", - "phpmailer/phpmailer": "<6.5", - "phpmussel/phpmussel": ">=1,<1.6", - "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3", - "phpoffice/phpexcel": "<1.8.2", - "phpoffice/phpspreadsheet": "<1.16", - "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7", - "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", - "phpwhois/phpwhois": "<=4.2.5", - "phpxmlrpc/extras": "<0.6.1", - "pimcore/pimcore": "<10.1.3", - "pocketmine/pocketmine-mp": "<3.15.4", - "pressbooks/pressbooks": "<5.18", - "prestashop/autoupgrade": ">=4,<4.10.1", - "prestashop/contactform": ">1.0.1,<4.3", - "prestashop/gamification": "<2.3.2", - "prestashop/productcomments": ">=4,<4.2.1", - "prestashop/ps_emailsubscription": "<2.6.1", - "prestashop/ps_facetedsearch": "<3.4.1", - "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", - "propel/propel": ">=2-alpha.1,<=2-alpha.7", - "propel/propel1": ">=1,<=1.7.1", - "pterodactyl/panel": "<0.7.19|>=1-rc.0,<=1-rc.6", - "pusher/pusher-php-server": "<2.2.1", - "pwweb/laravel-core": "<=0.3.6-beta", - "rainlab/debugbar-plugin": "<3.1", - "rmccue/requests": ">=1.6,<1.8", - "robrichards/xmlseclibs": "<3.0.4", - "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", - "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", - "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", - "sensiolabs/connect": "<4.2.3", - "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.3", - "shopware/platform": "<=6.4.3", - "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<5.6.10", - "showdoc/showdoc": "<=2.9.8", - "silverstripe/admin": ">=1.0.3,<1.0.4|>=1.1,<1.1.1", - "silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2", - "silverstripe/cms": "<4.3.6|>=4.4,<4.4.4", - "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", - "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.7.4", - "silverstripe/graphql": "<=3.5|>=4-alpha.1,<4-alpha.2", - "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", - "silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4", - "silverstripe/subsites": ">=2,<2.1.1", - "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", - "silverstripe/userforms": "<3", - "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.18.6", - "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", - "simplito/elliptic-php": "<1.0.6", - "slim/slim": "<2.6", - "smarty/smarty": "<3.1.39", - "socalnick/scn-social-auth": "<1.15.2", - "socialiteproviders/steam": "<1.1", - "spoonity/tcpdf": "<6.2.22", - "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", - "ssddanbrown/bookstack": "<0.29.2", - "stormpath/sdk": ">=0,<9.9.99", - "studio-42/elfinder": "<2.1.59", - "subrion/cms": "<=4.2.1", - "sulu/sulu": "<1.6.41|>=2,<2.0.10|>=2.1,<2.1.1", - "swiftmailer/swiftmailer": ">=4,<5.4.5", - "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", - "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", - "sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5", - "symbiote/silverstripe-multivaluefield": ">=3,<3.0.99", - "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", - "symbiote/silverstripe-versionedfiles": "<=2.0.3", - "symfont/process": ">=0,<4", - "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", - "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", - "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", - "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7", - "symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5", - "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", - "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", - "symfony/mime": ">=4.3,<4.3.8", - "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/polyfill": ">=1,<1.10", - "symfony/polyfill-php55": ">=1,<1.10", - "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/routing": ">=2,<2.0.19", - "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", - "symfony/security-bundle": ">=2,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", - "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", - "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2", - "symfony/serializer": ">=2,<2.0.11", - "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.24|>=5,<5.2.9|>=5.3,<5.3.2", - "symfony/translation": ">=2,<2.0.17", - "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", - "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", - "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", - "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", - "t3/dce": ">=2.2,<2.6.2", - "t3g/svg-sanitizer": "<1.0.3", - "tecnickcom/tcpdf": "<6.2.22", - "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1-beta.1,<2.1.3", - "theonedemon/phpwhois": "<=4.2.5", - "titon/framework": ">=0,<9.9.99", - "topthink/think": "<=6.0.9", - "tribalsystems/zenario": "<8.8.53370", - "truckersmp/phpwhois": "<=4.3.1", - "twig/twig": "<1.38|>=2,<2.7", - "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", - "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.3.2", - "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", - "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", - "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", - "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", - "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", - "ua-parser/uap-php": "<3.8", - "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", - "vanilla/safecurl": "<0.9.2", - "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", - "vrana/adminer": "<4.7.9", - "wallabag/tcpdf": "<6.2.22", - "webcoast/deferred-image-processing": "<1.0.2", - "wikimedia/parsoid": "<0.12.2", - "willdurand/js-translation-bundle": "<2.1.1", - "wp-cli/wp-cli": "<2.5", - "yidashi/yii2cmf": "<=2", - "yii2mod/yii2-cms": "<1.9.2", - "yiisoft/yii": ">=1.1.14,<1.1.15", - "yiisoft/yii2": "<2.0.38", - "yiisoft/yii2-bootstrap": "<2.0.4", - "yiisoft/yii2-dev": "<2.0.43", - "yiisoft/yii2-elasticsearch": "<2.0.5", - "yiisoft/yii2-gii": "<2.0.4", - "yiisoft/yii2-jui": "<2.0.4", - "yiisoft/yii2-redis": "<2.0.8", - "yoast-seo-for-typo3/yoast_seo": "<7.2.3", - "yourls/yourls": "<=1.8.2", - "zendesk/zendesk_api_client_php": "<2.2.11", - "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", - "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", - "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", - "zendframework/zend-developer-tools": ">=1.2.2,<1.2.3", - "zendframework/zend-diactoros": ">=1,<1.8.4", - "zendframework/zend-feed": ">=1,<2.10.3", - "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-http": ">=1,<2.8.1", - "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", - "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", - "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", - "zendframework/zend-validator": ">=2.3,<2.3.6", - "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", - "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", - "zendframework/zendframework": "<=3", - "zendframework/zendframework1": "<1.12.20", - "zendframework/zendopenid": ">=2,<2.0.2", - "zendframework/zendxml": ">=1,<1.0.1", - "zetacomponents/mail": "<1.8.2", - "zf-commons/zfc-user": "<1.2.2", - "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", - "zfr/zfr-oauth2-server-module": "<0.1.2", - "zoujingli/thinkadmin": "<6.0.22" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "role": "maintainer" - }, - { - "name": "Ilya Tribusean", - "email": "slash3b@gmail.com", - "role": "maintainer" - } - ], - "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "support": { - "issues": "https://github.com/Roave/SecurityAdvisories/issues", - "source": "https://github.com/Roave/SecurityAdvisories/tree/latest" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", - "type": "tidelift" - } - ], - "time": "2021-09-20T21:03:12+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:24:23+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-11T13:31:12+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.8.3", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2020-11-11T09:19:24+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" - }, - "time": "2021-08-19T21:01:38+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.4.27", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.27" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-22T07:21:39+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-21T12:40:44+00:00" - }, - { - "name": "thecodingmachine/phpstan-strict-rules", - "version": "v0.12.1", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/phpstan-strict-rules.git", - "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/phpstan-strict-rules/zipball/4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", - "reference": "4bb334f6f637ebfba83cfdc7392d549a8a3fbba7", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0", - "phpstan/phpstan": "^0.12" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.1" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "phpstan-strict-rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "TheCodingMachine\\PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com" - } - ], - "description": "A set of additional rules for PHPStan based on best practices followed at TheCodingMachine", - "support": { - "issues": "https://github.com/thecodingmachine/phpstan-strict-rules/issues", - "source": "https://github.com/thecodingmachine/phpstan-strict-rules/tree/master" - }, - "time": "2020-09-08T09:14:10+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - } - ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "roave/security-advisories": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 9b7ed217879d1c03d4c5e164c5d5a0b7993dee0d Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 23 Sep 2021 20:07:34 +0200 Subject: [PATCH 23/30] Clean up packages. --- composer.json | 9 +- composer.lock | 3340 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 3346 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index cfd6a16029..8510eac58c 100644 --- a/composer.json +++ b/composer.json @@ -108,7 +108,14 @@ "spatie/data-transfer-object": "^3.1", "psr/log": "<2" }, - + "require-dev": { + "barryvdh/laravel-debugbar": "^3.3", + "barryvdh/laravel-ide-helper": "2.*", + "filp/whoops": "2.*", + "fakerphp/faker": "1.*", + "mockery/mockery": "1.*", + "phpunit/phpunit": "^9.5" + }, "suggest": { "directorytree/ldaprecord-laravel": "If you want to login using LDAP.", "ext-ldap": "Needed to support LDAP." diff --git a/composer.lock b/composer.lock index 8ce7a4600a..87429056b1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f71284c03d79d3d1f8b3edfff2dc3779", + "content-hash": "85a7949576623326d884a1d9c516c271", "packages": [ { "name": "bacon/bacon-qr-code", @@ -7473,7 +7473,3343 @@ "time": "2021-03-09T10:59:23+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.6.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", + "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", + "shasum": "" + }, + "require": { + "illuminate/routing": "^6|^7|^8", + "illuminate/session": "^6|^7|^8", + "illuminate/support": "^6|^7|^8", + "maximebf/debugbar": "^1.16.3", + "php": ">=7.2", + "symfony/debug": "^4.3|^5", + "symfony/finder": "^4.3|^5" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "orchestra/testbench-dusk": "^4|^5|^6", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.5-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2021-06-14T14:29:26+00:00" + }, + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.10.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/73b1012b927633a1b4cd623c2e6b1678e6faef08", + "reference": "73b1012b927633a1b4cd623c2e6b1678e6faef08", + "shasum": "" + }, + "require": { + "barryvdh/reflection-docblock": "^2.0.6", + "composer/composer": "^1.6 || ^2", + "doctrine/dbal": "^2.6 || ^3", + "ext-json": "*", + "illuminate/console": "^8", + "illuminate/filesystem": "^8", + "illuminate/support": "^8", + "nikic/php-parser": "^4.7", + "php": "^7.3 || ^8.0", + "phpdocumentor/type-resolver": "^1.1.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "friendsofphp/php-cs-fixer": "^2", + "illuminate/config": "^8", + "illuminate/view": "^8", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^6", + "phpunit/phpunit": "^8.5 || ^9", + "spatie/phpunit-snapshot-assertions": "^3 || ^4", + "vimeo/psalm": "^3.12" + }, + "suggest": { + "illuminate/events": "Required for automatic helper generation (^6|^7|^8)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.9-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.10.0" + }, + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2021-04-09T06:17:55+00:00" + }, + { + "name": "barryvdh/reflection-docblock", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/ReflectionDocBlock.git", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0,<4.5" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Barryvdh": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "support": { + "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.0.6" + }, + "time": "2018-12-13T10:34:14+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.2.10", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-06-07T13:58:28+00:00" + }, + { + "name": "composer/composer", + "version": "2.1.8", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "24d38e9686092de05214cafa187dc282a5d89497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497", + "reference": "24d38e9686092de05214cafa187dc282a5d89497", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/semver": "^3.0", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^2.0", + "justinrainbow/json-schema": "^5.2.11", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0", + "react/promise": "^1.2 || ^2.7", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.1.8" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-09-15T11:55:15+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "de30328a7af8680efdc03e396aad24befd513200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T16:04:16+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-07-31T17:03:58+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "fakerphp/faker", + "version": "v1.16.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2" + }, + "conflict": { + "fzaninotto/faker": "*" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-intl": "*", + "symfony/phpunit-bridge": "^4.4 || ^5.2" + }, + "suggest": { + "ext-curl": "Required by Faker\\Provider\\Image to download images.", + "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", + "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", + "ext-mbstring": "Required for multibyte Unicode string functionality." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v1.16-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" + }, + "time": "2021-09-06T14:53:37+00:00" + }, + { + "name": "filp/whoops", + "version": "2.14.3", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "89584ce67dd32307f1063cc43846674f4679feda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/89584ce67dd32307f1063cc43846674f4679feda", + "reference": "89584ce67dd32307f1063cc43846674f4679feda", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.3" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2021-09-19T12:00:00+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.11", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" + }, + { + "name": "maximebf/debugbar", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", + "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", + "shasum": "" + }, + "require": { + "php": "^7.1|^8", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4|^5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.20 || ^9.4.2" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "support": { + "issues": "https://github.com/maximebf/php-debugbar/issues", + "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" + }, + "time": "2021-08-01T09:19:02+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.4.4", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.4" + }, + "time": "2021-09-13T15:28:59+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.13.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + }, + "time": "2021-09-20T12:20:58+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + }, + "time": "2021-09-17T15:28:14+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.14.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.12.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-17T05:39:03+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-08-31T06:47:40+00:00" + }, + { + "name": "react/promise", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.8.0" + }, + "time": "2020-05-12T15:16:56+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.8.3", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-11-11T09:19:24+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" + }, + "time": "2021-08-19T21:01:38+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.4.27", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "^3.4|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-22T07:21:39+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:40:44+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], From 30c23b51b6cd02c34f7b29b05d7b156a828ed8a1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 25 Sep 2021 05:14:41 +0200 Subject: [PATCH 24/30] Add service worker to ignored urls. fix #5110 --- app/Http/Middleware/StartFireflySession.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/StartFireflySession.php b/app/Http/Middleware/StartFireflySession.php index e2ae331a9a..9c9249f4be 100644 --- a/app/Http/Middleware/StartFireflySession.php +++ b/app/Http/Middleware/StartFireflySession.php @@ -45,7 +45,7 @@ class StartFireflySession extends StartSession $isScriptPage = strpos($uri, 'jscript'); $isDeletePage = strpos($uri, 'delete'); $isLoginPage = strpos($uri, '/login'); - $isJsonPage = strpos($uri, '/json'); + $isJsonPage = strpos($uri, '/json') || strpos($uri, 'serviceworker'); $isView = strpos($uri, '/attachments/view'); // also stop remembering "delete" URL's. From 6c532f99ad61153a785b9f6f70ef1d358ad770e0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 25 Sep 2021 05:32:15 +0200 Subject: [PATCH 25/30] Fix #5104 --- .../Controllers/Account/ShowController.php | 6 +++++ frontend/src/components/accounts/Show.vue | 22 +++++++++++++++++++ frontend/src/locales/en.json | 1 + resources/views/v2/layout/default.twig | 2 +- 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index 52f36a8d32..500c263b24 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -116,6 +116,12 @@ class ShowController extends Controller $firstTransaction = $this->repository->oldestJournalDate($account) ?? $start; $periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end); + // if layout = v2, overrule the page title. + if('v1'!==config('firefly.layout')) { + $subTitle = (string)trans('firefly.all_journals_for_account', ['name' => $account->name]); + } + + /** @var GroupCollectorInterface $collector */ $collector = app(GroupCollectorInterface::class); $collector diff --git a/frontend/src/components/accounts/Show.vue b/frontend/src/components/accounts/Show.vue index 61045ab72f..66210b7a3e 100644 --- a/frontend/src/components/accounts/Show.vue +++ b/frontend/src/components/accounts/Show.vue @@ -106,6 +106,7 @@ export default { perPage: 51, locale: 'en-US', api: null, + nameLoading:false } }, created() { @@ -117,11 +118,30 @@ export default { let params = new URLSearchParams(window.location.search); this.currentPage = params.get('page') ? parseInt(params.get('page')) : 1; this.getTransactions(); + this.updatePageTitle(); }, components: {TransactionListLarge}, methods: { + updatePageTitle: function () { + if (this.showReady && !this.nameLoading) { + // update page title. + this.nameLoading = true; + configureAxios().then(async (api) => { + let url = './api/v1/accounts/' + this.accountId; + api.get(url) + .then(response => { + let start = new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(this.start); + let end = new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(this.end); + document.getElementById('page-subTitle').innerText = this.$t('firefly.journals_in_period_for_account_js', {start: start, end: end, title: response.data.data.attributes.name}); + }); + }); + + } + }, getTransactions: function () { if (this.showReady && !this.loading) { + + this.loading = true; configureAxios().then(async (api) => { // console.log('Now getTransactions() x Start'); @@ -153,9 +173,11 @@ export default { watch: { start: function () { this.getTransactions(); + this.updatePageTitle(); }, end: function () { this.getTransactions(); + this.updatePageTitle(); }, } diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index edb6e51662..267b35fbce 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -70,6 +70,7 @@ "daily_budgets": "Daily budgets", "weekly_budgets": "Weekly budgets", "monthly_budgets": "Monthly budgets", + "journals_in_period_for_account_js": "All transactions for account {title} between {start} and {end}", "quarterly_budgets": "Quarterly budgets", "create_new_expense": "Create new expense account", "create_new_revenue": "Create new revenue account", diff --git a/resources/views/v2/layout/default.twig b/resources/views/v2/layout/default.twig index 21cb1f65da..7ffd5d14ae 100644 --- a/resources/views/v2/layout/default.twig +++ b/resources/views/v2/layout/default.twig @@ -51,7 +51,7 @@ {{ title }} {% if subTitleIcon|default(false) %}{% endif %} - {{ subTitle|default('') }} + {{ subTitle|default('') }}
    {% block breadcrumbs %}{% endblock %} From 8ec556f8ae99e7e3b34a71a702fb75701ae75fea Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 25 Sep 2021 05:35:29 +0200 Subject: [PATCH 26/30] Fix #5101 --- public/v1/js/ff/list/groups.js | 6 +++--- resources/views/v1/list/groups.twig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/v1/js/ff/list/groups.js b/public/v1/js/ff/list/groups.js index a18a1cca6e..7ae1bcd98b 100644 --- a/public/v1/js/ff/list/groups.js +++ b/public/v1/js/ff/list/groups.js @@ -199,9 +199,9 @@ function updateActionButtons() { $('.action-menu').show(); // also update labels: - $('.mass-edit span').text(edit_selected_txt + ' (' + count + ')'); - $('.bulk-edit span').text(edit_bulk_selected_txt + ' (' + count + ')'); - $('.mass-delete span').text(delete_selected_txt + ' (' + count + ')'); + $('.mass-edit span.txt').text(edit_selected_txt + ' (' + count + ')'); + $('.bulk-edit span.txt').text(edit_bulk_selected_txt + ' (' + count + ')'); + $('.mass-delete span.txt').text(delete_selected_txt + ' (' + count + ')'); } if (0 === count) { diff --git a/resources/views/v1/list/groups.twig b/resources/views/v1/list/groups.twig index 1ce20727fe..08f9db5ec0 100644 --- a/resources/views/v1/list/groups.twig +++ b/resources/views/v1/list/groups.twig @@ -15,11 +15,11 @@
    From 138b60c462f41876465d1c66ed24110b38fcdc3a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 25 Sep 2021 06:30:35 +0200 Subject: [PATCH 27/30] Update various translations. --- resources/lang/cs_CZ/config.php | 2 +- resources/lang/de_DE/config.php | 2 +- resources/lang/de_DE/errors.php | 2 +- resources/lang/en_US/firefly.php | 1 + resources/lang/it_IT/errors.php | 6 +++--- resources/lang/it_IT/validation.php | 14 +++++++------- resources/lang/nl_NL/errors.php | 6 +++--- resources/lang/pt_BR/errors.php | 6 +++--- resources/lang/sk_SK/config.php | 6 +++--- resources/lang/sv_SE/errors.php | 6 +++--- 10 files changed, 26 insertions(+), 25 deletions(-) diff --git a/resources/lang/cs_CZ/config.php b/resources/lang/cs_CZ/config.php index 62360256a2..5c364e1cd2 100644 --- a/resources/lang/cs_CZ/config.php +++ b/resources/lang/cs_CZ/config.php @@ -41,7 +41,7 @@ return [ 'date_time_js' => 'D. MMMM YYYY, @ HH:mm:ss', 'specific_day_js' => 'D. MMMM YYYY', 'week_in_year_js' => '[Week] t, RRRR', - 'week_in_year_fns' => "\"týden\" w, yyyy", + 'week_in_year_fns' => "'týden' w, yyyy", 'year_js' => 'YYYY', 'half_year_js' => 'Q YYYY', 'quarter_fns' => "Q'Q, yyyy", diff --git a/resources/lang/de_DE/config.php b/resources/lang/de_DE/config.php index 72bcf85493..4f59dadea1 100644 --- a/resources/lang/de_DE/config.php +++ b/resources/lang/de_DE/config.php @@ -28,7 +28,7 @@ return [ 'month' => '%B %Y', 'month_and_day' => '%e. %B %Y', 'month_and_day_moment_js' => 'DD. MMM. YYYY', - 'month_and_day_fns' => 'D. MMMM Y', + 'month_and_day_fns' => 'd. MMMM Y', 'month_and_date_day' => '%A, %B %e. %Y', 'month_and_day_no_year' => '%B %e', 'date_time' => '%e %B %Y, @ %T', diff --git a/resources/lang/de_DE/errors.php b/resources/lang/de_DE/errors.php index 477f45fd62..e6007513f0 100644 --- a/resources/lang/de_DE/errors.php +++ b/resources/lang/de_DE/errors.php @@ -48,7 +48,7 @@ return [ 'include_logs' => 'Fehlerprotokolle einschließen (siehe oben).', 'what_did_you_do' => 'Teilen Sie uns mit, was Sie getan haben.', 'offline_header' => 'Sie sind wahrscheinlich offline', - 'offline_unreachable' => 'Firefly III ist nicht erreichbar. Ihr Gerät ist offline oder der Server funktioniert nicht.', + 'offline_unreachable' => 'Firefly III ist nicht erreichbar. Ihr Gerät ist offline oder der Server antwortet nicht.', 'offline_github' => 'Falls Sie sicher sind, dass sowohl Ihr Gerät als auch der Server online sind, öffnen Sie bitte ein Ticket auf GitHub.', ]; diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index cd14a3ff3f..519166247e 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -168,6 +168,7 @@ return [ 'all_journals_for_account' => 'All transactions for account :name', 'chart_all_journals_for_account' => 'Chart of all transactions for account :name', 'journals_in_period_for_account' => 'All transactions for account :name between :start and :end', + 'journals_in_period_for_account_js' => 'All transactions for account {title} between {start} and {end}', 'transferred' => 'Transferred', 'all_withdrawal' => 'All expenses', 'all_transactions' => 'All transactions', diff --git a/resources/lang/it_IT/errors.php b/resources/lang/it_IT/errors.php index 110f94b95f..f76d90e87d 100644 --- a/resources/lang/it_IT/errors.php +++ b/resources/lang/it_IT/errors.php @@ -47,8 +47,8 @@ return [ 'tell_more' => 'Dicci di più di "dice Oops!"', 'include_logs' => 'Includi i log degli errori (vedi sopra).', 'what_did_you_do' => 'Dicci cosa stavi facendo.', - 'offline_header' => 'You are probably offline', - 'offline_unreachable' => 'Firefly III is unreachable. Your device is currently offline or the server is not working.', - 'offline_github' => 'If you are sure both your device and the server are online, please open a ticket on GitHub.', + 'offline_header' => 'Probabilmente sei offline', + 'offline_unreachable' => 'Firefly III non è raggiungibile. Il tuo dispositivo non è attualmente in rete o il server non funziona.', + 'offline_github' => 'Se sei sicuro che sia il tuo dispositivo che il server sono online, apri un ticket su GitHub.', ]; diff --git a/resources/lang/it_IT/validation.php b/resources/lang/it_IT/validation.php index beda02090a..d573652b92 100644 --- a/resources/lang/it_IT/validation.php +++ b/resources/lang/it_IT/validation.php @@ -23,13 +23,13 @@ declare(strict_types=1); return [ - 'missing_where' => 'Array is missing "where"-clause', - 'missing_update' => 'Array is missing "update"-clause', - 'invalid_where_key' => 'JSON contains an invalid key for the "where"-clause', - 'invalid_update_key' => 'JSON contains an invalid key for the "update"-clause', - 'invalid_query_data' => 'There is invalid data in the %s:%s field of your query.', - 'invalid_query_account_type' => 'Your query contains accounts of different types, which is not allowed.', - 'invalid_query_currency' => 'Your query contains accounts that have different currency settings, which is not allowed.', + 'missing_where' => 'Clausola "where" assente nell\'array', + 'missing_update' => 'Clausola "update" assente nell\'array', + 'invalid_where_key' => 'Il JSON contiene una chiave non valida per la clausola "where"', + 'invalid_update_key' => 'Il JSON contiene una chiave non valida per la clausola "update"', + 'invalid_query_data' => 'Data non valida nel campo %s:%s della query.', + 'invalid_query_account_type' => 'La tua interrogazione contiene account di diversi tipi, cosa che non è consentita.', + 'invalid_query_currency' => 'La tua interrogazione contiene conti con valute diverse, che non è consentito.', 'iban' => 'Questo non è un IBAN valido.', 'zero_or_more' => 'Il valore non può essere negativo.', 'date_or_time' => 'Il valore deve essere un valore valido per una data o per un orario (ISO 8601).', diff --git a/resources/lang/nl_NL/errors.php b/resources/lang/nl_NL/errors.php index 2c602089b9..c845cdcf7e 100644 --- a/resources/lang/nl_NL/errors.php +++ b/resources/lang/nl_NL/errors.php @@ -47,8 +47,8 @@ return [ 'tell_more' => 'Meer info dan "hij is stuk" gaarne', 'include_logs' => 'Inclusief foutlogs (zie hierboven).', 'what_did_you_do' => 'Zet er bij wat je deed.', - 'offline_header' => 'You are probably offline', - 'offline_unreachable' => 'Firefly III is unreachable. Your device is currently offline or the server is not working.', - 'offline_github' => 'If you are sure both your device and the server are online, please open a ticket on GitHub.', + 'offline_header' => 'Je bent waarschijnlijk offline', + 'offline_unreachable' => 'Firefly III is onbereikbaar. Je apparaat is momenteel offline of de server werkt niet.', + 'offline_github' => 'Als je zeker weet dat zowel je apparaat als de server online zijn, open dan een ticket op GitHub.', ]; diff --git a/resources/lang/pt_BR/errors.php b/resources/lang/pt_BR/errors.php index 372a458b34..5309c1b147 100644 --- a/resources/lang/pt_BR/errors.php +++ b/resources/lang/pt_BR/errors.php @@ -47,8 +47,8 @@ return [ 'tell_more' => 'Nos diga mais do que "ele retorna Ops!"', 'include_logs' => 'Inclua os logs de erro (veja acima).', 'what_did_you_do' => 'Nos diga o que você estava fazendo.', - 'offline_header' => 'You are probably offline', - 'offline_unreachable' => 'Firefly III is unreachable. Your device is currently offline or the server is not working.', - 'offline_github' => 'If you are sure both your device and the server are online, please open a ticket on GitHub.', + 'offline_header' => 'Você provavelmente está offline', + 'offline_unreachable' => 'O Firefly III está inacessível. Seu dispositivo está offline ou o servidor não está funcionando.', + 'offline_github' => 'Caso você tenha certeza de que seu dispositivo e o servidor estão online, por favor, abra um ticket no GitHub.', ]; diff --git a/resources/lang/sk_SK/config.php b/resources/lang/sk_SK/config.php index 5507bb14c9..19bcb5da6b 100644 --- a/resources/lang/sk_SK/config.php +++ b/resources/lang/sk_SK/config.php @@ -41,11 +41,11 @@ return [ 'date_time_js' => 'D. MMMM YYYY, @ HH:mm:ss', 'specific_day_js' => 'D. MMMM YYYY', 'week_in_year_js' => '[Week] t, RRRR', - 'week_in_year_fns' => "'Týždeň' tt, rrrr", + 'week_in_year_fns' => "'Týždeň' w, yyyy", 'year_js' => 'YYYY', 'half_year_js' => 'Q YYYY', - 'quarter_fns' => "'Q'Q, rrrr", - 'half_year_fns' => "'H{half}', rrrr", + 'quarter_fns' => "'Q'Q, yyyy", + 'half_year_fns' => "'H{half}', yyyy", 'dow_1' => 'Pondelok', 'dow_2' => 'Utorok', 'dow_3' => 'Streda', diff --git a/resources/lang/sv_SE/errors.php b/resources/lang/sv_SE/errors.php index df7084f2fc..1db6f4050e 100644 --- a/resources/lang/sv_SE/errors.php +++ b/resources/lang/sv_SE/errors.php @@ -47,8 +47,8 @@ return [ 'tell_more' => 'Berätta mer än "det står Hoppsan!"', 'include_logs' => 'Inkludera felloggar (se ovan).', 'what_did_you_do' => 'Berätta vad du gjorde.', - 'offline_header' => 'You are probably offline', - 'offline_unreachable' => 'Firefly III is unreachable. Your device is currently offline or the server is not working.', - 'offline_github' => 'If you are sure both your device and the server are online, please open a ticket on GitHub.', + 'offline_header' => 'Du är förmodligen offline', + 'offline_unreachable' => 'Firefly III kan inte nås. Din enhet är för närvarande offline eller servern fungerar inte.', + 'offline_github' => 'Om du är säker på att både din enhet och servern är online, vänligen öppna ett ärende på GitHub.', ]; From dd7344d05dfdd1341a1b648c439f84ddf70296a8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 25 Sep 2021 06:31:12 +0200 Subject: [PATCH 28/30] Fix issue #5100 --- frontend/src/components/bills/Index.vue | 32 ++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/bills/Index.vue b/frontend/src/components/bills/Index.vue index eadd2ea744..0cf3718df5 100644 --- a/frontend/src/components/bills/Index.vue +++ b/frontend/src/components/bills/Index.vue @@ -92,17 +92,33 @@