phpstan.dist.neon 1.7 KB

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