First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -43,7 +43,6 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
use Log;
use Navigation;
use Symfony\Component\Debug\Exception\FatalThrowableError;
/**
* Class BudgetRepository.
@@ -107,7 +106,7 @@ class BudgetRepository implements BudgetRepositoryInterface
// delete limits with amount 0:
try {
BudgetLimit::where('amount', 0)->delete();
} catch (Exception|FatalThrowableError $e) {
} catch (Exception $e) {
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
}
Budget::where('order', 0)->update(['order' => 100]);
@@ -122,7 +121,7 @@ class BudgetRepository implements BudgetRepositoryInterface
// delete it!
try {
BudgetLimit::find($budgetLimit->id)->delete();
} catch (Exception|FatalThrowableError $e) {
} catch (Exception $e) {
Log::debug(sprintf('Could not delete budget limit: %s', $e->getMessage()));
}
}
@@ -863,7 +862,6 @@ class BudgetRepository implements BudgetRepositoryInterface
/**
* @param array $data
*
* @throws FireflyException
* @return BudgetLimit
*/
public function storeBudgetLimit(array $data): BudgetLimit

View File

@@ -120,8 +120,8 @@ interface BudgetRepositoryInterface
public function getAvailableBudget(TransactionCurrency $currency, Carbon $start, Carbon $end): string;
/**
* @param Carbon $start
* @param Carbon $end
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/