Make method nullable.

This commit is contained in:
James Cole
2018-08-07 19:29:10 +02:00
parent 229d033e1a
commit c5051b3e46
4 changed files with 10 additions and 10 deletions

View File

@@ -166,7 +166,7 @@ class AccountController extends Controller
*/
public function expenseBudgetAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
$start = $repository->oldestJournalDate($account);
$start = $repository->oldestJournalDate($account) ?? Carbon::now()->startOfMonth();
$end = Carbon::now();
return $this->expenseBudget($account, $start, $end);
@@ -229,7 +229,7 @@ class AccountController extends Controller
*/
public function expenseCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
$start = $repository->oldestJournalDate($account);
$start = $repository->oldestJournalDate($account) ?? Carbon::now()->startOfMonth();
$end = Carbon::now();
return $this->expenseCategory($account, $start, $end);
@@ -320,7 +320,7 @@ class AccountController extends Controller
*/
public function incomeCategoryAll(AccountRepositoryInterface $repository, Account $account): JsonResponse
{
$start = $repository->oldestJournalDate($account);
$start = $repository->oldestJournalDate($account) ?? Carbon::now()->startOfMonth();
$end = Carbon::now();
return $this->incomeCategory($account, $start, $end);