Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Merge branch 'develop' into 5.8-dev
James Coledb478711ed38
diff --cc app/Api/V1/Controllers/Insight/Transfer/TagController.phpindex cc4093587f,bae49e777c..5346e51e43--- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php+++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php@@@ -170,10 -169,9 +170,10 @@@ class TagController extends Controlle'currency_code' => $journal['foreign_currency_code'],];$response[$foreignKey]['difference'] = bcadd(- $response[$foreignKey]['difference'], app('steam')->positive($journal['foreign_amount'])+ $response[$foreignKey]['difference'],+ app('steam')->positive($journal['foreign_amount']));- $response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference'];+ $response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference']; // intentional float}}}diff --cc app/Http/Controllers/Chart/AccountController.phpindex e233696d3a,a4e60b70a6..ae88733d36--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@@ -482,28 -479,36 +482,27 @@@ class AccountController extends Control];$entries = [];$current = clone $start;- switch ($step) {- default:- break;- case '1D':- // per day the entire period, balance for every day.- $format = (string) trans('config.month_and_day_js', [], $locale);- $range = app('steam')->balanceInRange($account, $start, $end, $currency);- $previous = array_values($range)[0];- while ($end >= $current) {- $theDate = $current->format('Y-m-d');- $balance = $range[$theDate] ?? $previous;- $label = $current->isoFormat($format);- $entries[$label] = $balance;- $previous = $balance;- $current->addDay();- }- break;-- case '1W':- case '1M':- case '1Y':- while ($end >= $current) {- $balance = app('steam')->balance($account, $current, $currency);- $label = app('navigation')->periodShow($current, $step);- $entries[$label] = $balance;- $current = app('navigation')->addPeriod($current, $step, 0);- }- break;--+ if ('1D' === $step) {+ // per day the entire period, balance for every day.+ $format = (string)trans('config.month_and_day_js', [], $locale);+ $range = app('steam')->balanceInRange($account, $start, $end, $currency);+ $previous = array_values($range)[0];+ while ($end >= $current) {+ $theDate = $current->format('Y-m-d');+ $balance = $range[$theDate] ?? $previous;+ $label = $current->isoFormat($format);+ $entries[$label] = (float)$balance;+ $previous = $balance;+ $current->addDay();+ }+ }+ if ('1W' === $step || '1M' === $step || '1Y' === $step) {+ while ($end >= $current) {+ $balance = (float)app('steam')->balance($account, $current, $currency);+ $label = app('navigation')->periodShow($current, $step);+ $entries[$label] = $balance;+ $current = app('navigation')->addPeriod($current, $step, 0);+ }}$result['entries'] = $entries;diff --cc app/Support/Steam.phpindex 136be54951,c563d89979..47509e584d--- a/app/Support/Steam.php+++ b/app/Support/Steam.php@@@ -43,9 -44,10 +44,9 @@@ use ValueError*/class Steam{-/**- * @param Account $account- * @param Carbon $date+ * @param Account $account+ * @param Carbon $date** @return string*/@@@ -237,10 -260,11 +258,10 @@@/*** This method always ignores the virtual balance.*- * @param Collection $accounts- * @param Carbon $date+ * @param Collection $accounts+ * @param Carbon $date** @return array- * @throws JsonException*/public function balancesByAccounts(Collection $accounts, Carbon $date): array{diff --cc composer.lockindex 11435abd6f,92fc7f8d21..b24de05862--- a/composer.lock+++ b/composer.lock@@@ -8968,87 -8878,9 +8968,87 @@@],"time": "2022-03-03T08:28:38+00:00"},+ {+ "name": "ergebnis/phpstan-rules",+ "version": "1.0.0",+ "source": {+ "type": "git",+ "url": "https://github.com/ergebnis/phpstan-rules.git",+ "reference": "ebeced30d7e50324a94a83c19a59d75816e8fbb4"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/ebeced30d7e50324a94a83c19a59d75816e8fbb4",+ "reference": "ebeced30d7e50324a94a83c19a59d75816e8fbb4",+ "shasum": ""+ },+ "require": {+ "ext-mbstring": "*",+ "nikic/php-parser": "^4.2.3",+ "php": "^7.2 || ^8.0",+ "phpstan/phpstan": "^1.0.0"+ },+ "require-dev": {+ "doctrine/orm": "^2.10.2",+ "ergebnis/composer-normalize": "^2.15.0",+ "ergebnis/license": "^1.1.0",+ "ergebnis/php-cs-fixer-config": "^2.14.0",+ "ergebnis/test-util": "^1.5.0",+ "infection/infection": "~0.15.3",+ "nette/di": "^3.0.11",+ "phpstan/phpstan-deprecation-rules": "^1.0.0",+ "phpstan/phpstan-strict-rules": "^1.0.0",+ "phpunit/phpunit": "^8.5.21",+ "psalm/plugin-phpunit": "~0.16.1",+ "psr/container": "^1.0.0",+ "vimeo/psalm": "^4.12.0",+ "zendframework/zend-servicemanager": "^2.0.0"+ },+ "type": "phpstan-extension",+ "extra": {+ "phpstan": {+ "includes": [+ "rules.neon"+ ]+ }+ },+ "autoload": {+ "psr-4": {+ "Ergebnis\\PHPStan\\Rules\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Andreas Möller",+ "email": "[email protected]"+ }+ ],+ "description": "Provides additional rules for phpstan/phpstan.",+ "homepage": "https://github.com/ergebnis/phpstan-rules",+ "keywords": [+ "PHPStan",+ "phpstan-extreme-rules",+ "phpstan-rules"+ ],+ "support": {+ "issues": "https://github.com/ergebnis/phpstan-rules/issues",+ "source": "https://github.com/ergebnis/phpstan-rules"+ },+ "funding": [+ {+ "url": "https://github.com/localheinz",+ "type": "github"+ }+ ],+ "time": "2021-11-08T15:37:09+00:00"+ },{"name": "fakerphp/faker",- "version": "v1.20.0",+ "version": "v1.21.0","source": {"type": "git","url": "https://github.com/FakerPHP/Faker.git",@@@ -9667,239 -9403,9 +9668,239 @@@},"time": "2022-10-14T12:47:21+00:00"},+ {+ "name": "phpmyadmin/sql-parser",+ "version": "5.5.0",+ "source": {+ "type": "git",+ "url": "https://github.com/phpmyadmin/sql-parser.git",+ "reference": "8ab99cd0007d880f49f5aa1807033dbfa21b1cb5"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/8ab99cd0007d880f49f5aa1807033dbfa21b1cb5",+ "reference": "8ab99cd0007d880f49f5aa1807033dbfa21b1cb5",+ "shasum": ""+ },+ "require": {+ "php": "^7.1 || ^8.0",+ "symfony/polyfill-mbstring": "^1.3"+ },+ "conflict": {+ "phpmyadmin/motranslator": "<3.0"+ },+ "require-dev": {+ "phpmyadmin/coding-standard": "^3.0",+ "phpmyadmin/motranslator": "^4.0 || ^5.0",+ "phpstan/extension-installer": "^1.1",+ "phpstan/phpstan": "^1.2",+ "phpstan/phpstan-phpunit": "^1.0",+ "phpunit/php-code-coverage": "*",+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",+ "psalm/plugin-phpunit": "^0.16.1",+ "vimeo/psalm": "^4.11",+ "zumba/json-serializer": "^3.0"+ },+ "suggest": {+ "ext-mbstring": "For best performance",+ "phpmyadmin/motranslator": "Translate messages to your favorite locale"+ },+ "bin": [+ "bin/highlight-query",+ "bin/lint-query",+ "bin/tokenize-query"+ ],+ "type": "library",+ "autoload": {+ "psr-4": {+ "PhpMyAdmin\\SqlParser\\": "src"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "GPL-2.0-or-later"+ ],+ "authors": [+ {+ "name": "The phpMyAdmin Team",+ "email": "[email protected]",+ "homepage": "https://www.phpmyadmin.net/team/"+ }+ ],+ "description": "A validating SQL lexer and parser with a focus on MySQL dialect.",+ "homepage": "https://github.com/phpmyadmin/sql-parser",+ "keywords": [+ "analysis",+ "lexer",+ "parser",+ "sql"+ ],+ "support": {+ "issues": "https://github.com/phpmyadmin/sql-parser/issues",+ "source": "https://github.com/phpmyadmin/sql-parser"+ },+ "time": "2021-12-09T04:31:52+00:00"+ },+ {+ "name": "phpstan/phpstan",+ "version": "1.9.2",+ "source": {+ "type": "git",+ "url": "https://github.com/phpstan/phpstan.git",+ "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa",+ "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa",+ "shasum": ""+ },+ "require": {+ "php": "^7.2|^8.0"+ },+ "conflict": {+ "phpstan/phpstan-shim": "*"+ },+ "bin": [+ "phpstan",+ "phpstan.phar"+ ],+ "type": "library",+ "autoload": {+ "files": [+ "bootstrap.php"+ ]+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "description": "PHPStan - PHP Static Analysis Tool",+ "keywords": [+ "dev",+ "static analysis"+ ],+ "support": {+ "issues": "https://github.com/phpstan/phpstan/issues",+ "source": "https://github.com/phpstan/phpstan/tree/1.9.2"+ },+ "funding": [+ {+ "url": "https://github.com/ondrejmirtes",+ "type": "github"+ },+ {+ "url": "https://github.com/phpstan",+ "type": "github"+ },+ {+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",+ "type": "tidelift"+ }+ ],+ "time": "2022-11-10T09:56:11+00:00"+ },+ {+ "name": "phpstan/phpstan-deprecation-rules",+ "version": "1.0.0",+ "source": {+ "type": "git",+ "url": "https://github.com/phpstan/phpstan-deprecation-rules.git",+ "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682",+ "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682",+ "shasum": ""+ },+ "require": {+ "php": "^7.1 || ^8.0",+ "phpstan/phpstan": "^1.0"+ },+ "require-dev": {+ "php-parallel-lint/php-parallel-lint": "^1.2",+ "phpstan/phpstan-phpunit": "^1.0",+ "phpunit/phpunit": "^9.5"+ },+ "type": "phpstan-extension",+ "extra": {+ "branch-alias": {+ "dev-master": "1.0-dev"+ },+ "phpstan": {+ "includes": [+ "rules.neon"+ ]+ }+ },+ "autoload": {+ "psr-4": {+ "PHPStan\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",+ "support": {+ "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",+ "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0"+ },+ "time": "2021-09-23T11:02:21+00:00"+ },+ {+ "name": "phpstan/phpstan-strict-rules",+ "version": "1.4.4",+ "source": {+ "type": "git",+ "url": "https://github.com/phpstan/phpstan-strict-rules.git",+ "reference": "23e5f377ee6395a1a04842d3d6ed4bd25e7b44a6"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/23e5f377ee6395a1a04842d3d6ed4bd25e7b44a6",+ "reference": "23e5f377ee6395a1a04842d3d6ed4bd25e7b44a6",+ "shasum": ""+ },+ "require": {+ "php": "^7.2 || ^8.0",+ "phpstan/phpstan": "^1.8.6"+ },+ "require-dev": {+ "nikic/php-parser": "^4.13.0",+ "php-parallel-lint/php-parallel-lint": "^1.2",+ "phpstan/phpstan-phpunit": "^1.0",+ "phpunit/phpunit": "^9.5"+ },+ "type": "phpstan-extension",+ "extra": {+ "phpstan": {+ "includes": [+ "rules.neon"+ ]+ }+ },+ "autoload": {+ "psr-4": {+ "PHPStan\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "description": "Extra strict and opinionated rules for PHPStan",+ "support": {+ "issues": "https://github.com/phpstan/phpstan-strict-rules/issues",+ "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.4.4"+ },+ "time": "2022-09-21T11:38:17+00:00"+ },{"name": "phpunit/php-code-coverage",- "version": "9.2.19",+ "version": "9.2.22","source": {"type": "git","url": "https://github.com/sebastianbergmann/php-code-coverage.git",