If you're working in a file that uses snake-case variable names, you should do the same and follow the same conventions.
When reading a file, everything should be consistent and seem like it was written by the same person following the same approaches.
Otherwise, when you need to add to or refactor this code in the future, it will be harder to do so.
Consistency is key.
- 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.