Hot tip 🔥
If you're passing a lot of arguments to a constructor or method, try to see if you can group them and create a new class/object with the arguments as properties. It'll better describe the domain and provide additional documentation🙂 #php #phpc
P.S. these are called DTOs (Data Transfer Objects) or Value Objects
Open source. Open community. We are dedicated to building and enriching the PHP community.