mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Add some TODO's, refactor some code.
This commit is contained in:
@@ -92,6 +92,7 @@ class BudgetFactory
|
||||
{
|
||||
/** @var Collection $collection */
|
||||
$collection = $this->user->budgets()->get();
|
||||
// TODO no longer need to loop like this
|
||||
/** @var Budget $budget */
|
||||
foreach ($collection as $budget) {
|
||||
if ($budget->name === $name) {
|
||||
|
||||
@@ -58,6 +58,9 @@ class CategoryFactory
|
||||
$result = null;
|
||||
/** @var Collection $collection */
|
||||
$collection = $this->user->categories()->get();
|
||||
|
||||
// TODO no longer need to loop like this
|
||||
|
||||
/** @var Category $category */
|
||||
foreach ($collection as $category) {
|
||||
if ($category->name === $name) {
|
||||
|
||||
@@ -91,6 +91,9 @@ class PiggyBankFactory
|
||||
public function findByName(string $name): ?PiggyBank
|
||||
{
|
||||
$set = $this->user->piggyBanks()->get();
|
||||
|
||||
// TODO no longer need to loop like this
|
||||
|
||||
/** @var PiggyBank $piggy */
|
||||
foreach ($set as $piggy) {
|
||||
if ($piggy->name === $name) {
|
||||
|
||||
Reference in New Issue
Block a user