config.phpstan.neon 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. parameters:
  2. autoload_files:
  3. - phpstan/config.example_install_for_phpstan.php
  4. autoload_directories:
  5. - tests/include
  6. excludes_analyse:
  7. - install
  8. - config.php
  9. - assets
  10. - phpstan
  11. - phpcs
  12. - tools
  13. - vendor
  14. - upload.php
  15. ignoreErrors:
  16. # -
  17. # message: '~^If condition is always true\.$~'
  18. # path: 'include/ClientSession.class.php'
  19. # -
  20. # message: '~^If condition is always true\.$~'
  21. # path: 'include/Statistic.class.php'
  22. # -
  23. # message: '~^Offset int does not exist on array\(\)\|array\(int\)\.$~'
  24. # path: 'include/StkImage.class.php'
  25. - '~^Parameter \#2 \$value of method XMLWriter::writeAttribute\(\) expects string, (?:int|float) given\.$~'
  26. - '~^Parameter \#2 \$value of method XMLWriter::writeAttribute\(\) expects string, \(int\|false\) given\.$~'
  27. level: 5
  28. rules:
  29. #- PHPStan\Rules\BooleansInConditions\BooleanInBooleanAndRule
  30. #- PHPStan\Rules\BooleansInConditions\BooleanInBooleanNotRule
  31. #- PHPStan\Rules\BooleansInConditions\BooleanInBooleanOrRule
  32. #- PHPStan\Rules\BooleansInConditions\BooleanInElseIfConditionRule
  33. #- PHPStan\Rules\BooleansInConditions\BooleanInIfConditionRule
  34. #- PHPStan\Rules\BooleansInConditions\BooleanInTernaryOperatorRule
  35. #- PHPStan\Rules\DisallowedConstructs\DisallowedEmptyRule
  36. - PHPStan\Rules\DisallowedConstructs\DisallowedImplicitArrayCreationRule
  37. - PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule
  38. - PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule
  39. - PHPStan\Rules\Methods\MissingMethodParameterTypehintRule
  40. - PHPStan\Rules\Methods\MissingMethodReturnTypehintRule
  41. - PHPStan\Rules\Methods\WrongCaseOfInheritedMethodRule
  42. - PHPStan\Rules\Operators\OperandsInArithmeticAdditionRule
  43. - PHPStan\Rules\Operators\OperandsInArithmeticDivisionRule
  44. - PHPStan\Rules\Operators\OperandsInArithmeticExponentiationRule
  45. - PHPStan\Rules\Operators\OperandsInArithmeticModuloRule
  46. - PHPStan\Rules\Operators\OperandsInArithmeticMultiplicationRule
  47. - PHPStan\Rules\Operators\OperandsInArithmeticSubtractionRule
  48. - PHPStan\Rules\Properties\MissingPropertyTypehintRule
  49. - PHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsRule
  50. #- PHPStan\Rules\StrictCalls\StrictFunctionCallsRule
  51. - PHPStan\Rules\SwitchConditions\MatchingTypeInSwitchCaseConditionRule
  52. services:
  53. -
  54. class: PHPStan\Rules\BooleansInConditions\BooleanRuleHelper
  55. -
  56. class: PHPStan\Rules\Operators\OperatorRuleHelper
  57. dynamicConstantNames:
  58. - API_MODE
  59. - CRON_MODE
  60. - DEBUG_MODE
  61. - DEBUG_TOOLBAR
  62. - IS_SMTP
  63. - IS_SSL_CERTIFICATE_VALID
  64. - MAINTENANCE_MODE
  65. - SENDMAIL_PATH
  66. - TEST_MODE
  67. includes:
  68. # phpunit extension and rules
  69. - ../vendor/phpstan/phpstan-phpunit/extension.neon
  70. - ../vendor/phpstan/phpstan-phpunit/rules.neon
  71. # webmozart/assert extension
  72. - ../vendor/phpstan/phpstan-webmozart-assert/extension.neon