Merge branch 'release/v6.0.0'

This commit is contained in:
James Cole 2023-03-02 21:21:11 +01:00
commit 1a3720bfaa
434 changed files with 3047 additions and 3455 deletions

View File

@ -737,16 +737,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "3e294254f2191762c1d137aed4b94e966965e985" "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45",
"reference": "3e294254f2191762c1d137aed4b94e966965e985", "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -813,7 +813,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.2.5" "source": "https://github.com/symfony/console/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -829,20 +829,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:38:09+00:00" "time": "2023-02-25T17:00:03+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.2.0", "version": "v3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
"reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -880,7 +880,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1"
}, },
"funding": [ "funding": [
{ {
@ -896,20 +896,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-11-25T10:21:52+00:00" "time": "2023-03-01T10:25:55+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68" "reference": "404b307de426c1c488e5afad64403e5f145e82a5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5",
"reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", "reference": "404b307de426c1c488e5afad64403e5f145e82a5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -963,7 +963,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.2.5" "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -979,20 +979,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:38:09+00:00" "time": "2023-02-14T08:44:56+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
"version": "v3.2.0", "version": "v3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git", "url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "0782b0b52a737a05b4383d0df35a474303cabdae" "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"reference": "0782b0b52a737a05b4383d0df35a474303cabdae", "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1042,7 +1042,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1"
}, },
"funding": [ "funding": [
{ {
@ -1058,20 +1058,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-11-25T10:21:52+00:00" "time": "2023-03-01T10:32:47+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593" "reference": "82b6c62b959f642d000456f08c6d219d749215b3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593", "url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3",
"reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593", "reference": "82b6c62b959f642d000456f08c6d219d749215b3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1105,7 +1105,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v6.2.5" "source": "https://github.com/symfony/filesystem/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -1121,20 +1121,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-20T17:45:48+00:00" "time": "2023-02-14T08:44:56+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c" "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/c90dc446976a612e3312a97a6ec0069ab0c2099c", "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb",
"reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c", "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1169,7 +1169,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v6.2.5" "source": "https://github.com/symfony/finder/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -1185,20 +1185,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-20T17:45:48+00:00" "time": "2023-02-16T09:57:23+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "e8324d44f5af99ec2ccec849934a242f64458f86" "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/e8324d44f5af99ec2ccec849934a242f64458f86", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629",
"reference": "e8324d44f5af99ec2ccec849934a242f64458f86", "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1236,7 +1236,7 @@
"options" "options"
], ],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.2.5" "source": "https://github.com/symfony/options-resolver/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -1252,7 +1252,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:38:09+00:00" "time": "2023-02-14T08:44:56+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -1748,16 +1748,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7" "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902",
"reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1789,7 +1789,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v6.2.5" "source": "https://github.com/symfony/process/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -1805,20 +1805,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:38:09+00:00" "time": "2023-02-24T10:42:00+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
"version": "v3.2.0", "version": "v3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/service-contracts.git",
"reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" "reference": "a8c9cedf55f314f3a186041d19537303766df09a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a",
"reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", "reference": "a8c9cedf55f314f3a186041d19537303766df09a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1874,7 +1874,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.2.0" "source": "https://github.com/symfony/service-contracts/tree/v3.2.1"
}, },
"funding": [ "funding": [
{ {
@ -1890,20 +1890,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-11-25T10:21:52+00:00" "time": "2023-03-01T10:32:47+00:00"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "00b6ac156aacffc53487c930e0ab14587a6607f6" "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/00b6ac156aacffc53487c930e0ab14587a6607f6", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f",
"reference": "00b6ac156aacffc53487c930e0ab14587a6607f6", "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1936,7 +1936,7 @@
"description": "Provides a way to profile code", "description": "Provides a way to profile code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/stopwatch/tree/v6.2.5" "source": "https://github.com/symfony/stopwatch/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -1952,20 +1952,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:36:55+00:00" "time": "2023-02-14T08:44:56+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.2.5", "version": "v6.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" "reference": "67b8c1eec78296b85dc1c7d9743830160218993d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d",
"reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", "reference": "67b8c1eec78296b85dc1c7d9743830160218993d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2022,7 +2022,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.2.5" "source": "https://github.com/symfony/string/tree/v6.2.7"
}, },
"funding": [ "funding": [
{ {
@ -2038,7 +2038,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-01T08:38:09+00:00" "time": "2023-02-24T10:42:00+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@ -12,18 +12,18 @@ jobs:
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
- name: Prune cancelled/skipped runs - name: Prune cancelled/skipped runs
uses: actions/github-script@v4 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }} github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
script: | script: |
const cancelled = await github.actions.listWorkflowRunsForRepo({ const cancelled = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner, owner: context.repo.owner,
per_page: 100, per_page: 100,
repo: context.repo.repo, repo: context.repo.repo,
status: 'cancelled', status: 'cancelled',
}); });
const skipped = await github.actions.listWorkflowRunsForRepo({ const skipped = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner, owner: context.repo.owner,
per_page: 100, per_page: 100,
repo: context.repo.repo, repo: context.repo.repo,
@ -33,7 +33,7 @@ jobs:
for (const response of [cancelled, skipped]) { for (const response of [cancelled, skipped]) {
for (const run of response.data.workflow_runs) { for (const run of response.data.workflow_runs) {
console.log(`Run id ${run.id} of '${run.name}' is a cancelled/skipped run. Deleting...`); console.log(`Run id ${run.id} of '${run.name}' is a cancelled/skipped run. Deleting...`);
await github.actions.deleteWorkflowRun({ await github.rest.actions.deleteWorkflowRun({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
run_id: run.id run_id: run.id
@ -42,7 +42,7 @@ jobs:
} }
- name: Prune runs older than 3 days - name: Prune runs older than 3 days
uses: actions/github-script@v4 uses: actions/github-script@v6
with: with:
github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }} github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
script: | script: |
@ -67,7 +67,7 @@ jobs:
for (const workflow of workflows) { for (const workflow of workflows) {
for (let page = 0; page < pages; page += 1) { for (let page = 0; page < pages; page += 1) {
let response = await github.actions.listWorkflowRuns({ let response = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner, owner: context.repo.owner,
page: page, page: page,
per_page: 100, per_page: 100,
@ -88,7 +88,7 @@ jobs:
for (const run of runs_to_delete) { for (const run of runs_to_delete) {
console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`); console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`);
try { try {
await github.actions.deleteWorkflowRun({ await github.rest.actions.deleteWorkflowRun({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
run_id: run[0] run_id: run[0]

View File

@ -58,7 +58,6 @@ class TransactionTypeController extends Controller
* @param AutocompleteRequest $request * @param AutocompleteRequest $request
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function transactionTypes(AutocompleteRequest $request): JsonResponse public function transactionTypes(AutocompleteRequest $request): JsonResponse
{ {

View File

@ -63,7 +63,6 @@ class DestroyController extends Controller
* *
* @param Account $account * @param Account $account
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Account $account): JsonResponse public function destroy(Account $account): JsonResponse

View File

@ -76,7 +76,6 @@ class ListController extends Controller
* @param Account $account * @param Account $account
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(Account $account): JsonResponse public function attachments(Account $account): JsonResponse
@ -110,7 +109,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function piggyBanks(Account $account): JsonResponse public function piggyBanks(Account $account): JsonResponse
{ {
@ -145,7 +143,6 @@ class ListController extends Controller
* *
* Show all transaction groups related to the account. * Show all transaction groups related to the account.
* *
* *
* @param Request $request * @param Request $request
* @param Account $account * @param Account $account

View File

@ -75,7 +75,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(Request $request): JsonResponse public function index(Request $request): JsonResponse
{ {

View File

@ -64,7 +64,6 @@ class DestroyController extends Controller
* *
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *
* *
* @param Attachment $attachment * @param Attachment $attachment
* *

View File

@ -73,7 +73,6 @@ class ShowController extends Controller
* *
* @param Attachment $attachment * @param Attachment $attachment
* *
* @return LaravelResponse * @return LaravelResponse
* @throws FireflyException * @throws FireflyException
*/ */
@ -118,7 +117,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {

View File

@ -95,7 +95,6 @@ class StoreController extends Controller
/** /**
* Upload an attachment. * Upload an attachment.
* *
* *
* @param Request $request * @param Request $request
* @param Attachment $attachment * @param Attachment $attachment

View File

@ -70,7 +70,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -110,7 +109,6 @@ class ShowController extends Controller
* @param AvailableBudget $availableBudget * @param AvailableBudget $availableBudget
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(AvailableBudget $availableBudget): JsonResponse public function show(AvailableBudget $availableBudget): JsonResponse
{ {

View File

@ -62,7 +62,6 @@ class DestroyController extends Controller
* @param Bill $bill * @param Bill $bill
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Bill $bill): JsonResponse public function destroy(Bill $bill): JsonResponse
{ {

View File

@ -76,7 +76,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(Bill $bill): JsonResponse public function attachments(Bill $bill): JsonResponse
{ {
@ -111,7 +110,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function rules(Bill $bill): JsonResponse public function rules(Bill $bill): JsonResponse
{ {
@ -150,7 +148,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Bill $bill): JsonResponse public function transactions(Request $request, Bill $bill): JsonResponse
{ {

View File

@ -67,7 +67,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -98,7 +97,6 @@ class ShowController extends Controller
* @param Bill $bill * @param Bill $bill
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Bill $bill): JsonResponse public function show(Bill $bill): JsonResponse
{ {

View File

@ -62,7 +62,6 @@ class DestroyController extends Controller
* @param Budget $budget * @param Budget $budget
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Budget $budget): JsonResponse public function destroy(Budget $budget): JsonResponse
{ {

View File

@ -78,7 +78,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(Budget $budget): JsonResponse public function attachments(Budget $budget): JsonResponse
{ {
@ -113,7 +112,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function budgetLimits(Budget $budget): JsonResponse public function budgetLimits(Budget $budget): JsonResponse
{ {
@ -147,7 +145,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Budget $budget): JsonResponse public function transactions(Request $request, Budget $budget): JsonResponse
{ {
@ -211,7 +208,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function withoutBudget(Request $request): JsonResponse public function withoutBudget(Request $request): JsonResponse
{ {

View File

@ -71,7 +71,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -105,7 +104,6 @@ class ShowController extends Controller
* @param Budget $budget * @param Budget $budget
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Budget $budget): JsonResponse public function show(Budget $budget): JsonResponse
{ {

View File

@ -69,7 +69,6 @@ class DestroyController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function destroy(Budget $budget, BudgetLimit $budgetLimit): JsonResponse public function destroy(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
{ {

View File

@ -77,7 +77,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
{ {

View File

@ -80,7 +80,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(Request $request, Budget $budget): JsonResponse public function index(Request $request, Budget $budget): JsonResponse
{ {
@ -113,7 +112,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function indexAll(DateRequest $request): JsonResponse public function indexAll(DateRequest $request): JsonResponse
{ {

View File

@ -62,7 +62,6 @@ class DestroyController extends Controller
* @param Category $category * @param Category $category
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Category $category): JsonResponse public function destroy(Category $category): JsonResponse
{ {

View File

@ -73,7 +73,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(Category $category): JsonResponse public function attachments(Category $category): JsonResponse
{ {
@ -110,7 +109,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Category $category): JsonResponse public function transactions(Request $request, Category $category): JsonResponse
{ {

View File

@ -67,7 +67,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -103,7 +102,6 @@ class ShowController extends Controller
* @param Category $category * @param Category $category
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Category $category): JsonResponse public function show(Category $category): JsonResponse
{ {

View File

@ -64,7 +64,6 @@ class DestroyController extends Controller
* *
* @param ObjectGroup $objectGroup * @param ObjectGroup $objectGroup
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(ObjectGroup $objectGroup): JsonResponse public function destroy(ObjectGroup $objectGroup): JsonResponse

View File

@ -72,7 +72,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function bills(ObjectGroup $objectGroup): JsonResponse public function bills(ObjectGroup $objectGroup): JsonResponse
{ {
@ -108,7 +107,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function piggyBanks(ObjectGroup $objectGroup): JsonResponse public function piggyBanks(ObjectGroup $objectGroup): JsonResponse
{ {

View File

@ -73,7 +73,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(Request $request): JsonResponse public function index(Request $request): JsonResponse
{ {

View File

@ -62,7 +62,6 @@ class DestroyController extends Controller
* @param PiggyBank $piggyBank * @param PiggyBank $piggyBank
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(PiggyBank $piggyBank): JsonResponse public function destroy(PiggyBank $piggyBank): JsonResponse
{ {

View File

@ -67,7 +67,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(PiggyBank $piggyBank): JsonResponse public function attachments(PiggyBank $piggyBank): JsonResponse
{ {
@ -102,7 +101,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse
{ {

View File

@ -67,7 +67,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -103,7 +102,6 @@ class ShowController extends Controller
* @param PiggyBank $piggyBank * @param PiggyBank $piggyBank
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(PiggyBank $piggyBank): JsonResponse public function show(PiggyBank $piggyBank): JsonResponse
{ {

View File

@ -62,7 +62,6 @@ class DestroyController extends Controller
* @param Recurrence $recurrence * @param Recurrence $recurrence
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Recurrence $recurrence): JsonResponse public function destroy(Recurrence $recurrence): JsonResponse
{ {

View File

@ -74,7 +74,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Recurrence $recurrence): JsonResponse public function transactions(Request $request, Recurrence $recurrence): JsonResponse
{ {

View File

@ -67,7 +67,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -104,7 +103,6 @@ class ShowController extends Controller
* @param Recurrence $recurrence * @param Recurrence $recurrence
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Recurrence $recurrence): JsonResponse public function show(Recurrence $recurrence): JsonResponse
{ {

View File

@ -66,7 +66,6 @@ class DestroyController extends Controller
* @param Rule $rule * @param Rule $rule
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Rule $rule): JsonResponse public function destroy(Rule $rule): JsonResponse
{ {

View File

@ -71,7 +71,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -108,7 +107,6 @@ class ShowController extends Controller
* @param Rule $rule * @param Rule $rule
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Rule $rule): JsonResponse public function show(Rule $rule): JsonResponse
{ {

View File

@ -66,7 +66,6 @@ class DestroyController extends Controller
* @param RuleGroup $ruleGroup * @param RuleGroup $ruleGroup
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(RuleGroup $ruleGroup): JsonResponse public function destroy(RuleGroup $ruleGroup): JsonResponse
{ {

View File

@ -70,7 +70,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function rules(RuleGroup $group): JsonResponse public function rules(RuleGroup $group): JsonResponse
{ {

View File

@ -70,7 +70,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -106,7 +105,6 @@ class ShowController extends Controller
* @param RuleGroup $ruleGroup * @param RuleGroup $ruleGroup
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(RuleGroup $ruleGroup): JsonResponse public function show(RuleGroup $ruleGroup): JsonResponse
{ {

View File

@ -66,7 +66,6 @@ class DestroyController extends Controller
* @param Tag $tag * @param Tag $tag
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Tag $tag): JsonResponse public function destroy(Tag $tag): JsonResponse
{ {

View File

@ -76,7 +76,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(Tag $tag): JsonResponse public function attachments(Tag $tag): JsonResponse
{ {
@ -112,7 +111,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, Tag $tag): JsonResponse public function transactions(Request $request, Tag $tag): JsonResponse
{ {

View File

@ -71,7 +71,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -107,7 +106,6 @@ class ShowController extends Controller
* @param Tag $tag * @param Tag $tag
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Tag $tag): JsonResponse public function show(Tag $tag): JsonResponse
{ {

View File

@ -76,7 +76,6 @@ class DestroyController extends Controller
* @param TransactionGroup $transactionGroup * @param TransactionGroup $transactionGroup
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(TransactionGroup $transactionGroup): JsonResponse public function destroy(TransactionGroup $transactionGroup): JsonResponse
{ {
@ -116,7 +115,6 @@ class DestroyController extends Controller
* *
* @param TransactionJournal $transactionJournal * @param TransactionJournal $transactionJournal
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroyJournal(TransactionJournal $transactionJournal): JsonResponse public function destroyJournal(TransactionJournal $transactionJournal): JsonResponse

View File

@ -74,7 +74,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function attachments(TransactionGroup $transactionGroup): JsonResponse public function attachments(TransactionGroup $transactionGroup): JsonResponse
{ {
@ -110,7 +109,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function piggyBankEvents(TransactionGroup $transactionGroup): JsonResponse public function piggyBankEvents(TransactionGroup $transactionGroup): JsonResponse
{ {
@ -149,7 +147,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactionLinks(TransactionJournal $transactionJournal): JsonResponse public function transactionLinks(TransactionJournal $transactionJournal): JsonResponse
{ {

View File

@ -55,7 +55,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(Request $request): JsonResponse public function index(Request $request): JsonResponse
{ {
@ -107,7 +106,6 @@ class ShowController extends Controller
* @param TransactionJournal $transactionJournal * @param TransactionJournal $transactionJournal
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function showJournal(TransactionJournal $transactionJournal): JsonResponse public function showJournal(TransactionJournal $transactionJournal): JsonResponse
{ {
@ -123,7 +121,6 @@ class ShowController extends Controller
* @param TransactionGroup $transactionGroup * @param TransactionGroup $transactionGroup
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(TransactionGroup $transactionGroup): JsonResponse public function show(TransactionGroup $transactionGroup): JsonResponse
{ {

View File

@ -39,7 +39,7 @@ use Validator;
class DestroyController extends Controller class DestroyController extends Controller
{ {
private CurrencyRepositoryInterface $repository; private CurrencyRepositoryInterface $repository;
private UserRepositoryInterface $userRepository; private UserRepositoryInterface $userRepository;
/** /**
* CurrencyRepository constructor. * CurrencyRepository constructor.
@ -51,7 +51,7 @@ class DestroyController extends Controller
parent::__construct(); parent::__construct();
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(CurrencyRepositoryInterface::class); $this->repository = app(CurrencyRepositoryInterface::class);
$this->userRepository = app(UserRepositoryInterface::class); $this->userRepository = app(UserRepositoryInterface::class);
$this->repository->setUser(auth()->user()); $this->repository->setUser(auth()->user());
@ -70,7 +70,6 @@ class DestroyController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function destroy(TransactionCurrency $currency): JsonResponse public function destroy(TransactionCurrency $currency): JsonResponse
{ {

View File

@ -41,7 +41,6 @@ use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface; use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
use FireflyIII\Repositories\Rule\RuleRepositoryInterface; use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\AccountTransformer; use FireflyIII\Transformers\AccountTransformer;
@ -67,6 +66,7 @@ class ListController extends Controller
use TransactionFilter; use TransactionFilter;
private CurrencyRepositoryInterface $repository; private CurrencyRepositoryInterface $repository;
/** /**
* CurrencyRepository constructor. * CurrencyRepository constructor.
* *
@ -77,7 +77,7 @@ class ListController extends Controller
parent::__construct(); parent::__construct();
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->repository = app(CurrencyRepositoryInterface::class); $this->repository = app(CurrencyRepositoryInterface::class);
$this->repository->setUser(auth()->user()); $this->repository->setUser(auth()->user());
return $next($request); return $next($request);
@ -95,7 +95,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function accounts(Request $request, TransactionCurrency $currency): JsonResponse public function accounts(Request $request, TransactionCurrency $currency): JsonResponse
{ {
@ -149,7 +148,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function availableBudgets(TransactionCurrency $currency): JsonResponse public function availableBudgets(TransactionCurrency $currency): JsonResponse
{ {
@ -188,7 +186,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function bills(TransactionCurrency $currency): JsonResponse public function bills(TransactionCurrency $currency): JsonResponse
{ {
@ -232,7 +229,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function budgetLimits(TransactionCurrency $currency): JsonResponse public function budgetLimits(TransactionCurrency $currency): JsonResponse
{ {
@ -267,7 +263,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function recurrences(TransactionCurrency $currency): JsonResponse public function recurrences(TransactionCurrency $currency): JsonResponse
{ {
@ -320,7 +315,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function rules(TransactionCurrency $currency): JsonResponse public function rules(TransactionCurrency $currency): JsonResponse
{ {
@ -374,7 +368,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
{ {

View File

@ -75,7 +75,6 @@ class ShowController extends Controller
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -111,7 +110,6 @@ class ShowController extends Controller
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
public function show(TransactionCurrency $currency): JsonResponse public function show(TransactionCurrency $currency): JsonResponse
{ {
@ -137,7 +135,6 @@ class ShowController extends Controller
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
public function showDefault(): JsonResponse public function showDefault(): JsonResponse
{ {

View File

@ -29,7 +29,6 @@ use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\UpdateRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\AccountFilter; use FireflyIII\Support\Http\Api\AccountFilter;
use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\CurrencyTransformer; use FireflyIII\Transformers\CurrencyTransformer;
@ -76,7 +75,6 @@ class UpdateController extends Controller
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
public function disable(TransactionCurrency $currency): JsonResponse public function disable(TransactionCurrency $currency): JsonResponse
{ {
@ -109,7 +107,6 @@ class UpdateController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function makeDefault(TransactionCurrency $currency): JsonResponse public function makeDefault(TransactionCurrency $currency): JsonResponse
{ {
@ -142,7 +139,6 @@ class UpdateController extends Controller
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
public function enable(TransactionCurrency $currency): JsonResponse public function enable(TransactionCurrency $currency): JsonResponse
{ {

View File

@ -65,7 +65,6 @@ class DestroyController extends Controller
* @param TransactionJournalLink $link * @param TransactionJournalLink $link
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(TransactionJournalLink $link): JsonResponse public function destroy(TransactionJournalLink $link): JsonResponse
{ {

View File

@ -73,7 +73,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(Request $request): JsonResponse public function index(Request $request): JsonResponse
{ {
@ -114,7 +113,6 @@ class ShowController extends Controller
* @param TransactionJournalLink $journalLink * @param TransactionJournalLink $journalLink
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(TransactionJournalLink $journalLink): JsonResponse public function show(TransactionJournalLink $journalLink): JsonResponse
{ {

View File

@ -29,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\LinkType; use FireflyIII\Models\LinkType;
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface; use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\Transformers\TransactionGroupTransformer;
use FireflyIII\User; use FireflyIII\User;
@ -58,8 +57,8 @@ class ListController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
/** @var User $user */ /** @var User $user */
$user = auth()->user(); $user = auth()->user();
$this->repository = app(LinkTypeRepositoryInterface::class); $this->repository = app(LinkTypeRepositoryInterface::class);
$this->repository->setUser($user); $this->repository->setUser($user);
return $next($request); return $next($request);
@ -76,7 +75,6 @@ class ListController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function transactions(Request $request, LinkType $linkType): JsonResponse public function transactions(Request $request, LinkType $linkType): JsonResponse
{ {

View File

@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\LinkType; use FireflyIII\Models\LinkType;
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface; use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Http\Api\TransactionFilter; use FireflyIII\Support\Http\Api\TransactionFilter;
use FireflyIII\Transformers\LinkTypeTransformer; use FireflyIII\Transformers\LinkTypeTransformer;
use FireflyIII\User; use FireflyIII\User;
@ -58,8 +57,8 @@ class ShowController extends Controller
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
/** @var User $user */ /** @var User $user */
$user = auth()->user(); $user = auth()->user();
$this->repository = app(LinkTypeRepositoryInterface::class); $this->repository = app(LinkTypeRepositoryInterface::class);
$this->repository->setUser($user); $this->repository->setUser($user);
return $next($request); return $next($request);
@ -74,7 +73,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -110,7 +108,6 @@ class ShowController extends Controller
* @param LinkType $linkType * @param LinkType $linkType
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(LinkType $linkType): JsonResponse public function show(LinkType $linkType): JsonResponse
{ {

View File

@ -360,7 +360,9 @@ class BasicController extends Controller
/** @var NetWorthInterface $netWorthHelper */ /** @var NetWorthInterface $netWorthHelper */
$netWorthHelper = app(NetWorthInterface::class); $netWorthHelper = app(NetWorthInterface::class);
$netWorthHelper->setUser($user); $netWorthHelper->setUser($user);
$allAccounts = $this->accountRepository->getActiveAccountsByType([AccountType::ASSET, AccountType::DEFAULT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT]); $allAccounts = $this->accountRepository->getActiveAccountsByType(
[AccountType::ASSET, AccountType::DEFAULT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT]
);
// filter list on preference of being included. // filter list on preference of being included.
$filtered = $allAccounts->filter( $filtered = $allAccounts->filter(

View File

@ -33,7 +33,6 @@ use League\Fractal\Resource\Item;
/** /**
* Returns basic information about this installation. * Returns basic information about this installation.
* *
* Class AboutController. * Class AboutController.
*/ */
class AboutController extends Controller class AboutController extends Controller

View File

@ -61,7 +61,9 @@ class ConfigurationController extends Controller
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/configuration/getConfiguration * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/configuration/getConfiguration
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -96,7 +98,6 @@ class ConfigurationController extends Controller
* Get all config values. * Get all config values.
* *
* @return array * @return array
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@ -136,7 +137,9 @@ class ConfigurationController extends Controller
* @param string $configKey * @param string $configKey
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function show(string $configKey): JsonResponse public function show(string $configKey): JsonResponse
{ {
@ -171,7 +174,9 @@ class ConfigurationController extends Controller
* @param string $name * @param string $name
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function update(UpdateRequest $request, string $name): JsonResponse public function update(UpdateRequest $request, string $name): JsonResponse
{ {

View File

@ -72,7 +72,6 @@ class UserController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function destroy(User $user): JsonResponse public function destroy(User $user): JsonResponse
{ {
@ -98,7 +97,6 @@ class UserController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -135,7 +133,6 @@ class UserController extends Controller
* @param User $user * @param User $user
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(User $user): JsonResponse public function show(User $user): JsonResponse
{ {
@ -191,7 +188,7 @@ class UserController extends Controller
*/ */
public function update(UserUpdateRequest $request, User $user): JsonResponse public function update(UserUpdateRequest $request, User $user): JsonResponse
{ {
$data = $request->getAll(); $data = $request->getAll();
// can only update 'blocked' when user is admin. // can only update 'blocked' when user is admin.
if (!$this->repository->hasRole(auth()->user(), 'owner')) { if (!$this->repository->hasRole(auth()->user(), 'owner')) {

View File

@ -52,7 +52,6 @@ class PreferencesController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
@ -85,7 +84,6 @@ class PreferencesController extends Controller
* @param Preference $preference * @param Preference $preference
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function show(Preference $preference): JsonResponse public function show(Preference $preference): JsonResponse
{ {

View File

@ -45,7 +45,6 @@ class AttemptController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {

View File

@ -40,7 +40,6 @@ class DestroyController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {
@ -64,7 +63,6 @@ class DestroyController extends Controller
* @param Webhook $webhook * @param Webhook $webhook
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function destroy(Webhook $webhook): JsonResponse public function destroy(Webhook $webhook): JsonResponse
{ {
@ -86,7 +84,6 @@ class DestroyController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function destroyAttempt(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse public function destroyAttempt(Webhook $webhook, WebhookMessage $message, WebhookAttempt $attempt): JsonResponse
{ {
@ -114,7 +111,6 @@ class DestroyController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function destroyMessage(Webhook $webhook, WebhookMessage $message): JsonResponse public function destroyMessage(Webhook $webhook, WebhookMessage $message): JsonResponse
{ {

View File

@ -41,7 +41,6 @@ class MessageController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {

View File

@ -24,9 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Webhook; namespace FireflyIII\Api\V1\Controllers\Webhook;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Enums\WebhookTrigger;
use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Events\RequestedSendWebhookMessages;
use FireflyIII\Events\StoredTransactionGroup;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Webhook\MessageGeneratorInterface; use FireflyIII\Generator\Webhook\MessageGeneratorInterface;
use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionGroup;
@ -49,7 +47,6 @@ class ShowController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {
@ -72,7 +69,6 @@ class ShowController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {

View File

@ -39,7 +39,6 @@ class StoreController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {

View File

@ -37,7 +37,6 @@ class SubmitController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {
@ -59,7 +58,6 @@ class SubmitController extends Controller
* @param Webhook $webhook * @param Webhook $webhook
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function submit(Webhook $webhook): JsonResponse public function submit(Webhook $webhook): JsonResponse
{ {

View File

@ -39,7 +39,6 @@ class UpdateController extends Controller
private WebhookRepositoryInterface $repository; private WebhookRepositoryInterface $repository;
/** /**
*/ */
public function __construct() public function __construct()
{ {

View File

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\Data\Export; namespace FireflyIII\Api\V1\Requests\Data\Export;
use Carbon\Carbon;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ChecksLogin;

View File

@ -83,9 +83,9 @@ class StoreRequest extends FormRequest
$data = $this->appendLocationData($data, null); $data = $this->appendLocationData($data, null);
if ('liability' === $data['account_type_name'] || 'liabilities' === $data['account_type_name']) { if ('liability' === $data['account_type_name'] || 'liabilities' === $data['account_type_name']) {
$data['account_type_name'] = $this->convertString('liability_type'); $data['account_type_name'] = $this->convertString('liability_type');
$data['liability_direction'] = $this->convertString('liability_direction'); $data['liability_direction'] = $this->convertString('liability_direction');
$data['account_type_id'] = null; $data['account_type_id'] = null;
} }
return $data; return $data;

View File

@ -76,7 +76,7 @@ class UpdateRequest extends FormRequest
'liability_amount' => ['liability_amount', 'convertString'], 'liability_amount' => ['liability_amount', 'convertString'],
'liability_start_date' => ['liability_start_date', 'date'], 'liability_start_date' => ['liability_start_date', 'date'],
]; ];
$data = $this->getAllData($fields); $data = $this->getAllData($fields);
return $this->appendLocationData($data, null); return $this->appendLocationData($data, null);
} }

View File

@ -29,7 +29,6 @@ use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/** /**
* Class StoreRequest * Class StoreRequest
*/ */
class StoreRequest extends FormRequest class StoreRequest extends FormRequest

View File

@ -30,7 +30,6 @@ use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/** /**
* Class UpdateRequest * Class UpdateRequest
*/ */
class UpdateRequest extends FormRequest class UpdateRequest extends FormRequest

View File

@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Requests\System; namespace FireflyIII\Api\V1\Requests\System;
use Carbon\Carbon;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;

View File

@ -32,6 +32,8 @@ use FireflyIII\Models\AccountType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Http\Api\ConvertsExchangeRates; use FireflyIII\Support\Http\Api\ConvertsExchangeRates;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class AccountController * Class AccountController
@ -62,6 +64,8 @@ class AccountController extends Controller
* *
* @param DateRequest $request * @param DateRequest $request
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function dashboard(DateRequest $request): JsonResponse public function dashboard(DateRequest $request): JsonResponse
{ {

View File

@ -37,8 +37,6 @@ class ShowController extends Controller
{ {
/** /**
* TODO this endpoint is not yet reachable. * TODO this endpoint is not yet reachable.
* @param Account $account
* @return JsonResponse
*/ */
public function show(Request $request, Account $account): JsonResponse public function show(Request $request, Account $account): JsonResponse
{ {

View File

@ -57,8 +57,6 @@ class ShowController extends Controller
* This endpoint is documented at: * This endpoint is documented at:
* TODO add URL * TODO add URL
* *
* @param DateRequest $request
* @return JsonResponse
*/ */
public function budgeted(DateRequest $request, Budget $budget): JsonResponse public function budgeted(DateRequest $request, Budget $budget): JsonResponse
{ {
@ -73,8 +71,6 @@ class ShowController extends Controller
* This endpoint is documented at: * This endpoint is documented at:
* TODO add URL * TODO add URL
* *
* @param DateRequest $request
* @return JsonResponse
*/ */
public function spent(DateRequest $request, Budget $budget): JsonResponse public function spent(DateRequest $request, Budget $budget): JsonResponse
{ {

View File

@ -50,7 +50,6 @@ class ListController extends Controller
/** /**
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/listBudgetLimitByBudget * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/budgets/listBudgetLimitByBudget
* @return JsonResponse
*/ */
public function index(DateRequest $request, Budget $budget): JsonResponse public function index(DateRequest $request, Budget $budget): JsonResponse
{ {

View File

@ -26,7 +26,6 @@ namespace FireflyIII\Api\V2\Controllers;
use FireflyIII\Api\V2\Request\Generic\SingleDateRequest; use FireflyIII\Api\V2\Request\Generic\SingleDateRequest;
use FireflyIII\Helpers\Report\NetWorthInterface; use FireflyIII\Helpers\Report\NetWorthInterface;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Http\Api\ConvertsExchangeRates; use FireflyIII\Support\Http\Api\ConvertsExchangeRates;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
@ -37,7 +36,7 @@ class NetWorthController extends Controller
{ {
use ConvertsExchangeRates; use ConvertsExchangeRates;
private NetWorthInterface $netWorth; private NetWorthInterface $netWorth;
/** /**
* *
@ -47,7 +46,7 @@ class NetWorthController extends Controller
parent::__construct(); parent::__construct();
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
$this->netWorth = app(NetWorthInterface::class); $this->netWorth = app(NetWorthInterface::class);
$this->netWorth->setUser(auth()->user()); $this->netWorth->setUser(auth()->user());
return $next($request); return $next($request);
} }

View File

@ -94,6 +94,8 @@ class CorrectOpeningBalanceCurrencies extends Command
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @return int * @return int
* @throws FireflyException
* @throws JsonException
*/ */
private function correctJournal(TransactionJournal $journal): int private function correctJournal(TransactionJournal $journal): int
{ {

View File

@ -27,7 +27,6 @@ use Exception;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Log; use Log;
use stdClass; use stdClass;

View File

@ -26,7 +26,6 @@ namespace FireflyIII\Console\Commands\Correction;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
/** /**
* Class DeleteZeroAmount * Class DeleteZeroAmount

View File

@ -30,6 +30,7 @@ use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType; use FireflyIII\Models\TransactionType;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use JsonException;
use Log; use Log;
/** /**
@ -166,6 +167,7 @@ class FixAccountTypes extends Command
* @param Transaction $dest * @param Transaction $dest
* *
* @throws FireflyException * @throws FireflyException
* @throws JsonException
*/ */
private function fixJournal(TransactionJournal $journal, string $type, Transaction $source, Transaction $dest): void private function fixJournal(TransactionJournal $journal, string $type, Transaction $source, Transaction $dest): void
{ {

View File

@ -147,7 +147,7 @@ class FixTransactionTypes extends Command
/** @var Transaction $transaction */ /** @var Transaction $transaction */
$transaction = $collection->first(); $transaction = $collection->first();
/** @var Account|null $account */ /** @var Account|null $account */
$account = $transaction->account; $account = $transaction->account;
if (null === $account) { if (null === $account) {
throw new FireflyException(sprintf('300003: Journal #%d, transaction #%d has no source account.', $journal->id, $transaction->id)); throw new FireflyException(sprintf('300003: Journal #%d, transaction #%d has no source account.', $journal->id, $transaction->id));
} }
@ -177,7 +177,7 @@ class FixTransactionTypes extends Command
/** @var Transaction $transaction */ /** @var Transaction $transaction */
$transaction = $collection->first(); $transaction = $collection->first();
/** @var Account|null $account */ /** @var Account|null $account */
$account = $transaction->account; $account = $transaction->account;
if (null === $account) { if (null === $account) {
throw new FireflyException(sprintf('300006: Journal #%d, transaction #%d has no destination account.', $journal->id, $transaction->id)); throw new FireflyException(sprintf('300006: Journal #%d, transaction #%d has no destination account.', $journal->id, $transaction->id));
} }

View File

@ -90,6 +90,8 @@ class DecryptDatabase extends Command
/** /**
* @param string $table * @param string $table
* @param array $fields * @param array $fields
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function decryptTable(string $table, array $fields): void private function decryptTable(string $table, array $fields): void
{ {

View File

@ -33,6 +33,8 @@ use FireflyIII\Support\Cronjobs\RecurringCronjob;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use InvalidArgumentException; use InvalidArgumentException;
use Log; use Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class Cron * Class Cron
@ -124,7 +126,6 @@ class Cron extends Command
/** /**
* @param bool $force * @param bool $force
* @param Carbon|null $date * @param Carbon|null $date
* @throws FireflyException
*/ */
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
{ {
@ -152,7 +153,9 @@ class Cron extends Command
* @param bool $force * @param bool $force
* @param Carbon|null $date * @param Carbon|null $date
* *
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
private function recurringCronJob(bool $force, ?Carbon $date): void private function recurringCronJob(bool $force, ?Carbon $date): void
{ {
@ -207,6 +210,8 @@ class Cron extends Command
* @param bool $force * @param bool $force
* @param Carbon|null $date * @param Carbon|null $date
* @throws FireflyException * @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function billWarningCronJob(bool $force, ?Carbon $date): void private function billWarningCronJob(bool $force, ?Carbon $date): void
{ {

View File

@ -66,7 +66,9 @@ 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. * 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 * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -110,7 +112,6 @@ class AccountCurrencies extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -50,7 +50,9 @@ class AppendBudgetLimitPeriods extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -73,7 +75,6 @@ class AppendBudgetLimitPeriods extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -58,7 +58,9 @@ class BackToJournals extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -86,6 +88,8 @@ class BackToJournals extends Command
/** /**
* @return bool * @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function isMigrated(): bool private function isMigrated(): bool
{ {
@ -96,7 +100,6 @@ class BackToJournals extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -26,7 +26,6 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use JsonException;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
@ -53,8 +52,9 @@ class BudgetLimitCurrency extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -100,7 +100,6 @@ class BudgetLimitCurrency extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -54,7 +54,9 @@ class CCLiabilities extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -97,7 +99,6 @@ class CCLiabilities extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -54,7 +54,9 @@ class MigrateAttachments extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -106,7 +108,6 @@ class MigrateAttachments extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -27,7 +27,6 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Log; use Log;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
@ -55,7 +54,9 @@ class MigrateJournalNotes extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -102,7 +103,6 @@ class MigrateJournalNotes extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -56,8 +56,10 @@ class MigrateRecurrenceMeta extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -86,7 +88,6 @@ class MigrateRecurrenceMeta extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -55,7 +55,9 @@ class MigrateRecurrenceType extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -78,7 +80,6 @@ class MigrateRecurrenceType extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -54,7 +54,9 @@ class MigrateTagLocations extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -75,7 +77,6 @@ class MigrateTagLocations extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -72,7 +72,9 @@ class MigrateToGroups extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws Exception * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -130,7 +132,6 @@ class MigrateToGroups extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -68,7 +68,9 @@ class MigrateToRules extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -121,7 +123,6 @@ class MigrateToRules extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -67,7 +67,9 @@ class OtherCurrenciesCorrections extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -110,7 +112,6 @@ class OtherCurrenciesCorrections extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -52,7 +52,9 @@ class RenameAccountMeta extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -100,7 +102,6 @@ class RenameAccountMeta extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -27,7 +27,6 @@ use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Log; use Log;
@ -68,7 +67,9 @@ class TransactionIdentifier extends Command
* think. So each set gets a number (1,2,3) to keep them apart. * think. So each set gets a number (1,2,3) to keep them apart.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -115,13 +116,12 @@ class TransactionIdentifier extends Command
*/ */
private function stupidLaravel(): void private function stupidLaravel(): void
{ {
$this->cliRepository = app(JournalCLIRepositoryInterface::class); $this->cliRepository = app(JournalCLIRepositoryInterface::class);
$this->count = 0; $this->count = 0;
} }
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -138,7 +138,6 @@ class TransferCurrenciesCorrections extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@ -238,7 +237,6 @@ class TransferCurrenciesCorrections extends Command
* @param TransactionJournal $transfer * @param TransactionJournal $transfer
* *
* @return bool * @return bool
*/ */
private function isSplitJournal(TransactionJournal $transfer): bool private function isSplitJournal(TransactionJournal $transfer): bool
{ {
@ -263,7 +261,6 @@ class TransferCurrenciesCorrections extends Command
* @param TransactionJournal $transfer * @param TransactionJournal $transfer
* *
* @return Transaction|null * @return Transaction|null
*/ */
private function getSourceTransaction(TransactionJournal $transfer): ?Transaction private function getSourceTransaction(TransactionJournal $transfer): ?Transaction
{ {
@ -313,7 +310,6 @@ class TransferCurrenciesCorrections extends Command
* @param TransactionJournal $transfer * @param TransactionJournal $transfer
* *
* @return Transaction|null * @return Transaction|null
*/ */
private function getDestinationTransaction(TransactionJournal $transfer): ?Transaction private function getDestinationTransaction(TransactionJournal $transfer): ?Transaction
{ {
@ -324,7 +320,6 @@ class TransferCurrenciesCorrections extends Command
* Is either the source or destination transaction NULL? * Is either the source or destination transaction NULL?
* *
* @return bool * @return bool
*/ */
private function isEmptyTransactions(): bool private function isEmptyTransactions(): bool
{ {
@ -335,7 +330,6 @@ class TransferCurrenciesCorrections extends Command
/** /**
* @return bool * @return bool
*/ */
private function isNoCurrencyPresent(): bool private function isNoCurrencyPresent(): bool
{ {

View File

@ -60,7 +60,9 @@ class UpgradeLiabilities extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -82,7 +84,6 @@ class UpgradeLiabilities extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@ -62,7 +62,9 @@ class UpgradeLiabilitiesEight extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws FireflyException * @throws FireflyException
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {
@ -83,7 +85,6 @@ class UpgradeLiabilitiesEight extends Command
/** /**
* @return bool * @return bool
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@ -158,82 +159,6 @@ class UpgradeLiabilitiesEight extends Command
Log::debug(sprintf('Done upgrading liability #%d ("%s")', $account->id, $account->name)); Log::debug(sprintf('Done upgrading liability #%d ("%s")', $account->id, $account->name));
} }
/**
* @param $account
* @return int
*/
private function deleteTransactions($account): int
{
$count = 0;
$journals = TransactionJournal::leftJoin('transactions', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->where('transactions.account_id', $account->id)->get(['transaction_journals.*']);
Log::debug(sprintf('Found %d journals to analyse.', $journals->count()));
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
$delete = false;
/** @var Transaction $source */
$source = $journal->transactions()->where('amount', '<', 0)->first();
/** @var Transaction $dest */
$dest = $journal->transactions()->where('amount', '>', 0)->first();
// if source is this liability and destination is expense, remove transaction.
// if source is revenue and destination is liability, remove transaction.
if ((int)$source->account_id === (int)$account->id && $dest->account->accountType->type === AccountType::EXPENSE) {
$delete = true;
}
if ((int)$dest->account_id === (int)$account->id && $source->account->accountType->type === AccountType::REVENUE) {
$delete = true;
}
if ($delete) {
Log::debug(
sprintf(
'Deleted %s journal #%d ("%s") (%s %s).',
$journal->transactionType->type,
$journal->id,
$journal->description,
$journal->transactionCurrency->code,
$dest->amount
)
);
$service = app(TransactionGroupDestroyService::class);
$service->destroy($journal->transactionGroup);
$count++;
}
}
return $count;
}
/**
* @param Account $account
* @return void
*/
private function deleteCreditTransaction(Account $account): void
{
Log::debug('Will delete credit transaction.');
$liabilityType = TransactionType::whereType(TransactionType::LIABILITY_CREDIT)->first();
$liabilityJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $liabilityType->id)
->first(['transaction_journals.*']);
if (null !== $liabilityJournal) {
$group = $liabilityJournal->transactionGroup;
$service = new TransactionGroupDestroyService();
$service->destroy($group);
Log::debug(sprintf('Deleted liability credit group #%d', $group->id));
return;
}
Log::debug('No liability credit journal found.');
}
/**
*
*/
private function markAsExecuted(): void
{
app('fireflyconfig')->set(self::CONFIG_NAME, true);
}
/** /**
* @param Account $account * @param Account $account
* @return bool * @return bool
@ -267,6 +192,28 @@ class UpgradeLiabilitiesEight extends Command
return true; return true;
} }
/**
* @param Account $account
* @return void
*/
private function deleteCreditTransaction(Account $account): void
{
Log::debug('Will delete credit transaction.');
$liabilityType = TransactionType::whereType(TransactionType::LIABILITY_CREDIT)->first();
$liabilityJournal = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->where('transaction_journals.transaction_type_id', $liabilityType->id)
->first(['transaction_journals.*']);
if (null !== $liabilityJournal) {
$group = $liabilityJournal->transactionGroup;
$service = new TransactionGroupDestroyService();
$service->destroy($group);
Log::debug(sprintf('Deleted liability credit group #%d', $group->id));
return;
}
Log::debug('No liability credit journal found.');
}
/** /**
* @param Account $account * @param Account $account
* @return void * @return void
@ -295,4 +242,62 @@ class UpgradeLiabilitiesEight extends Command
} }
Log::warning('Did not find opening balance.'); Log::warning('Did not find opening balance.');
} }
/**
* @param $account
* @return int
*/
private function deleteTransactions($account): int
{
$count = 0;
$journals = TransactionJournal::leftJoin('transactions', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->where('transactions.account_id', $account->id)->get(['transaction_journals.*']);
Log::debug(sprintf('Found %d journals to analyse.', $journals->count()));
/** @var TransactionJournal $journal */
foreach ($journals as $journal) {
$delete = false;
/** @var Transaction $source */
$source = $journal->transactions()->where('amount', '<', 0)->first();
/** @var Transaction $dest */
$dest = $journal->transactions()->where('amount', '>', 0)->first();
// if source is this liability and destination is expense, remove transaction.
// if source is revenue and destination is liability, remove transaction.
if ((int)$source->account_id === (int)$account->id && $dest->account->accountType->type === AccountType::EXPENSE) {
$delete = true;
}
if ((int)$dest->account_id === (int)$account->id && $source->account->accountType->type === AccountType::REVENUE) {
$delete = true;
}
// overruled. No transaction will be deleted, ever.
// code is kept in place so i can revisit my reasoning.
$delete = false;
if ($delete) {
Log::debug(
sprintf(
'Deleted %s journal #%d ("%s") (%s %s).',
$journal->transactionType->type,
$journal->id,
$journal->description,
$journal->transactionCurrency->code,
$dest->amount
)
);
$service = app(TransactionGroupDestroyService::class);
$service->destroy($journal->transactionGroup);
$count++;
}
}
return $count;
}
/**
*
*/
private function markAsExecuted(): void
{
app('fireflyconfig')->set(self::CONFIG_NAME, true);
}
} }

View File

@ -253,6 +253,8 @@ class AccountFactory
* @param array $data * @param array $data
* *
* @return array * @return array
* @throws FireflyException
* @throws JsonException
*/ */
private function cleanMetaDataArray(Account $account, array $data): array private function cleanMetaDataArray(Account $account, array $data): array
{ {

View File

@ -30,6 +30,7 @@ use FireflyIII\Services\Internal\Support\RecurringTransactionTrait;
use FireflyIII\Services\Internal\Support\TransactionTypeTrait; use FireflyIII\Services\Internal\Support\TransactionTypeTrait;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Support\MessageBag; use Illuminate\Support\MessageBag;
use JsonException;
use Log; use Log;
/** /**
@ -58,6 +59,7 @@ class RecurrenceFactory
* *
* @return Recurrence * @return Recurrence
* @throws FireflyException * @throws FireflyException
* @throws JsonException
*/ */
public function create(array $data): Recurrence public function create(array $data): Recurrence
{ {

Some files were not shown because too many files have changed in this diff Show More