Move method to correct repository.

This commit is contained in:
James Cole
2019-08-30 07:49:08 +02:00
parent 4cdbea2737
commit e525960320
5 changed files with 34 additions and 22 deletions

View File

@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Budget;
use Exception;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\User;
use Log;
@@ -47,6 +49,20 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
}
}
/**
* Destroy a budget limit.
*
* @param BudgetLimit $budgetLimit
*/
public function destroyBudgetLimit(BudgetLimit $budgetLimit): void
{
try {
$budgetLimit->delete();
} catch (Exception $e) {
Log::info(sprintf('Could not delete budget limit: %s', $e->getMessage()));
}
}
/**
* @param User $user
*/