phpstan.neon.dist 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # https://phpstan.org/config-reference
  2. parameters:
  3. level: 6
  4. treatPhpDocTypesAsCertain: false
  5. paths:
  6. - src
  7. # on ignore les erreurs qui proviennent d'un importe d'un attribut PhpStorm
  8. # on ignore les erreurs qui imposent d'indiquer le type d'un iterable dans la phpDoc (cf: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type)
  9. ignoreErrors :
  10. - '#Attribute class JetBrains\\PhpStorm\\[a-zA-Z]+ does not exist\.#'
  11. - identifier: 'missingType.generics'
  12. - '#Class App\\Repository\\.+Repository has PHPDoc tag @method for method .+\(\) parameter .* with no value type specified in iterable type array\.$#'
  13. # - '#Property .+::\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
  14. ergebnis:
  15. # TODO: simplify by using allRules: false (https://github.com/ergebnis/phpstan-rules?tab=readme-ov-file#enabling-rules-one-by-one)
  16. final:
  17. enabled: false
  18. noExtends:
  19. enabled: false
  20. noNullableReturnTypeDeclaration:
  21. enabled: false
  22. noParameterWithNullableTypeDeclaration:
  23. enabled: false
  24. noParameterWithNullDefaultValue:
  25. enabled: false
  26. noCompact:
  27. enabled: false
  28. noIsset:
  29. enabled: false
  30. finalInAbstractClass:
  31. enabled: false
  32. noConstructorParameterWithDefaultValue:
  33. enabled: false
  34. noParameterWithContainerTypeDeclaration:
  35. enabled: false
  36. noSwitch:
  37. enabled: false
  38. privateInFinalClass:
  39. enabled: false