phpstan.dist.neon 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. parameters:
  2. phpVersion:
  3. min: 80100 # PHP 8.1
  4. max: 80599 # PHP 8.5
  5. level: 10 # https://phpstan.org/user-guide/rule-levels
  6. fileExtensions:
  7. - php
  8. - phtml
  9. paths:
  10. - .
  11. excludePaths:
  12. analyse:
  13. - lib/marienfressinaud/*
  14. - lib/phpgt/*
  15. - lib/phpmailer/*
  16. - lib/simplepie/*
  17. analyseAndScan:
  18. - .git/*?
  19. - extensions/node_modules?
  20. - extensions/symbolic?
  21. - extensions/vendor?
  22. - node_modules/*?
  23. - vendor/*
  24. bootstrapFiles:
  25. - cli/_cli.php
  26. - lib/favicons.php
  27. dynamicConstantNames:
  28. - CACHE_PATH
  29. - COPY_LOG_TO_SYSLOG
  30. - COPY_SYSLOG_TO_STDERR
  31. - DATA_PATH
  32. - MAX_LOG_SIZE
  33. - PUBLIC_RELATIVE
  34. - SIMPLEPIE_SYSLOG_ENABLED
  35. - STDERR
  36. - STDOUT
  37. - TMP_PATH
  38. - USERS_PATH
  39. checkBenevolentUnionTypes: true
  40. checkImplicitMixed: true
  41. checkMissingOverrideMethodAttribute: true
  42. checkTooWideReturnTypesInProtectedAndPublicMethods: true
  43. reportAnyTypeWideningInVarTag: true
  44. reportPossiblyNonexistentConstantArrayOffset: true
  45. treatPhpDocTypesAsCertain: false
  46. strictRules:
  47. disallowedEmpty: false
  48. disallowedLooseComparison: false
  49. disallowedShortTernary: false
  50. strictArrayFilter: true
  51. exceptions:
  52. check:
  53. missingCheckedExceptionInThrows: false # TODO pass maybe
  54. tooWideThrowType: true
  55. implicitThrows: false
  56. checkedExceptionClasses:
  57. - 'Minz_Exception'
  58. ignoreErrors:
  59. - '#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.*#'
  60. -
  61. message: '#Access to deprecated#'
  62. path: app/Models/Context.php
  63. includes:
  64. - vendor/phpstan/phpstan-deprecation-rules/rules.neon
  65. - vendor/phpstan/phpstan-phpunit/extension.neon
  66. - vendor/phpstan/phpstan-phpunit/rules.neon
  67. - vendor/phpstan/phpstan-strict-rules/rules.neon