arkitect icon indicating copy to clipboard operation
arkitect copied to clipboard

Why do not merge allClasses() with that(...)?

Open ricfio opened this issue 4 years ago • 1 comments

Feature Request

Q A
New Feature yes
RFC yes
BC Break yes

Summary

Why do not merge the concepts Rule::allClasses() with ->that(...) ?

I think it is more direct write anything as: Rule::allClasses(new ResideInOneOfTheseNamespaces('App\HappyIsland')) or if you prefer: Rule::allClassesThat(new ResideInOneOfTheseNamespaces('App\HappyIsland'))

instead of

Rule::allClasses()->that(new ResideInOneOfTheseNamespaces('App\HappyIsland'))

What would be the pros and cons?

ricfio avatar Dec 13 '21 17:12 ricfio

I prefer the former version, slightly more verbose but more readable

micheleorselli avatar Jan 08 '22 10:01 micheleorselli