diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 35ae66946b..2695684119 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -219,26 +219,6 @@ class BudgetRepository implements BudgetRepositoryInterface } } - /** - * Find a budget. - * - * @param string $name - * - * @return Budget|null - */ - public function findByName(string $name): ?Budget - { - $budgets = $this->user->budgets()->get(['budgets.*']); - /** @var Budget $budget */ - foreach ($budgets as $budget) { - if ($budget->name === $name) { - return $budget; - } - } - - return null; - } - /** * Find a budget or return NULL * diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index decd8d2d21..e2cd595ec0 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -80,15 +80,6 @@ interface BudgetRepositoryInterface */ public function destroyBudgetLimit(BudgetLimit $budgetLimit): void; - /** - * Find a budget. - * - * @param string $name - * - * @return Budget|null - */ - public function findByName(string $name): ?Budget; - /** * @param int|null $budgetId *