Fix various phpstan things

This commit is contained in:
James Cole
2023-11-29 06:30:35 +01:00
parent 1c3cb85a46
commit b9feb0aa71
19 changed files with 77 additions and 78 deletions

View File

@@ -48,13 +48,12 @@ class JavascriptController extends Controller
* Show info about accounts.
*
* @param AccountRepositoryInterface $repository
* @param CurrencyRepositoryInterface $currencyRepository
*
* @return Response
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function accounts(AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
public function accounts(AccountRepositoryInterface $repository): Response
{
$accounts = $repository->getAccountsByType(
[AccountType::DEFAULT, AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD]
@@ -104,7 +103,6 @@ class JavascriptController extends Controller
*
* @param Request $request
* @param AccountRepositoryInterface $repository
* @param CurrencyRepositoryInterface $currencyRepository
*
* @return Response
* @throws FireflyException
@@ -112,7 +110,7 @@ class JavascriptController extends Controller
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function variables(Request $request, AccountRepositoryInterface $repository, CurrencyRepositoryInterface $currencyRepository): Response
public function variables(Request $request, AccountRepositoryInterface $repository): Response
{
$account = $repository->find((int)$request->get('account'));
$currency = app('amount')->getDefaultCurrency();
@@ -147,11 +145,9 @@ class JavascriptController extends Controller
/**
* Bit of a hack but OK.
*
* @param Request $request
*
* @return Response
*/
public function variablesV2(Request $request): Response
public function variablesV2(): Response
{
/** @var Carbon $start */
$start = clone session('start', today(config('app.timezone'))->startOfMonth());