Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add some comments [skip ci]
James Cole34894fb76b86
diff --git a/app/Console/Commands/CreateImport.php b/app/Console/Commands/CreateImport.phpindex f155d9add0..191f361582 100644--- a/app/Console/Commands/CreateImport.php+++ b/app/Console/Commands/CreateImport.php@@ -54,6 +54,8 @@ class CreateImport extends Command}/**+ * Run the command.+ ** @SuppressWarnings(PHPMD.ExcessiveMethodLength) // cannot be helped* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly.*/@@ -133,6 +135,8 @@ class CreateImport extends Command}/**+ * Verify user inserts correct arguments.+ ** @return bool* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly.*/diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.phpindex f37203cc41..b77dddf0fc 100644--- a/app/Console/Commands/Import.php+++ b/app/Console/Commands/Import.php@@ -51,7 +51,7 @@ class Import extends Command}/**- *+ * Run the import routine.*/public function handle(){@@ -91,6 +91,8 @@ class Import extends Command}/**+ * Check if job is valid to be imported.+ ** @param ImportJob $job** @return booldiff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.phpindex 90d2434d76..59065e4d6c 100644--- a/app/Console/Commands/UpgradeDatabase.php+++ b/app/Console/Commands/UpgradeDatabase.php@@ -26,15 +26,14 @@ use FireflyIII\Models\TransactionJournal;use FireflyIII\Models\TransactionType;use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;use Illuminate\Console\Command;-use Illuminate\Database\Query\JoinClause;use Illuminate\Database\QueryException;use Log;use Preferences;use Schema;-use Steam;/*** Class UpgradeDatabase+ ** @SuppressWarnings(PHPMD.CouplingBetweenObjects) // it just touches a lot of things.** @package FireflyIII\Console\Commands@@ -74,8 +73,8 @@ class UpgradeDatabase extends Command$this->updateTransferCurrencies();$this->updateOtherCurrencies();$this->info('Firefly III database is up to date.');- return;+ return;}@@ -136,8 +135,7 @@ class UpgradeDatabase 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.*/public function updateAccountCurrencies(): void{@@ -193,7 +191,7 @@ class UpgradeDatabase extends Command* Both source and destination must match the respective currency preference of the related asset account.* So FF3 must verify all transactions.*/- public function updateOtherCurrencies()+ public function updateOtherCurrencies(): void{/** @var CurrencyRepositoryInterface $repository */$repository = app(CurrencyRepositoryInterface::class);@@ -241,6 +239,7 @@ class UpgradeDatabase extends Command$journal->save();});+return;}diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.phpindex 363e5089f7..bed25e3e0e 100644--- a/app/Console/Commands/UpgradeFireflyInstructions.php+++ b/app/Console/Commands/UpgradeFireflyInstructions.php@@ -84,6 +84,9 @@ class UpgradeFireflyInstructions extends Command}}+ /**+ * Render instructions.+ */private function installInstructions(){/** @var string $version */@@ -102,7 +105,7 @@ class UpgradeFireflyInstructions extends Command$this->boxed('');if (is_null($text)) {- $this->boxed(sprintf('Thank you for installin Firefly III, v%s!', $version));+ $this->boxed(sprintf('Thank you for installing Firefly III, v%s!', $version));$this->boxedInfo('There are no extra installation instructions.');$this->boxed('Firefly III should be ready for use.');$this->boxed('');@@ -131,6 +134,9 @@ class UpgradeFireflyInstructions extends Command}+ /**+ * Render upgrade instructions.+ */private function updateInstructions(){/** @var string $version */diff --git a/app/Console/Commands/UseEncryption.php b/app/Console/Commands/UseEncryption.phpindex 89e6bf012d..5cf80aff32 100644--- a/app/Console/Commands/UseEncryption.php+++ b/app/Console/Commands/UseEncryption.php@@ -16,6 +16,8 @@ use Illuminate\Support\Str;/*** Class UseEncryption+ *+ * @package FireflyIII\Console\Commands*/class UseEncryption extends Command{@@ -46,7 +48,6 @@ class UseEncryption extends Command*/public function handle(){- //$this->handleObjects('Account', 'name', 'encrypted');$this->handleObjects('Bill', 'name', 'name_encrypted');$this->handleObjects('Bill', 'match', 'match_encrypted');@@ -57,6 +58,8 @@ class UseEncryption extends Command}/**+ * Run each object and encrypt them (or not).+ ** @param string $class* @param string $field* @param string $indicatordiff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.phpindex ffc8f1b667..4dd0848501 100644--- a/app/Console/Commands/VerifyDatabase.php+++ b/app/Console/Commands/VerifyDatabase.php@@ -204,6 +204,9 @@ class VerifyDatabase extends Command}}+ /**+ * Report on journals with bad account types linked to them.+ */private function reportIncorrectJournals(){$configuration = [@@ -270,7 +273,7 @@ class VerifyDatabase extends Command}/**- *+ * Report on journals without transactions.*/private function reportNoTransactions(){@@ -288,6 +291,7 @@ class VerifyDatabase extends Command}/**+ * Report on things with no linked journals.* @param string $name*/private function reportObject(string $name)@@ -359,7 +363,7 @@ class VerifyDatabase extends Command}/**- *+ * Report on transfers that have budgets.*/private function reportTransfersBudgets(){