phpstan.neon 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. checkMissingOverrideMethodAttribute: true
  39. reportMaybesInPropertyPhpDocTypes: false
  40. treatPhpDocTypesAsCertain: false
  41. strictRules:
  42. allRules: false
  43. booleansInConditions: false # TODO pass
  44. closureUsesThis: true
  45. disallowedConstructs: false
  46. disallowedLooseComparison: false
  47. matchingInheritedMethodNames: true
  48. noVariableVariables: true
  49. numericOperandsInArithmeticOperators: true
  50. overwriteVariablesWithLoop: true
  51. requireParentConstructorCall: true
  52. strictCalls: true
  53. switchConditionsMatchingType: true
  54. uselessCast: true
  55. exceptions:
  56. check:
  57. missingCheckedExceptionInThrows: false # TODO pass
  58. tooWideThrowType: true
  59. implicitThrows: false
  60. checkedExceptionClasses:
  61. - 'Minz_Exception'
  62. ignoreErrors:
  63. # - '#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.*#'
  64. includes:
  65. - vendor/phpstan/phpstan-phpunit/extension.neon
  66. - vendor/phpstan/phpstan-phpunit/rules.neon
  67. - vendor/phpstan/phpstan-strict-rules/rules.neon
  68. # - vendor/phpstan/phpstan/conf/bleedingEdge.neon