phpstan.neon.dist 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. - '#Constructor of ApiPlatform\\Metadata\\[a-zA-Z]+ is invoked with named argument#'
  15. ergebnis:
  16. # TODO: simplify by using allRules: false (https://github.com/ergebnis/phpstan-rules?tab=readme-ov-file#enabling-rules-one-by-one)
  17. final:
  18. enabled: false
  19. noExtends:
  20. enabled: false
  21. noNullableReturnTypeDeclaration:
  22. enabled: false
  23. noParameterWithNullableTypeDeclaration:
  24. enabled: false
  25. noParameterWithNullDefaultValue:
  26. enabled: false
  27. noCompact:
  28. enabled: false
  29. noIsset:
  30. enabled: false
  31. finalInAbstractClass:
  32. enabled: false
  33. noConstructorParameterWithDefaultValue:
  34. enabled: false
  35. noParameterWithContainerTypeDeclaration:
  36. enabled: false
  37. noSwitch:
  38. enabled: false
  39. privateInFinalClass:
  40. enabled: false