Code cleaning stuff.

This commit is contained in:
James Cole
2019-02-13 17:38:41 +01:00
parent 9a461fc7b7
commit 71fb9d8fa5
141 changed files with 495 additions and 482 deletions

View File

@@ -53,7 +53,7 @@ class AssetAccountIbans implements MapperInterface
foreach ($set as $account) {
$iban = $account->iban ?? '';
$accountId = (int)$account->id;
if (\strlen($iban) > 0) {
if ('' !== $iban) {
$name = $account->iban . ' (' . $account->name . ')';
// is a liability?

View File

@@ -40,7 +40,9 @@ class AssetAccounts implements MapperInterface
{
/** @var AccountRepositoryInterface $accountRepository */
$accountRepository = app(AccountRepositoryInterface::class);
$set = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE,]);
$set = $accountRepository->getAccountsByType(
[AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE,]
);
$list = [];
/** @var Account $account */
@@ -48,7 +50,7 @@ class AssetAccounts implements MapperInterface
$accountId = (int)$account->id;
$name = $account->name;
$iban = $account->iban ?? '';
if (\strlen($iban) > 0) {
if ('' !== $iban) {
$name .= ' (' . $iban . ')';
}

View File

@@ -55,7 +55,7 @@ class OpposingAccountIbans implements MapperInterface
foreach ($set as $account) {
$iban = $account->iban ?? '';
$accountId = (int)$account->id;
if (\strlen($iban) > 0) {
if ('' !== $iban) {
$name = $account->iban . ' (' . $account->name . ')';
// is a liability?

View File

@@ -55,7 +55,7 @@ class OpposingAccounts implements MapperInterface
$accountId = (int)$account->id;
$name = $account->name;
$iban = $account->iban ?? '';
if (\strlen($iban) > 0) {
if ('' !== $iban) {
$name .= ' (' . $iban . ')';
}
// is a liability?