Files
ops-Gazelle/misc/phpstan.neon
2025-07-28 16:55:16 +02:00

115 lines
3.5 KiB
Plaintext

includes:
- phpstan-baseline.neon
parameters:
level: 7
checkAlwaysTrueCheckTypeFunctionCall: true
checkAlwaysTrueInstanceof: true
checkAlwaysTrueStrictComparison: true
checkBenevolentUnionTypes: true
checkDynamicProperties: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkMissingCallableSignature: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
polluteScopeWithAlwaysIterableForeach: false
polluteScopeWithLoopInitialAssignments: false
rememberPossiblyImpureFunctionValues: true
reportAlwaysTrueInLastCondition: true
reportAnyTypeWideningInVarTag: true
reportMaybesInMethodSignatures: true
reportStaticMethodSignatures: true
reportWrongPhpDocTypeInVarTag: true
errorFormat: table
bootstrapFiles:
- ../lib/config.php
scanFiles:
- ../lib/bootstrap.php
paths:
- ../lib/util.php
- ../app
- ../bin
- ../classes
- ../misc/phinx
- ../tests
- ../sections
parallel:
maximumNumberOfProcesses: 1
dynamicConstantNames:
- AJAX
- BITCOIN_DONATION_XYZPUB
- BLOCK_TOR
- DISABLE_IRC
- DISABLE_TRACKER
- DEBUG
- DEBUG_CONTEST_PAYOUT
- DEBUG_EMAIL
- DEBUG_MODE
- DEBUG_TRACKER_TOKEN_EXPIRE
- DEBUG_UPLOAD_NOTIFICATION
- DEBUG_WARNINGS
- FEATURE_EMAIL_REENABLE
- GEOIP_SERVER
- HTTP_PROXY
- IMAGE_HOST_BANNED
- IMAGE_HOST_RECOMMENDED
- IMAGE_CACHE_ENABLED
- LASTFM_API_KEY
- MONERO_DONATION_ADDRESS
- OPEN_EXTERNAL_REFERRALS
- OPEN_REGISTRATION
- PASSWORD_CHECK_URL
- PUSH_SERVER_HOST
- PUSH_SERVER_SECRET
- REAPER_TASK_CLAIM
- REAPER_TASK_NOTIFY
- REAPER_TASK_REMOVE_NEVER_SEEDED
- REAPER_TASK_REMOVE_UNSEEDED
- RECOVERY
- RECOVERY_AUTOVALIDATE
- RECOVERY_BUFFER
- RECOVERY_DB
- REFERRAL_SEND_EMAIL
- REQUEST_TAX
- SHOW_PUBLIC_INDEX
- STACKABLE_FREELEECH_TOKENS
- USER_LIMIT
ignoreErrors:
-
message: '/^Function \w+\(\) (?:has parameter \$\w+ with|return type has) no value type specified in iterable type array\.$/'
paths:
- ../lib/util.php
-
message: '/^Method [^:]+::\w+\(\) has parameter \S+ with no (?:type specified|value type specified in iterable type array)\.$/'
paths:
- ../app/*
- ../classes/text.class.php
- ../tests/*
-
message: '/^Method [^:]+::\w+\(\) return type has no value type specified in iterable type array\.$/'
paths:
- ../app/*
- ../classes/text.class.php
- ../misc/phinx/migrations/*
- ../tests/phpunit/*
-
message: '/^PHPDoc tag @var for variable \$\w+ has no value type specified in iterable type array\./'
paths:
- ../sections/*
-
message: '/^Property [^:]+::\$\w+ type has no value type specified in iterable type array\.$/'
paths:
- ../app/*
- ../classes/text.class.php
- ../tests/phpunit/*
-
message: '/^Variable \$(?:Cache|DB|Debug|SessionID|Twig|Viewer) might not be defined\.$/'
paths:
- ../bin/*
- ../sections/*
-
message: '/^Variable \$Types might not be defined\.$/'
paths:
- ../sections/reports/*