Removed todo comments.

This commit is contained in:
James Cole 2016-02-12 04:59:14 +01:00
parent a790838222
commit 2e15f1e2a3
9 changed files with 16 additions and 15 deletions

View File

@ -32,7 +32,7 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface
if (is_null($account)) {
// create it if doesn't exist.
$account = Account::firstOrCreateEncrypted( // TODO use repository
$account = Account::firstOrCreateEncrypted( // See issue #180
[
'name' => $this->value,
'iban' => $this->value,

View File

@ -36,7 +36,7 @@ class AssetAccountName extends BasicConverter implements ConverterInterface
}
// create it if doesnt exist.
$account = Account::firstOrCreateEncrypted( // TODO use repository
$account = Account::firstOrCreateEncrypted( // See issue #180
[
'name' => $this->value,
'iban' => '',

View File

@ -48,7 +48,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface
'name' => $this->value,
'accountType' => 'asset',
'virtualBalance' => 0,
'virtualBalanceCurrency' => 1, // TODO hard coded.
'virtualBalanceCurrency' => 1, // hard coded.
'active' => true,
'user' => Auth::user()->id,
'iban' => null,
@ -56,7 +56,7 @@ class AssetAccountNumber extends BasicConverter implements ConverterInterface
'accountRole' => null,
'openingBalance' => 0,
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => 1, // TODO hard coded.
'openingBalanceCurrency' => 1, // hard coded.
];

View File

@ -22,7 +22,7 @@ class BudgetName extends BasicConverter implements ConverterInterface
if (isset($this->mapped[$this->index][$this->value])) {
$budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]);
} else {
$budget = Budget::firstOrCreateEncrypted( // TODO use repository
$budget = Budget::firstOrCreateEncrypted( // See issue #180
[
'name' => $this->value,
'user_id' => Auth::user()->id,

View File

@ -22,7 +22,7 @@ class CategoryName extends BasicConverter implements ConverterInterface
if (isset($this->mapped[$this->index][$this->value])) {
$category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]);
} else {
$category = Category::firstOrCreateEncrypted( // TODO use repository
$category = Category::firstOrCreateEncrypted( // See issue #180
[
'name' => $this->value,
'user_id' => Auth::user()->id,

View File

@ -23,7 +23,7 @@ class TagsComma extends BasicConverter implements ConverterInterface
$strings = explode(',', $this->value);
foreach ($strings as $string) {
$tag = Tag::firstOrCreateEncrypted( // TODO use repository
$tag = Tag::firstOrCreateEncrypted( // See issue #180
[
'tag' => $string,
'tagMode' => 'nothing',

View File

@ -23,7 +23,7 @@ class TagsSpace extends BasicConverter implements ConverterInterface
$strings = explode(' ', $this->value);
foreach ($strings as $string) {
$tag = Tag::firstOrCreateEncrypted( // TODO use repository
$tag = Tag::firstOrCreateEncrypted( // See issue #180
[
'tag' => $string,
'tagMode' => 'nothing',

View File

@ -154,9 +154,9 @@ class AssetAccount implements PostProcessorInterface
$name = $this->data['asset-account-name'] ?? '';
$iban = $this->data['asset-account-iban'] ?? '';
// create if not exists: // TODO should be through repository.
// create if not exists: // See issue #180
$name = strlen($name) > 0 ? $name : $iban;
$account = Account::firstOrCreateEncrypted( // TODO use repository
$account = Account::firstOrCreateEncrypted(
[
'user_id' => Auth::user()->id,
'account_type_id' => $accountType->id,
@ -211,7 +211,8 @@ class AssetAccount implements PostProcessorInterface
return $entry;
}
}
// create if not exists: // TODO use repository
// create if not exists:
// See issue #180
$account = Account::firstOrCreateEncrypted(
[
'user_id' => Auth::user()->id,
@ -249,7 +250,7 @@ class AssetAccount implements PostProcessorInterface
'name' => $accountNumber,
'accountType' => 'asset',
'virtualBalance' => 0,
'virtualBalanceCurrency' => 1, // TODO hard coded.
'virtualBalanceCurrency' => 1, // hard coded.
'active' => true,
'user' => Auth::user()->id,
'iban' => null,
@ -257,7 +258,7 @@ class AssetAccount implements PostProcessorInterface
'accountRole' => null,
'openingBalance' => 0,
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => 1, // TODO hard coded.
'openingBalanceCurrency' => 1, // hard coded.
];
$account = $repository->store($accountData);

View File

@ -125,7 +125,7 @@ class OpposingAccount implements PostProcessorInterface
// create if not exists:
$name = is_string($this->data['opposing-account-name']) && strlen($this->data['opposing-account-name']) > 0 ? $this->data['opposing-account-name']
: $this->data['opposing-account-iban'];
$account = Account::firstOrCreateEncrypted( // TODO use repository
$account = Account::firstOrCreateEncrypted( // See issue #180
[
'user_id' => Auth::user()->id,
'account_type_id' => $accountType->id,
@ -195,7 +195,7 @@ class OpposingAccount implements PostProcessorInterface
}
}
// create if not exists:
$account = Account::firstOrCreateEncrypted( // TODO use repository
$account = Account::firstOrCreateEncrypted( // See issue #180
[
'user_id' => Auth::user()->id,
'account_type_id' => $accountType->id,