If you write simple code, it is quicker and easier to read, extend and change.
If you need to work on that code in the future - either tomorrow or in months or years - it will be easier to add the new feature or fix the bug.
It will also be easier for others who didn't write it, so they must understand what it does (or doesn't do) before making changes.
It will also likely be easier to debug with tools like Xdebug and PHPStan or upgrade with tools like Rector.
- Oliver
Was this interesting?
About me
I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.