Files
ops-Gazelle/misc/phpstan.neon

162 lines
4.7 KiB
Plaintext

includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
- phpstan-baseline.neon
parameters:
level: 7
checkBenevolentUnionTypes: true
checkDynamicProperties: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkMissingCallableSignature: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
polluteScopeWithAlwaysIterableForeach: false
polluteScopeWithBlock: false
polluteScopeWithLoopInitialAssignments: false
rememberPossiblyImpureFunctionValues: true
reportAlwaysTrueInLastCondition: true
reportAnyTypeWideningInVarTag: true
reportMaybesInMethodSignatures: true
reportMaybesInPropertyPhpDocTypes: true
reportPossiblyNonexistentConstantArrayOffset: true
reportPossiblyNonexistentGeneralArrayOffset: true
reportStaticMethodSignatures: true
reportWrongPhpDocTypeInVarTag: true
strictRules:
booleansInConditions: false
booleansInLoopConditions: false
closureUsesThis: true
disallowedBacktick: true
disallowedEmpty: false
disallowedImplicitArrayCreation: false
disallowedLooseComparison: false
disallowedShortTernary: false
dynamicCallOnStaticMethod: true
illegalConstructorMethodCall: true
matchingInheritedMethodNames: true
noVariableVariables: false
numericOperandsInArithmeticOperators: true
overwriteVariablesWithLoop: false
requireParentConstructorCall: false
strictArrayFilter: true
strictFunctionCalls: false
switchConditionsMatchingType: true
uselessCast: true
errorFormat: table
bootstrapFiles:
- ../lib/config.php
scanFiles:
- ../lib/bootstrap.php
paths:
- ../lib/util.php
- ../app
- ../bin
- ../classes
- ../misc
- ../tests
- ../sections
parallel:
jobSize: 20
maximumNumberOfProcesses: 12
minimumNumberOfJobsPerProcess: 2
dynamicConstantNames:
- AJAX
- BITCOIN_DONATION_XYZPUB
- BLOCK_TOR
- BONUS_UPLOAD_BOOST_ACTIVE
- DISABLE_IRC
- DISABLE_TRACKER
- DEBUG
- DEBUG_CONTEST_PAYOUT
- DEBUG_EMAIL
- DEBUG_TRACKER_TOKEN_EXPIRE
- DEBUG_TWIG
- DEBUG_UPLOAD_NOTIFICATION
- 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
- SECURE_COOKIE
- SHOW_PUBLIC_INDEX
- STACKABLE_FREELEECH_TOKENS
- USER_LIMIT
ignoreErrors:
-
identifier: offsetAccess.notFound
-
identifier: staticMethod.dynamicCall
paths:
- ../tests/phpunit/*
-
message: '#^Cannot unset property \S+ because it might have hooks in a subclass\.$#'
reportUnmatched: false
paths:
- ../app/*
- ../tests/phpunit/*
-
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/phpunit/*
-
message: '/^Method [^:]+::\w+\(\) return type has no value type specified in iterable type array\.$/'
paths:
- ../app/*
- ../classes/text.class.php
- ../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/*