God Type (ARCH9189)
Ce contenu n’est pas encore disponible dans votre langue.
Key swift.quality.god-class · Severity warning · Category quality
Flags classes/structs with more than 20 functions or 15 stored properties. A type with no functions - a Codable DTO, a payload shape - is a data shape, not a god type.
Incorrect
Section titled “Incorrect”final class OrderManager { /* 35 functions: pricing, tax, shipping, email, pdf, audit... */ }Correct
Section titled “Correct”struct OrderPricing; struct OrderShipping; final class OrderNotificationsSplit by responsibility.