Files
development/phpstan.neon
2024-11-01 14:42:04 +09:00

66 lines
1.8 KiB
Plaintext

# PHP Stan Config
includes:
- phpstan-conditional.php
#- ./vendor/yamadashy/phpstan-friendly-formatter/extension.neon
parameters:
tmpDir: %currentWorkingDirectory%/tmp/phpstan-corelibs
#errorFormat: friendly
#friendly:
# lineBefore: 3
# lineAfter: 3
level: 8 # max is now 9
# strictRules:
# allRules: true
checkMissingCallableSignature: true
treatPhpDocTypesAsCertain: false
paths:
- %currentWorkingDirectory%/www
bootstrapFiles:
- %currentWorkingDirectory%/phpstan-bootstrap.php
- %currentWorkingDirectory%/www/vendor/autoload.php
scanDirectories:
- www/vendor
scanFiles:
- www/configs/config.php
- www/configs/config.master.php
excludePaths:
# do not check old qq file uploader tests
- www/admin/qq_file_upload_*.php
- www/admin/error_test.php
# admin synlink files
- www/admin/edit_*.php
# config symlinks
- www/admin/config.php
- www/frontend/config.php
- www/frontend/*/config.php
# ignore admin header stuff
# - www/includes/admin_header.php # ignore the admin include stuff
- www/includes/admin_footer.php # ignore the admin include stuff
# folders with data no check needed
- www/templates_c
- www/cache
- www/log
- www/media
- www/tmp
# ignore composer
- www/vendor
# ignore errores with
ignoreErrors:
# - # in the class_test tree we allow deprecated calls
# message: "#^Call to deprecated method #"
# path: %currentWorkingDirectory%/www/admin/class_test.*.php
# - '#Expression in empty\(\) is always falsy.#'
# -
# message: '#Reflection error: [a-zA-Z0-9\\_]+ not found.#'
# path: www/includes/edit_base.php
#- 'error regex'
#-
# message: 'error regex'
# path: %currentWorkingDirectory%/www/some/*
# paths:
# - ...
# - ...
# -
# message: "#^Call to deprecated method #"
# path: www/admin/class_test*.php