2021-12-31 17:00:51 +01:00
parameters:
# TODO: Increase rule-level https://phpstan.org/user-guide/rule-levels
2023-12-18 17:59:16 +01:00
level: 8
2024-01-15 10:32:30 +01:00
phpVersion: 80399 # TODO: Remove line when moving composer.json to PHP 8+
2021-12-31 17:00:51 +01:00
fileExtensions:
- php
- phtml
paths:
- .
excludePaths:
2023-01-18 10:12:21 +01:00
analyse:
- lib/marienfressinaud/*
2023-04-17 08:30:21 +02:00
- lib/phpgt/*
2023-01-18 10:12:21 +01:00
- lib/phpmailer/*
- lib/SimplePie/*
2023-04-17 08:30:21 +02:00
- vendor/*
2023-01-18 10:12:21 +01:00
analyseAndScan:
- .git/*
2023-11-24 14:50:03 +01:00
- extensions/node_modules
- extensions/symbolic
- extensions/vendor
2023-01-18 10:12:21 +01:00
- node_modules/*
2021-12-31 17:00:51 +01:00
bootstrapFiles:
- cli/_cli.php
- lib/favicons.php
2023-05-04 19:47:54 +02:00
dynamicConstantNames:
- CACHE_PATH
- COPY_LOG_TO_SYSLOG
- COPY_SYSLOG_TO_STDERR
- DATA_PATH
- MAX_LOG_SIZE
2023-05-11 13:02:04 +02:00
- PUBLIC_RELATIVE
2023-05-04 19:47:54 +02:00
- SIMPLEPIE_SYSLOG_ENABLED
- STDERR
- STDOUT
- TMP_PATH
- USERS_PATH
2024-04-10 15:33:43 +02:00
checkMissingOverrideMethodAttribute: true
2023-11-24 14:50:03 +01:00
reportMaybesInPropertyPhpDocTypes: false
2023-12-18 17:59:16 +01:00
treatPhpDocTypesAsCertain: false
2023-05-11 13:02:04 +02:00
strictRules:
allRules: false
booleansInConditions: false # TODO pass
closureUsesThis: true
disallowedConstructs: false
disallowedLooseComparison: false
matchingInheritedMethodNames: true
2023-12-18 17:59:16 +01:00
noVariableVariables: true
2023-05-11 13:02:04 +02:00
numericOperandsInArithmeticOperators: true
overwriteVariablesWithLoop: true
requireParentConstructorCall: true
strictCalls: true
switchConditionsMatchingType: true
uselessCast: true
2024-01-15 10:36:30 +01:00
exceptions:
check:
missingCheckedExceptionInThrows: false # TODO pass
tooWideThrowType: true
implicitThrows: false
checkedExceptionClasses:
- 'Minz_Exception'
2023-12-18 17:59:16 +01:00
ignoreErrors:
# - '#Only booleans are allowed in (a negated boolean|a ternary operator condition|an elseif condition|an if condition|&&|\|\|), (bool|false|int(<[0-9, max]+>)?|true|null|\|)+ given.*#'
2023-04-17 08:30:21 +02:00
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
2023-05-11 13:02:04 +02:00
- vendor/phpstan/phpstan-strict-rules/rules.neon
2023-12-18 17:59:16 +01:00
# - vendor/phpstan/phpstan/conf/bleedingEdge.neon