phpstan.neon 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. parameters:
  2. # TODO: Increase rule-level https://phpstan.org/user-guide/rule-levels
  3. level: 8
  4. phpVersion: 80399 # TODO: Remove line when moving composer.json to PHP 8+
  5. fileExtensions:
  6. - php
  7. - phtml
  8. paths:
  9. - .
  10. excludePaths:
  11. analyse:
  12. - lib/marienfressinaud/*
  13. - lib/phpgt/*
  14. - lib/phpmailer/*
  15. - lib/SimplePie/*
  16. - vendor/*
  17. analyseAndScan:
  18. - .git/*
  19. - extensions/node_modules
  20. - extensions/symbolic
  21. - extensions/vendor
  22. - node_modules/*
  23. bootstrapFiles:
  24. - cli/_cli.php
  25. - lib/favicons.php
  26. dynamicConstantNames:
  27. - CACHE_PATH
  28. - COPY_LOG_TO_SYSLOG
  29. - COPY_SYSLOG_TO_STDERR
  30. - DATA_PATH
  31. - MAX_LOG_SIZE
  32. - PUBLIC_RELATIVE
  33. - SIMPLEPIE_SYSLOG_ENABLED
  34. - STDERR
  35. - STDOUT
  36. - TMP_PATH
  37. - USERS_PATH
  38. reportMaybesInPropertyPhpDocTypes: false
  39. treatPhpDocTypesAsCertain: false
  40. strictRules:
  41. allRules: false
  42. booleansInConditions: false # TODO pass
  43. closureUsesThis: true
  44. disallowedConstructs: false
  45. disallowedLooseComparison: false
  46. matchingInheritedMethodNames: true
  47. noVariableVariables: true
  48. numericOperandsInArithmeticOperators: true
  49. overwriteVariablesWithLoop: true
  50. requireParentConstructorCall: true
  51. strictCalls: true
  52. switchConditionsMatchingType: true
  53. uselessCast: true
  54. ignoreErrors:
  55. # - '#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.*#'
  56. includes:
  57. - vendor/phpstan/phpstan-phpunit/extension.neon
  58. - vendor/phpstan/phpstan-phpunit/rules.neon
  59. - vendor/phpstan/phpstan-strict-rules/rules.neon
  60. # - vendor/phpstan/phpstan/conf/bleedingEdge.neon