Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -46,8 +46,6 @@ class PiggyBankController extends Controller
/**
* PiggyBankController constructor.
*
*/
public function __construct()
{
@@ -61,10 +59,6 @@ class PiggyBankController extends Controller
*
* TODO this chart is not multi currency aware.
*
* @param PiggyBankRepositoryInterface $repository
* @param PiggyBank $piggyBank
*
* @return JsonResponse
* @throws FireflyException
*/
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
@@ -83,7 +77,7 @@ class PiggyBankController extends Controller
// get first event or start date of piggy bank or today
$startDate = $piggyBank->startdate ?? today(config('app.timezone'));
/** @var PiggyBankEvent|null $firstEvent */
/** @var null|PiggyBankEvent $firstEvent */
$firstEvent = $set->first();
$firstDate = null === $firstEvent ? new Carbon() : $firstEvent->date;