Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Script and code cleanup.
James Cole33f764088ef9
diff --git a/.ci/php-cs-fixer/composer.lock b/.ci/php-cs-fixer/composer.lockindex e91c07abc8..cfd93a0044 100644--- a/.ci/php-cs-fixer/composer.lock+++ b/.ci/php-cs-fixer/composer.lock@@ -8,16 +8,16 @@"packages": [{"name": "composer/pcre",- "version": "3.0.0",+ "version": "3.1.0","source": {"type": "git","url": "https://github.com/composer/pcre.git",- "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd"+ "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd",- "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd",+ "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",+ "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2","shasum": ""},"require": {@@ -59,7 +59,7 @@],"support": {"issues": "https://github.com/composer/pcre/issues",- "source": "https://github.com/composer/pcre/tree/3.0.0"+ "source": "https://github.com/composer/pcre/tree/3.1.0"},"funding": [{@@ -75,7 +75,7 @@"type": "tidelift"}],- "time": "2022-02-25T20:21:48+00:00"+ "time": "2022-11-17T09:50:14+00:00"},{"name": "composer/semver",@@ -732,16 +732,16 @@},{"name": "symfony/console",- "version": "v6.1.7",+ "version": "v6.2.1","source": {"type": "git","url": "https://github.com/symfony/console.git",- "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815"+ "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/console/zipball/a1282bd0c096e0bdb8800b104177e2ce404d8815",- "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815",+ "url": "https://api.github.com/repos/symfony/console/zipball/58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f",+ "reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f","shasum": ""},"require": {@@ -808,7 +808,7 @@"terminal"],"support": {- "source": "https://github.com/symfony/console/tree/v6.1.7"+ "source": "https://github.com/symfony/console/tree/v6.2.1"},"funding": [{@@ -824,20 +824,20 @@"type": "tidelift"}],- "time": "2022-10-26T21:42:49+00:00"+ "time": "2022-12-01T13:44:20+00:00"},{"name": "symfony/deprecation-contracts",- "version": "v3.1.1",+ "version": "v3.2.0","source": {"type": "git","url": "https://github.com/symfony/deprecation-contracts.git",- "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918"+ "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",- "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918",+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3",+ "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3","shasum": ""},"require": {@@ -846,7 +846,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "3.1-dev"+ "dev-main": "3.3-dev"},"thanks": {"name": "symfony/contracts",@@ -875,7 +875,7 @@"description": "A generic function and convention to trigger deprecation notices","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1"+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0"},"funding": [{@@ -891,20 +891,20 @@"type": "tidelift"}],- "time": "2022-02-25T11:15:52+00:00"+ "time": "2022-11-25T10:21:52+00:00"},{"name": "symfony/event-dispatcher",- "version": "v6.1.0",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/event-dispatcher.git",- "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347"+ "reference": "9efb1618fabee89515fe031314e8ed5625f85a53"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347",- "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347",+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9efb1618fabee89515fe031314e8ed5625f85a53",+ "reference": "9efb1618fabee89515fe031314e8ed5625f85a53","shasum": ""},"require": {@@ -958,7 +958,7 @@"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0"+ "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.0"},"funding": [{@@ -974,20 +974,20 @@"type": "tidelift"}],- "time": "2022-05-05T16:51:07+00:00"+ "time": "2022-11-02T09:08:04+00:00"},{"name": "symfony/event-dispatcher-contracts",- "version": "v3.1.1",+ "version": "v3.2.0","source": {"type": "git","url": "https://github.com/symfony/event-dispatcher-contracts.git",- "reference": "02ff5eea2f453731cfbc6bc215e456b781480448"+ "reference": "0782b0b52a737a05b4383d0df35a474303cabdae"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448",- "reference": "02ff5eea2f453731cfbc6bc215e456b781480448",+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae",+ "reference": "0782b0b52a737a05b4383d0df35a474303cabdae","shasum": ""},"require": {@@ -1000,7 +1000,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "3.1-dev"+ "dev-main": "3.3-dev"},"thanks": {"name": "symfony/contracts",@@ -1037,7 +1037,7 @@"standards"],"support": {- "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1"+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0"},"funding": [{@@ -1053,20 +1053,20 @@"type": "tidelift"}],- "time": "2022-02-25T11:15:52+00:00"+ "time": "2022-11-25T10:21:52+00:00"},{"name": "symfony/filesystem",- "version": "v6.1.5",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/filesystem.git",- "reference": "4d216a2beef096edf040a070117c39ca2abce307"+ "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d216a2beef096edf040a070117c39ca2abce307",- "reference": "4d216a2beef096edf040a070117c39ca2abce307",+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/50b2523c874605cf3d4acf7a9e2b30b6a440a016",+ "reference": "50b2523c874605cf3d4acf7a9e2b30b6a440a016","shasum": ""},"require": {@@ -1100,7 +1100,7 @@"description": "Provides basic utilities for the filesystem","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/filesystem/tree/v6.1.5"+ "source": "https://github.com/symfony/filesystem/tree/v6.2.0"},"funding": [{@@ -1116,20 +1116,20 @@"type": "tidelift"}],- "time": "2022-09-21T20:29:40+00:00"+ "time": "2022-11-20T13:01:27+00:00"},{"name": "symfony/finder",- "version": "v6.1.3",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/finder.git",- "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709"+ "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/finder/zipball/39696bff2c2970b3779a5cac7bf9f0b88fc2b709",- "reference": "39696bff2c2970b3779a5cac7bf9f0b88fc2b709",+ "url": "https://api.github.com/repos/symfony/finder/zipball/eb2355f69519e4ef33f1835bca4c935f5d42e570",+ "reference": "eb2355f69519e4ef33f1835bca4c935f5d42e570","shasum": ""},"require": {@@ -1164,7 +1164,7 @@"description": "Finds files and directories via an intuitive fluent interface","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/finder/tree/v6.1.3"+ "source": "https://github.com/symfony/finder/tree/v6.2.0"},"funding": [{@@ -1180,20 +1180,20 @@"type": "tidelift"}],- "time": "2022-07-29T07:42:06+00:00"+ "time": "2022-10-09T08:55:40+00:00"},{"name": "symfony/options-resolver",- "version": "v6.1.0",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/options-resolver.git",- "reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4"+ "reference": "d28f02acde71ff75e957082cd36e973df395f626"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a3016f5442e28386ded73c43a32a5b68586dd1c4",- "reference": "a3016f5442e28386ded73c43a32a5b68586dd1c4",+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d28f02acde71ff75e957082cd36e973df395f626",+ "reference": "d28f02acde71ff75e957082cd36e973df395f626","shasum": ""},"require": {@@ -1231,7 +1231,7 @@"options"],"support": {- "source": "https://github.com/symfony/options-resolver/tree/v6.1.0"+ "source": "https://github.com/symfony/options-resolver/tree/v6.2.0"},"funding": [{@@ -1247,20 +1247,20 @@"type": "tidelift"}],- "time": "2022-02-25T11:15:52+00:00"+ "time": "2022-11-02T09:08:04+00:00"},{"name": "symfony/polyfill-ctype",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-ctype.git",- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",- "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a","shasum": ""},"require": {@@ -1275,7 +1275,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1313,7 +1313,7 @@"portable"],"support": {- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"},"funding": [{@@ -1329,20 +1329,20 @@"type": "tidelift"}],- "time": "2022-05-24T11:49:31+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/polyfill-intl-grapheme",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-intl-grapheme.git",- "reference": "433d05519ce6990bf3530fba6957499d327395c2"+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2",- "reference": "433d05519ce6990bf3530fba6957499d327395c2",+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354","shasum": ""},"require": {@@ -1354,7 +1354,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1394,7 +1394,7 @@"shim"],"support": {- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0"},"funding": [{@@ -1410,20 +1410,20 @@"type": "tidelift"}],- "time": "2022-05-24T11:49:31+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/polyfill-intl-normalizer",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-intl-normalizer.git",- "reference": "219aa369ceff116e673852dce47c3a41794c14bd"+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd",- "reference": "219aa369ceff116e673852dce47c3a41794c14bd",+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6","shasum": ""},"require": {@@ -1435,7 +1435,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1478,7 +1478,7 @@"shim"],"support": {- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0"},"funding": [{@@ -1494,20 +1494,20 @@"type": "tidelift"}],- "time": "2022-05-24T11:49:31+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/polyfill-mbstring",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-mbstring.git",- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",- "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534","shasum": ""},"require": {@@ -1522,7 +1522,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1561,7 +1561,7 @@"shim"],"support": {- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"},"funding": [{@@ -1577,20 +1577,20 @@"type": "tidelift"}],- "time": "2022-05-24T11:49:31+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/polyfill-php80",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-php80.git",- "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",- "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936","shasum": ""},"require": {@@ -1599,7 +1599,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1644,7 +1644,7 @@"shim"],"support": {- "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"},"funding": [{@@ -1660,20 +1660,20 @@"type": "tidelift"}],- "time": "2022-05-10T07:21:04+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/polyfill-php81",- "version": "v1.26.0",+ "version": "v1.27.0","source": {"type": "git","url": "https://github.com/symfony/polyfill-php81.git",- "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1"+ "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1",- "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1",+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a",+ "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a","shasum": ""},"require": {@@ -1682,7 +1682,7 @@"type": "library","extra": {"branch-alias": {- "dev-main": "1.26-dev"+ "dev-main": "1.27-dev"},"thanks": {"name": "symfony/polyfill",@@ -1723,7 +1723,7 @@"shim"],"support": {- "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0"+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0"},"funding": [{@@ -1739,20 +1739,20 @@"type": "tidelift"}],- "time": "2022-05-24T11:49:31+00:00"+ "time": "2022-11-03T14:55:06+00:00"},{"name": "symfony/process",- "version": "v6.1.3",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/process.git",- "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292"+ "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/process/zipball/a6506e99cfad7059b1ab5cab395854a0a0c21292",- "reference": "a6506e99cfad7059b1ab5cab395854a0a0c21292",+ "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877",+ "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877","shasum": ""},"require": {@@ -1784,7 +1784,7 @@"description": "Executes commands in sub-processes","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/process/tree/v6.1.3"+ "source": "https://github.com/symfony/process/tree/v6.2.0"},"funding": [{@@ -1800,7 +1800,7 @@"type": "tidelift"}],- "time": "2022-06-27T17:24:16+00:00"+ "time": "2022-11-02T09:08:04+00:00"},{"name": "symfony/service-contracts",@@ -1889,7 +1889,7 @@},{"name": "symfony/stopwatch",- "version": "v6.1.5",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/stopwatch.git",@@ -1931,7 +1931,7 @@"description": "Provides a way to profile code","homepage": "https://symfony.com","support": {- "source": "https://github.com/symfony/stopwatch/tree/v6.1.5"+ "source": "https://github.com/symfony/stopwatch/tree/v6.2.0"},"funding": [{@@ -1951,16 +1951,16 @@},{"name": "symfony/string",- "version": "v6.1.7",+ "version": "v6.2.0","source": {"type": "git","url": "https://github.com/symfony/string.git",- "reference": "823f143370880efcbdfa2dbca946b3358c4707e5"+ "reference": "145702685e0d12f81d755c71127bfff7582fdd36"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/symfony/string/zipball/823f143370880efcbdfa2dbca946b3358c4707e5",- "reference": "823f143370880efcbdfa2dbca946b3358c4707e5",+ "url": "https://api.github.com/repos/symfony/string/zipball/145702685e0d12f81d755c71127bfff7582fdd36",+ "reference": "145702685e0d12f81d755c71127bfff7582fdd36","shasum": ""},"require": {@@ -1976,6 +1976,7 @@"require-dev": {"symfony/error-handler": "^5.4|^6.0","symfony/http-client": "^5.4|^6.0",+ "symfony/intl": "^6.2","symfony/translation-contracts": "^2.0|^3.0","symfony/var-exporter": "^5.4|^6.0"},@@ -2016,7 +2017,7 @@"utf8"],"support": {- "source": "https://github.com/symfony/string/tree/v6.1.7"+ "source": "https://github.com/symfony/string/tree/v6.2.0"},"funding": [{@@ -2032,7 +2033,7 @@"type": "tidelift"}],- "time": "2022-10-10T09:34:31+00:00"+ "time": "2022-11-30T17:13:47+00:00"}],"packages-dev": [],diff --git a/.ci/phpstan.sh b/.ci/phpstan.shindex e864fe03b8..4efa51ed6c 100755--- a/.ci/phpstan.sh+++ b/.ci/phpstan.sh@@ -30,6 +30,4 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )# Do static code analysis.# ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress-./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt--exit 0+./vendor/bin/phpstan analyse -c .ci/phpstan.neon --xdebug --error-format=table > phpstan-report.txtdiff --git a/app/Console/Commands/Integrity/UpdateGroupInformation.php b/app/Console/Commands/Integrity/UpdateGroupInformation.phpindex 0247fa0fe0..b049d06db2 100644--- a/app/Console/Commands/Integrity/UpdateGroupInformation.php+++ b/app/Console/Commands/Integrity/UpdateGroupInformation.php@@ -117,7 +117,7 @@ class UpdateGroupInformation extends Commandprivate function updateGroupInfoForObject(User $user, UserGroup $group, string $className): void{try {- $result = $className::where('user_id', $user->id)->where('user_group_id', null)->update(['user_group_id' => $group->id]);+ $result = $className::where('user_id', $user->id)->where('user_group_id', null)->update(['user_group_id' => $group->id]);} catch(QueryException $e) {$this->error(sprintf('Could not update group information for "%s" because of error "%s"', $className, $e->getMessage()));return;diff --git a/app/Events/ChangedPiggyBankAmount.php b/app/Events/ChangedPiggyBankAmount.phpindex 84743f4e91..dd7ae66c08 100644--- a/app/Events/ChangedPiggyBankAmount.php+++ b/app/Events/ChangedPiggyBankAmount.php@@ -1,4 +1,5 @@<?php+declare(strict_types=1);/** ChangedPiggyBankAmount.phpdiff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.phpindex 1c03c57c36..0020b0a1ac 100644--- a/app/Generator/Report/Audit/MonthReportGenerator.php+++ b/app/Generator/Report/Audit/MonthReportGenerator.php@@ -103,75 +103,75 @@ class MonthReportGenerator implements ReportGeneratorInterface* @throws JsonException*/public function getAuditReport(Account $account, Carbon $date): array- {- /** @var AccountRepositoryInterface $accountRepository */- $accountRepository = app(AccountRepositoryInterface::class);- $accountRepository->setUser($account->user);+ {+ /** @var AccountRepositoryInterface $accountRepository */+ $accountRepository = app(AccountRepositoryInterface::class);+ $accountRepository->setUser($account->user);- /** @var JournalRepositoryInterface $journalRepository */- $journalRepository = app(JournalRepositoryInterface::class);- $journalRepository->setUser($account->user);+ /** @var JournalRepositoryInterface $journalRepository */+ $journalRepository = app(JournalRepositoryInterface::class);+ $journalRepository->setUser($account->user);- /** @var GroupCollectorInterface $collector */- $collector = app(GroupCollectorInterface::class);- $collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end)->withAccountInformation()- ->withBudgetInformation()->withCategoryInformation()->withBillInformation();- $journals = $collector->getExtractedJournals();- $journals = array_reverse($journals, true);- $dayBeforeBalance = app('steam')->balance($account, $date);- $startBalance = $dayBeforeBalance;- $defaultCurrency = app('amount')->getDefaultCurrencyByUser($account->user);- $currency = $accountRepository->getAccountCurrency($account) ?? $defaultCurrency;+ /** @var GroupCollectorInterface $collector */+ $collector = app(GroupCollectorInterface::class);+ $collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end)->withAccountInformation()+ ->withBudgetInformation()->withCategoryInformation()->withBillInformation();+ $journals = $collector->getExtractedJournals();+ $journals = array_reverse($journals, true);+ $dayBeforeBalance = app('steam')->balance($account, $date);+ $startBalance = $dayBeforeBalance;+ $defaultCurrency = app('amount')->getDefaultCurrencyByUser($account->user);+ $currency = $accountRepository->getAccountCurrency($account) ?? $defaultCurrency;- foreach ($journals as $index => $journal) {- $journals[$index]['balance_before'] = $startBalance;- $transactionAmount = $journal['amount'];+ foreach ($journals as $index => $journal) {+ $journals[$index]['balance_before'] = $startBalance;+ $transactionAmount = $journal['amount'];- // make sure amount is in the right "direction".- if ($account->id === $journal['destination_account_id']) {- $transactionAmount = app('steam')->positive($journal['amount']);- }+ // make sure amount is in the right "direction".+ if ($account->id === $journal['destination_account_id']) {+ $transactionAmount = app('steam')->positive($journal['amount']);+ }- if ($currency->id === $journal['foreign_currency_id']) {- $transactionAmount = $journal['foreign_amount'];- if ($account->id === $journal['destination_account_id']) {- $transactionAmount = app('steam')->positive($journal['foreign_amount']);- }- }+ if ($currency->id === $journal['foreign_currency_id']) {+ $transactionAmount = $journal['foreign_amount'];+ if ($account->id === $journal['destination_account_id']) {+ $transactionAmount = app('steam')->positive($journal['foreign_amount']);+ }+ }- $newBalance = bcadd($startBalance, $transactionAmount);- $journals[$index]['balance_after'] = $newBalance;- $startBalance = $newBalance;+ $newBalance = bcadd($startBalance, $transactionAmount);+ $journals[$index]['balance_after'] = $newBalance;+ $startBalance = $newBalance;- // add meta dates for each journal.- $journals[$index]['interest_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'interest_date');- $journals[$index]['book_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'book_date');- $journals[$index]['process_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'process_date');- $journals[$index]['due_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'due_date');- $journals[$index]['payment_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'payment_date');- $journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date');- }- $locale = app('steam')->getLocale();+ // add meta dates for each journal.+ $journals[$index]['interest_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'interest_date');+ $journals[$index]['book_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'book_date');+ $journals[$index]['process_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'process_date');+ $journals[$index]['due_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'due_date');+ $journals[$index]['payment_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'payment_date');+ $journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date');+ }+ $locale = app('steam')->getLocale();- return [- 'journals' => $journals,- 'currency' => $currency,- 'exists' => 0 !== count($journals),- 'end' => $this->end->isoFormat((string) trans('config.month_and_day_moment_js', [], $locale)),- 'endBalance' => app('steam')->balance($account, $this->end),- 'dayBefore' => $date->isoFormat((string) trans('config.month_and_day_moment_js', [], $locale)),- 'dayBeforeBalance' => $dayBeforeBalance,- ];- }+ return [+ 'journals' => $journals,+ 'currency' => $currency,+ 'exists' => 0 !== count($journals),+ 'end' => $this->end->isoFormat((string) trans('config.month_and_day_moment_js', [], $locale)),+ 'endBalance' => app('steam')->balance($account, $this->end),+ 'dayBefore' => $date->isoFormat((string) trans('config.month_and_day_moment_js', [], $locale)),+ 'dayBeforeBalance' => $dayBeforeBalance,+ ];+ }/**- * Account collection setter.- *- * @param Collection $accounts- *- * @return ReportGeneratorInterface- * @codeCoverageIgnore- */+ * Account collection setter.+ *+ * @param Collection $accounts+ *+ * @return ReportGeneratorInterface+ * @codeCoverageIgnore+ */public function setAccounts(Collection $accounts): ReportGeneratorInterface{$this->accounts = $accounts;diff --git a/app/Handlers/Events/PiggyBankEventHandler.php b/app/Handlers/Events/PiggyBankEventHandler.phpindex ee7ecedc9a..07430e133a 100644--- a/app/Handlers/Events/PiggyBankEventHandler.php+++ b/app/Handlers/Events/PiggyBankEventHandler.php@@ -1,4 +1,5 @@<?php+declare(strict_types=1);/** PiggyBankEventHandler.php@@ -27,7 +28,6 @@ use FireflyIII\Events\ChangedPiggyBankAmount;use FireflyIII\Models\PiggyBankEvent;use Illuminate\Support\Facades\Log;-/*** Class PiggyBankEventHandler*/@@ -51,7 +51,7 @@ class PiggyBankEventHandler$exists = PiggyBankEvent::where('piggy_bank_id', $event->piggyBank->id)->where('transaction_journal_id', $journal->id)->exists();- if($exists) {+ if ($exists) {Log::warning('Already have event for this journal and piggy, will not create another.');return;}@@ -66,5 +66,4 @@ class PiggyBankEventHandler]);}-}diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.phpindex 2d953c1c39..bc34c81eaf 100644--- a/app/Http/Controllers/Report/BudgetController.php+++ b/app/Http/Controllers/Report/BudgetController.php@@ -359,7 +359,6 @@ class BudgetController extends ControllerLog::debug(sprintf('Could not render reports.partials.budget-period: %s', $e->getMessage()));$result = 'Could not render view.';throw new FireflyException($result, 0, $e);-}$cache->store($result);