Files
firefly-iii/.ci/phpstan.neon

72 lines
3.5 KiB
Plaintext
Raw Normal View History

parameters:
2025-01-03 15:53:10 +01:00
scanFiles:
2025-01-03 19:07:29 +01:00
- ../_ide_helper
2025-01-03 15:53:10 +01:00
paths:
- ../app
- ../database
- ../routes
- ../config
- ../bootstrap/app.php
2023-10-29 17:41:14 +01:00
universalObjectCratesClasses:
- Illuminate\Database\Eloquent\Model
2023-11-05 10:16:53 +01:00
# TODO: slowly remove these parameters and fix the issues found.
2023-10-29 17:41:14 +01:00
reportUnmatchedIgnoredErrors: false
2020-07-31 15:12:26 +02:00
ignoreErrors:
2023-11-05 10:16:53 +01:00
# TODO: slowly remove these exceptions and fix the issues found.
2025-01-03 15:53:10 +01:00
- '#Dynamic call to static method#' # all the Laravel ORM things depend on this.
- identifier: varTag.nativeType
- identifier: varTag.type
2025-01-03 19:07:29 +01:00
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::before#'
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::after#'
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::withTrashed#'
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::accountTypeIn#'
- '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsTo::withTrashed#'
2025-01-03 15:07:30 +01:00
# - '#Control structures using switch should not be used.#' # switch is fine in some cases.
# - '#with no value type specified in iterable type array#' # remove this rule when all other issues are solved.
# - '#has no value type specified in iterable type array#' # remove this rule when all other issues are solved.
# - '#is not allowed to extend#'
# - '#does not specify its types#'
# - '#switch is forbidden to use#'
# - '#is neither abstract nor final#'
# - '#on left side of \?\?\= always exists and is not nullable#'
# - '#has a nullable return type declaration#' # perhaps throw errors instead?
# - '#with a nullable type declaration#' # decide what action should be if param is null.
# - '#with null as default value#'
# -
# message: '#Constructor in [a-zA-Z0-9\\_]+ has parameter \$[a-zA-Z0-9\\_]+ with default value#'
# paths:
# - ../app/Exceptions/IntervalException.php
# - ../app/Support/Navigation.php
# -
# message: '#but containers should not be injected#'
# paths:
# - ../app/Support/Authentication/RemoteUserGuard.php
# -
# message: '#Function compact\(\) should not be used#' # too useful in template rendering.
# paths:
# - ../app/Generator/Report/Account/MonthReportGenerator.php
# - ../app/Generator/Report/Audit/MonthReportGenerator.php
# - ../app/Generator/Report/Budget/MonthReportGenerator.php
# - ../app/Generator/Report/Category/MonthReportGenerator.php
# - ../app/Generator/Report/Standard/MonthReportGenerator.php
# - ../app/Generator/Report/Standard/MultiYearReportGenerator.php
# - ../app/Generator/Report/Standard/YearReportGenerator.php
# - ../app/Generator/Report/Tag/MonthReportGenerator.php
# - ../app/Http/Controllers/Account/*.php
# - ../app/Http/Controllers/Admin/*.php
# - ../app/Http/Controllers/*.php
# - ../app/Support/ExpandedForm.php
# - ../app/Support/Form/AccountForm.php
# - ../app/Support/Form/CurrencyForm.php
# - ../app/Support/Form/FormSupport.php
# -
# message: '#Either catch a more specific exception#'
# paths:
# - ../app/Support/Form/FormSupport.php
2025-01-03 15:53:10 +01:00
2020-07-31 15:12:26 +02:00
# The level 8 is the highest level. original was 5
2023-12-02 07:05:34 +01:00
# 7 is more than enough, higher just leaves NULL things.
2025-01-03 19:16:38 +01:00
level: 3
2022-12-31 15:54:55 +01:00