Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Code cleanup
James Cole417b7c3f865b
diff --git a/app/Api/V2/Request/UserGroup/StoreRequest.php b/app/Api/V2/Request/UserGroup/StoreRequest.phpindex 54d6d54e8a..21e5a76719 100644--- a/app/Api/V2/Request/UserGroup/StoreRequest.php+++ b/app/Api/V2/Request/UserGroup/StoreRequest.php@@ -35,9 +35,9 @@ use Illuminate\Foundation\Http\FormRequest;*/class StoreRequest extends FormRequest{- protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];use ChecksLogin;use ConvertsDataTypes;+ protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];/*** @return arraydiff --git a/app/Api/V2/Request/UserGroup/UpdateMembershipRequest.php b/app/Api/V2/Request/UserGroup/UpdateMembershipRequest.phpindex fb2e7a1edc..3a671268d8 100644--- a/app/Api/V2/Request/UserGroup/UpdateMembershipRequest.php+++ b/app/Api/V2/Request/UserGroup/UpdateMembershipRequest.php@@ -35,9 +35,9 @@ use Illuminate\Foundation\Http\FormRequest;*/class UpdateMembershipRequest extends FormRequest{- protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];use ChecksLogin;use ConvertsDataTypes;+ protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];/*** @return arraydiff --git a/app/Api/V2/Request/UserGroup/UpdateRequest.php b/app/Api/V2/Request/UserGroup/UpdateRequest.phpindex 9acf9e0628..d3b0481fcc 100644--- a/app/Api/V2/Request/UserGroup/UpdateRequest.php+++ b/app/Api/V2/Request/UserGroup/UpdateRequest.php@@ -36,9 +36,9 @@ use Illuminate\Foundation\Http\FormRequest;*/class UpdateRequest extends FormRequest{- protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];use ChecksLogin;use ConvertsDataTypes;+ protected array $acceptedRoles = [UserRoleEnum::OWNER, UserRoleEnum::FULL];/*** @return arraydiff --git a/app/Handlers/Observer/AttachmentObserver.php b/app/Handlers/Observer/AttachmentObserver.phpindex ccc003fb31..0ec7040701 100644--- a/app/Handlers/Observer/AttachmentObserver.php+++ b/app/Handlers/Observer/AttachmentObserver.php@@ -1,4 +1,5 @@<?php+/** AttachmentObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/BillObserver.php b/app/Handlers/Observer/BillObserver.phpindex 81878cf586..42206dc7f0 100644--- a/app/Handlers/Observer/BillObserver.php+++ b/app/Handlers/Observer/BillObserver.php@@ -1,4 +1,5 @@<?php+/** BillObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/BudgetObserver.php b/app/Handlers/Observer/BudgetObserver.phpindex 06fee37946..1c8dc4791e 100644--- a/app/Handlers/Observer/BudgetObserver.php+++ b/app/Handlers/Observer/BudgetObserver.php@@ -1,4 +1,5 @@<?php+/** BudgetObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/CategoryObserver.php b/app/Handlers/Observer/CategoryObserver.phpindex 1c0c2d22e8..d1029ef2cf 100644--- a/app/Handlers/Observer/CategoryObserver.php+++ b/app/Handlers/Observer/CategoryObserver.php@@ -1,4 +1,5 @@<?php+/** CategoryObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/RecurrenceObserver.php b/app/Handlers/Observer/RecurrenceObserver.phpindex b0357962c3..086a79966a 100644--- a/app/Handlers/Observer/RecurrenceObserver.php+++ b/app/Handlers/Observer/RecurrenceObserver.php@@ -1,4 +1,5 @@<?php+/** RecurrenceObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/RecurrenceTransactionObserver.php b/app/Handlers/Observer/RecurrenceTransactionObserver.phpindex 874ac6bd26..45cb092f63 100644--- a/app/Handlers/Observer/RecurrenceTransactionObserver.php+++ b/app/Handlers/Observer/RecurrenceTransactionObserver.php@@ -1,4 +1,5 @@<?php+/** RecurrenceTransactionObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/RuleGroupObserver.php b/app/Handlers/Observer/RuleGroupObserver.phpindex b53522f062..1b14d7276a 100644--- a/app/Handlers/Observer/RuleGroupObserver.php+++ b/app/Handlers/Observer/RuleGroupObserver.php@@ -1,4 +1,5 @@<?php+/** RuleGroupObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/RuleObserver.php b/app/Handlers/Observer/RuleObserver.phpindex e372250ce7..098b7037d1 100644--- a/app/Handlers/Observer/RuleObserver.php+++ b/app/Handlers/Observer/RuleObserver.php@@ -1,4 +1,5 @@<?php+/** RuleObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/TagObserver.php b/app/Handlers/Observer/TagObserver.phpindex d9ed47195c..85c6c16c63 100644--- a/app/Handlers/Observer/TagObserver.php+++ b/app/Handlers/Observer/TagObserver.php@@ -1,4 +1,5 @@<?php+/** TagObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/TransactionGroupObserver.php b/app/Handlers/Observer/TransactionGroupObserver.phpindex 64e55f133b..5b351cec06 100644--- a/app/Handlers/Observer/TransactionGroupObserver.php+++ b/app/Handlers/Observer/TransactionGroupObserver.php@@ -1,4 +1,5 @@<?php+/** TransactionGroup.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/TransactionJournalObserver.php b/app/Handlers/Observer/TransactionJournalObserver.phpindex 573154dcc2..c24f1089da 100644--- a/app/Handlers/Observer/TransactionJournalObserver.php+++ b/app/Handlers/Observer/TransactionJournalObserver.php@@ -1,4 +1,5 @@<?php+/** TransactionJournalObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/TransactionObserver.php b/app/Handlers/Observer/TransactionObserver.phpindex 4ca87dc0e8..ac0024bf69 100644--- a/app/Handlers/Observer/TransactionObserver.php+++ b/app/Handlers/Observer/TransactionObserver.php@@ -1,4 +1,5 @@<?php+/** TransactionObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Handlers/Observer/WebhookMessageObserver.php b/app/Handlers/Observer/WebhookMessageObserver.phpindex c566aaafb3..5744e3e5f8 100644--- a/app/Handlers/Observer/WebhookMessageObserver.php+++ b/app/Handlers/Observer/WebhookMessageObserver.php@@ -1,4 +1,5 @@<?php+/** WebhookMessageObserver.php* Copyright (c) 2023 [email protected]@@ -18,10 +19,10 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;-use FireflyIII\Models\Webhook;use FireflyIII\Models\WebhookMessage;/**@@ -29,7 +30,6 @@ use FireflyIII\Models\WebhookMessage;*/class WebhookMessageObserver{-/*** @param WebhookMessage $webhookMessage*diff --git a/app/Handlers/Observer/WebhookObserver.php b/app/Handlers/Observer/WebhookObserver.phpindex 4a5f091a4c..dd19ebacb5 100644--- a/app/Handlers/Observer/WebhookObserver.php+++ b/app/Handlers/Observer/WebhookObserver.php@@ -1,4 +1,5 @@<?php+/** WebhookObserver.php* Copyright (c) 2023 [email protected]@@ -18,6 +19,7 @@* You should have received a copy of the GNU Affero General Public License* along with this program. If not, see <https://www.gnu.org/licenses/>.*/+declare(strict_types=1);namespace FireflyIII\Handlers\Observer;diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.phpindex 7147f80134..7f752412d4 100644--- a/app/Models/CurrencyExchangeRate.php+++ b/app/Models/CurrencyExchangeRate.php@@ -111,7 +111,7 @@ class CurrencyExchangeRate extends Modelprotected function rate(): Attribute{return Attribute::make(- get: fn($value) => (string)$value,+ get: fn ($value) => (string)$value,);}@@ -121,7 +121,7 @@ class CurrencyExchangeRate extends Modelprotected function userRate(): Attribute{return Attribute::make(- get: fn($value) => (string)$value,+ get: fn ($value) => (string)$value,);}}diff --git a/composer.lock b/composer.lockindex df7fdee25f..8fc39d1695 100644--- a/composer.lock+++ b/composer.lock@@ -1939,16 +1939,16 @@},{"name": "laravel/framework",- "version": "v10.23.1",+ "version": "v10.24.0","source": {"type": "git","url": "https://github.com/laravel/framework.git",- "reference": "dbfd495557678759153e8d71cc2f6027686ca51e"+ "reference": "bcebd0a4c015d5c38aeec299d355a42451dd3726"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/laravel/framework/zipball/dbfd495557678759153e8d71cc2f6027686ca51e",- "reference": "dbfd495557678759153e8d71cc2f6027686ca51e",+ "url": "https://api.github.com/repos/laravel/framework/zipball/bcebd0a4c015d5c38aeec299d355a42451dd3726",+ "reference": "bcebd0a4c015d5c38aeec299d355a42451dd3726","shasum": ""},"require": {@@ -2135,7 +2135,7 @@"issues": "https://github.com/laravel/framework/issues","source": "https://github.com/laravel/framework"},- "time": "2023-09-13T14:51:46+00:00"+ "time": "2023-09-19T15:25:04+00:00"},{"name": "laravel/passport",@@ -2217,16 +2217,16 @@},{"name": "laravel/prompts",- "version": "v0.1.7",+ "version": "v0.1.8","source": {"type": "git","url": "https://github.com/laravel/prompts.git",- "reference": "554e7d855a22e87942753d68e23b327ad79b2070"+ "reference": "68dcc65babf92e1fb43cba0b3f78fc3d8002709c"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/laravel/prompts/zipball/554e7d855a22e87942753d68e23b327ad79b2070",- "reference": "554e7d855a22e87942753d68e23b327ad79b2070",+ "url": "https://api.github.com/repos/laravel/prompts/zipball/68dcc65babf92e1fb43cba0b3f78fc3d8002709c",+ "reference": "68dcc65babf92e1fb43cba0b3f78fc3d8002709c","shasum": ""},"require": {@@ -2259,9 +2259,9 @@],"support": {"issues": "https://github.com/laravel/prompts/issues",- "source": "https://github.com/laravel/prompts/tree/v0.1.7"+ "source": "https://github.com/laravel/prompts/tree/v0.1.8"},- "time": "2023-09-12T11:09:22+00:00"+ "time": "2023-09-19T15:33:56+00:00"},{"name": "laravel/sanctum",@@ -3848,16 +3848,16 @@},{"name": "nette/utils",- "version": "v4.0.1",+ "version": "v4.0.2","source": {"type": "git","url": "https://github.com/nette/utils.git",- "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e"+ "reference": "cead6637226456b35e1175cc53797dd585d85545"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/nette/utils/zipball/9124157137da01b1f5a5a22d6486cb975f26db7e",- "reference": "9124157137da01b1f5a5a22d6486cb975f26db7e",+ "url": "https://api.github.com/repos/nette/utils/zipball/cead6637226456b35e1175cc53797dd585d85545",+ "reference": "cead6637226456b35e1175cc53797dd585d85545","shasum": ""},"require": {@@ -3879,8 +3879,7 @@"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()","ext-json": "to use Nette\\Utils\\Json","ext-mbstring": "to use Strings::lower() etc...",- "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",- "ext-xml": "to use Strings::length() etc. when mbstring is not available"+ "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"},"type": "library","extra": {@@ -3929,43 +3928,43 @@],"support": {"issues": "https://github.com/nette/utils/issues",- "source": "https://github.com/nette/utils/tree/v4.0.1"+ "source": "https://github.com/nette/utils/tree/v4.0.2"},- "time": "2023-07-30T15:42:21+00:00"+ "time": "2023-09-19T11:58:07+00:00"},{"name": "nunomaduro/collision",- "version": "v7.8.1",+ "version": "v7.9.0","source": {"type": "git","url": "https://github.com/nunomaduro/collision.git",- "reference": "61553ad3260845d7e3e49121b7074619233d361b"+ "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/nunomaduro/collision/zipball/61553ad3260845d7e3e49121b7074619233d361b",- "reference": "61553ad3260845d7e3e49121b7074619233d361b",+ "url": "https://api.github.com/repos/nunomaduro/collision/zipball/296d0cf9fe462837ac0da8a568b56fc026b132da",+ "reference": "296d0cf9fe462837ac0da8a568b56fc026b132da","shasum": ""},"require": {"filp/whoops": "^2.15.3","nunomaduro/termwind": "^1.15.1","php": "^8.1.0",- "symfony/console": "^6.3.2"+ "symfony/console": "^6.3.4"},"require-dev": {- "brianium/paratest": "^7.2.4",- "laravel/framework": "^10.17.1",- "laravel/pint": "^1.10.5",- "laravel/sail": "^1.23.1",- "laravel/sanctum": "^3.2.5",- "laravel/tinker": "^2.8.1",+ "brianium/paratest": "^7.2.7",+ "laravel/framework": "^10.23.1",+ "laravel/pint": "^1.13.1",+ "laravel/sail": "^1.25.0",+ "laravel/sanctum": "^3.3.1",+ "laravel/tinker": "^2.8.2","nunomaduro/larastan": "^2.6.4",- "orchestra/testbench-core": "^8.5.9",- "pestphp/pest": "^2.12.1",- "phpunit/phpunit": "^10.3.1",+ "orchestra/testbench-core": "^8.11.0",+ "pestphp/pest": "^2.19.1",+ "phpunit/phpunit": "^10.3.5","sebastian/environment": "^6.0.1",- "spatie/laravel-ignition": "^2.2.0"+ "spatie/laravel-ignition": "^2.3.0"},"type": "library","extra": {@@ -4024,7 +4023,7 @@"type": "patreon"}],- "time": "2023-08-07T08:03:21+00:00"+ "time": "2023-09-19T10:45:09+00:00"},{"name": "nunomaduro/termwind",@@ -5630,16 +5629,16 @@},{"name": "spatie/ignition",- "version": "1.10.1",+ "version": "1.11.2","source": {"type": "git","url": "https://github.com/spatie/ignition.git",- "reference": "d92b9a081e99261179b63a858c7a4b01541e7dd1"+ "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/spatie/ignition/zipball/d92b9a081e99261179b63a858c7a4b01541e7dd1",- "reference": "d92b9a081e99261179b63a858c7a4b01541e7dd1",+ "url": "https://api.github.com/repos/spatie/ignition/zipball/48b23411ca4bfbc75c75dfc638b6b36159c375aa",+ "reference": "48b23411ca4bfbc75c75dfc638b6b36159c375aa","shasum": ""},"require": {@@ -5709,7 +5708,7 @@"type": "github"}],- "time": "2023-08-21T15:06:37+00:00"+ "time": "2023-09-19T15:29:52+00:00"},{"name": "spatie/laravel-html",@@ -9919,16 +9918,16 @@},{"name": "phpmyadmin/sql-parser",- "version": "5.8.1",+ "version": "5.8.2","source": {"type": "git","url": "https://github.com/phpmyadmin/sql-parser.git",- "reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203"+ "reference": "f1720ae19abe6294cb5599594a8a57bc3c8cc287"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/b877ee6262a00f0f498da5e01335e8a5dc01d203",- "reference": "b877ee6262a00f0f498da5e01335e8a5dc01d203",+ "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/f1720ae19abe6294cb5599594a8a57bc3c8cc287",+ "reference": "f1720ae19abe6294cb5599594a8a57bc3c8cc287","shasum": ""},"require": {@@ -10002,7 +10001,7 @@"type": "other"}],- "time": "2023-09-15T18:21:22+00:00"+ "time": "2023-09-19T12:34:29+00:00"},{"name": "phpstan/phpdoc-parser",@@ -10053,16 +10052,16 @@},{"name": "phpstan/phpstan",- "version": "1.10.34",+ "version": "1.10.35","source": {"type": "git","url": "https://github.com/phpstan/phpstan.git",- "reference": "7f806b6f1403e6914c778140e2ba07c293cb4901"+ "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3"},"dist": {"type": "zip",- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7f806b6f1403e6914c778140e2ba07c293cb4901",- "reference": "7f806b6f1403e6914c778140e2ba07c293cb4901",+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3",+ "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3","shasum": ""},"require": {@@ -10111,7 +10110,7 @@"type": "tidelift"}],- "time": "2023-09-13T09:49:47+00:00"+ "time": "2023-09-19T15:27:56+00:00"},{"name": "phpstan/phpstan-deprecation-rules",