Various code cleanup.

This commit is contained in:
James Cole
2017-09-16 07:41:03 +02:00
parent fe9adba7fb
commit 3424ec1c27
10 changed files with 58 additions and 61 deletions

View File

@@ -35,8 +35,10 @@ use Schema;
/**
* Class UpgradeDatabase
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) // it just touches a lot of things.
* Upgrade user database.
*
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) // it just touches a lot of things.
* @package FireflyIII\Console\Commands
*/
class UpgradeDatabase extends Command
@@ -138,6 +140,9 @@ 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.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's seven but it can't really be helped.
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function updateAccountCurrencies(): void
{
@@ -192,6 +197,8 @@ 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.
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function updateOtherCurrencies(): void
{
@@ -353,6 +360,12 @@ class UpgradeDatabase extends Command
*
* The transaction that is sent to this function MUST be the source transaction (amount negative).
*
* Method is long and complex bit I'm taking it for granted.
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
* @param Transaction $transaction
*/
private function updateTransactionCurrency(Transaction $transaction): void