fix phpstan warnings

This commit is contained in:
James Cole
2025-01-03 15:53:10 +01:00
parent d95f3ca59f
commit fe4d139817
173 changed files with 374 additions and 360 deletions

View File

@@ -71,7 +71,7 @@ class EditController extends Controller
/**
* Edit account overview. It's complex, but it just has a lot of if/then/else.
*
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings("PHPMD.NPathComplexity")
*
* @return Factory|Redirector|RedirectResponse|View
*/

View File

@@ -163,7 +163,7 @@ class LoginController extends Controller
/**
* Get the failed login response instance.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*
* @throws ValidationException
*/

View File

@@ -483,7 +483,7 @@ class BudgetController extends Controller
*
* Suppress warning because this method will be replaced by API calls.
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
* @SuppressWarnings("PHPMD.ExcessiveParameterList")
*/
public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{

View File

@@ -69,7 +69,7 @@ class ExpenseReportController extends Controller
*
* TODO this chart is not multi currency aware.
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse
{

View File

@@ -133,7 +133,7 @@ class ReportController extends Controller
/**
* Shows income and expense, debit/credit: operations.
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{

View File

@@ -60,8 +60,8 @@ class RecurrenceController extends Controller
/**
* Shows all events for a repetition. Used in calendar.
*
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings("PHPMD.NPathComplexity")
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
*
* @throws FireflyException
*/

View File

@@ -211,8 +211,8 @@ class PreferencesController extends Controller
*
* @throws FireflyException
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
* @SuppressWarnings("PHPMD.NPathComplexity")
*/
public function postIndex(PreferencesRequest $request)
{

View File

@@ -124,7 +124,7 @@ class CreateController extends Controller
/**
* @return Factory|\Illuminate\Contracts\View\View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function createFromJournal(Request $request, TransactionJournal $journal)
{

View File

@@ -156,7 +156,7 @@ class CategoryController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function accounts(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
{
@@ -358,7 +358,7 @@ class CategoryController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function categories(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
{

View File

@@ -165,7 +165,7 @@ class DoubleController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function operations(Collection $accounts, Collection $double, Carbon $start, Carbon $end)
{

View File

@@ -59,7 +59,7 @@ class TagController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function accountPerTag(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
{
@@ -153,7 +153,7 @@ class TagController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function accounts(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
{
@@ -355,7 +355,7 @@ class TagController extends Controller
/**
* @return Factory|View
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function tags(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
{

View File

@@ -76,7 +76,7 @@ class Authenticate
* @throws FireflyException
* @throws AuthenticationException
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
*/
protected function authenticate($request, array $guards)
{

View File

@@ -52,7 +52,7 @@ class RecurrenceFormRequest extends FormRequest
*
* @throws FireflyException
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
public function getAll(): array
{