phpstan.neon 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. 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