This commit is contained in:
James Cole
2020-09-18 16:14:17 +02:00
parent f3eaf1dd4c
commit 7a80caf26b
5 changed files with 8 additions and 39 deletions

View File

@@ -39,19 +39,7 @@ use Log;
*/
class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
{
/** @var User */
private $user;
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(get_class($this));
}
}
private User $user;
/**
* @param AvailableBudget $availableBudget
@@ -99,7 +87,7 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
$query->where(
static function (Builder $q1) use ($start, $end) {
$q1->where('start_date', '=', $start->format('Y-m-d 00:00:00'));
$q1->where('end_date', '=', $end->format('Y-m-d 00:00:00'));
$q1->where('end_date', '=', $end->format('Y-m-d 23:59:59'));
}
);
}

View File

@@ -44,17 +44,6 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
{
private User $user;
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(get_class($this));
}
}
/**
* Tells you which amount has been budgeted (for the given budgets)
* in the selected query. Returns a positive amount as a string.

View File

@@ -41,19 +41,7 @@ use Log;
*/
class OperationsRepository implements OperationsRepositoryInterface
{
/** @var User */
private $user;
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(get_class($this));
}
}
private User $user;
/**
* A method that returns the amount of money budgeted per day for this budget,