phpstan.neon 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. parameters:
  2. level: 9 # https://phpstan.org/user-guide/rule-levels
  3. phpVersion: 80399 # TODO: Remove line when moving composer.json to PHP 8+
  4. fileExtensions:
  5. - php
  6. - phtml
  7. paths:
  8. - .
  9. excludePaths:
  10. analyse:
  11. - lib/marienfressinaud/*
  12. - lib/phpgt/*
  13. - lib/phpmailer/*
  14. - lib/SimplePie/*
  15. - vendor/*
  16. analyseAndScan:
  17. - .git/*
  18. - extensions/node_modules
  19. - extensions/symbolic
  20. - extensions/vendor
  21. - node_modules/*
  22. bootstrapFiles:
  23. - cli/_cli.php
  24. - lib/favicons.php
  25. dynamicConstantNames:
  26. - CACHE_PATH
  27. - COPY_LOG_TO_SYSLOG
  28. - COPY_SYSLOG_TO_STDERR
  29. - DATA_PATH
  30. - MAX_LOG_SIZE
  31. - PUBLIC_RELATIVE
  32. - SIMPLEPIE_SYSLOG_ENABLED
  33. - STDERR
  34. - STDOUT
  35. - TMP_PATH
  36. - USERS_PATH
  37. checkMissingOverrideMethodAttribute: true
  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. exceptions:
  55. check:
  56. missingCheckedExceptionInThrows: false # TODO pass
  57. tooWideThrowType: true
  58. implicitThrows: false
  59. checkedExceptionClasses:
  60. - 'Minz_Exception'
  61. ignoreErrors:
  62. # - '#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.*#'
  63. includes:
  64. - vendor/phpstan/phpstan-phpunit/extension.neon
  65. - vendor/phpstan/phpstan-phpunit/rules.neon
  66. - vendor/phpstan/phpstan-strict-rules/rules.neon
  67. # - vendor/phpstan/phpstan/conf/bleedingEdge.neon