Various bugfixes and code clean up.

This commit is contained in:
James Cole
2018-07-27 04:46:21 +02:00
parent 2ad8e7f343
commit 0312ba8ad7
60 changed files with 223 additions and 353 deletions

View File

@@ -54,7 +54,9 @@ class BoxController extends Controller
*/
public function available(BudgetRepositoryInterface $repository): JsonResponse
{
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = session('end', Carbon::now()->endOfMonth());
$today = new Carbon;
$cache = new CacheProperties;
@@ -111,7 +113,9 @@ class BoxController extends Controller
public function balance(CurrencyRepositoryInterface $repository): JsonResponse
{
// Cache result, return cache if present.
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = session('end', Carbon::now()->endOfMonth());
$cache = new CacheProperties;
$cache->addProperty($start);
@@ -195,7 +199,9 @@ class BoxController extends Controller
*/
public function bills(BillRepositoryInterface $repository): JsonResponse
{
/** @var Carbon $start */
$start = session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
$end = session('end', Carbon::now()->endOfMonth());
$cache = new CacheProperties;