Code cleanup

This commit is contained in:
James Cole
2018-04-02 15:10:40 +02:00
parent fa7ab45a40
commit a3c34e6b3c
151 changed files with 802 additions and 990 deletions

View File

@@ -45,7 +45,7 @@ class AssetAccountIbans implements MapperInterface
/** @var Account $account */
foreach ($set as $account) {
$iban = $account->iban ?? '';
$accountId = intval($account->id);
$accountId = (int)$account->id;
if (strlen($iban) > 0) {
$topList[$accountId] = $account->iban . ' (' . $account->name . ')';
}

View File

@@ -43,7 +43,7 @@ class AssetAccounts implements MapperInterface
/** @var Account $account */
foreach ($set as $account) {
$accountId = intval($account->id);
$accountId = (int)$account->id;
$name = $account->name;
$iban = $account->iban ?? '';
if (strlen($iban) > 0) {

View File

@@ -42,7 +42,7 @@ class Bills implements MapperInterface
/** @var Bill $bill */
foreach ($result as $bill) {
$billId = intval($bill->id);
$billId = (int)$bill->id;
$list[$billId] = $bill->name . ' [' . $bill->match . ']';
}
asort($list);

View File

@@ -42,7 +42,7 @@ class Budgets implements MapperInterface
/** @var Budget $budget */
foreach ($result as $budget) {
$budgetId = intval($budget->id);
$budgetId = (int)$budget->id;
$list[$budgetId] = $budget->name;
}
asort($list);

View File

@@ -42,7 +42,7 @@ class Categories implements MapperInterface
/** @var Category $category */
foreach ($result as $category) {
$categoryId = intval($category->id);
$categoryId = (int)$category->id;
$list[$categoryId] = $category->name;
}
asort($list);

View File

@@ -51,7 +51,7 @@ class OpposingAccountIbans implements MapperInterface
/** @var Account $account */
foreach ($set as $account) {
$iban = $account->iban ?? '';
$accountId = intval($account->id);
$accountId = (int)$account->id;
if (strlen($iban) > 0) {
$topList[$accountId] = $account->iban . ' (' . $account->name . ')';
}

View File

@@ -49,7 +49,7 @@ class OpposingAccounts implements MapperInterface
/** @var Account $account */
foreach ($set as $account) {
$accountId = intval($account->id);
$accountId = (int)$account->id;
$name = $account->name;
$iban = $account->iban ?? '';
if (strlen($iban) > 0) {

View File

@@ -42,7 +42,7 @@ class Tags implements MapperInterface
/** @var Tag $tag */
foreach ($result as $tag) {
$tagId = intval($tag->id);
$tagId = (int)$tag->id;
$list[$tagId] = $tag->tag;
}
asort($list);

View File

@@ -39,7 +39,7 @@ class TransactionCurrencies implements MapperInterface
$currencies = $repository->get();
$list = [];
foreach ($currencies as $currency) {
$currencyId = intval($currency->id);
$currencyId = (int)$currency->id;
$list[$currencyId] = $currency->name . ' (' . $currency->code . ')';
}
asort($list);