Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -128,7 +128,7 @@ trait TransactionServiceTrait
// must be able to find it based on ID. Validator should catch invalid ID's.
return $repository->findNull($accountId);
}
if (strlen($accountName) > 0) {
if (\strlen($accountName) > 0) {
/** @var AccountFactory $factory */
$factory = app(AccountFactory::class);
$factory->setUser($this->user);
@@ -144,7 +144,7 @@ trait TransactionServiceTrait
// must be able to find it based on ID. Validator should catch invalid ID's.
return $repository->findNull($accountId);
}
if (strlen($accountName) > 0) {
if (\strlen($accountName) > 0) {
// alternatively, return by name.
/** @var AccountFactory $factory */
$factory = app(AccountFactory::class);
@@ -222,7 +222,6 @@ trait TransactionServiceTrait
}
$transaction->budgets()->sync([$budget->id]);
return;
}
@@ -239,7 +238,6 @@ trait TransactionServiceTrait
}
$transaction->categories()->sync([$category->id]);
return;
}
@@ -269,7 +267,6 @@ trait TransactionServiceTrait
$transaction->foreign_currency_id = $currency->id;
$transaction->save();
return;
}