File: //home/shrsglobal/www/wp-content/plugins/woocommerce/vendor/wordpress/mcp-adapter/phpstan.neon.dist
parameters:
# Rules
treatPhpDocTypesAsCertain: false
inferPrivatePropertyTypeFromConstructor: true
checkExplicitMixedMissingReturn: true
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkTooWideReturnTypesInProtectedAndPublicMethods: true
polluteScopeWithAlwaysIterableForeach: false
polluteScopeWithLoopInitialAssignments: false
reportAlwaysTrueInLastCondition: true
reportStaticMethodSignatures: true
reportWrongPhpDocTypeInVarTag: true
# Configuration
level: 8
phpVersion:
min: 70400
max: 80400
bootstrapFiles:
- mcp-adapter.php
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
paths:
- includes/
scanFiles:
# These are needed due config.platform.php being 7.4 in composer.json and wordpress-stubs not including polyfills.
# See <https://github.com/php-stubs/wordpress-stubs/issues/100>.
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_contains.php
- vendor/phpstan/php-8-stubs/stubs/ext/standard/str_starts_with.php
scanDirectories:
- ../abilities-api
excludePaths:
analyse:
- tests/
- vendor/
analyseAndScan:
- node_modules (?)
ignoreErrors:
- # TODO: These are too noisy, we'll restore them in the future.
identifier: missingType.iterableValue