You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rule::noClass()
->should(newResideInOneOfTheseNamespaces(
"Prima\Service",
"Prima\Entity"
))->because("Those namespaces have been deprecated in favor of the new modular architecture");
This rule is already implementable in the following way:
Rule::allClasses()
->that(newResideInOneOfTheseNamespaces(
"Prima\Service",
"Prima\Entity"
))->should(
newNotResideInTheseNamespaces(
"Prima\Service",
"Prima\Entity"
)
)->because("Those namespaces have been deprecated in favor of the new modular architecture");
But it looks awkward to me to read.
Furthermore, it would be easier to express rules like the following:
Rule::noClass()
->should(newHaveNameMatching("*Manager"))
->because("of our naming convention services should be named with a more self-explanatory name");
Activity