<p>Whether you <a href="/daily/2024/09/19/the-two-ways-of-writing-php-code">prefer strict code or not</a>, <a href="/daily/2023/04/19/camel-case-or-snake-case-for-drupal-code">use snake-case or camel-case for variable names</a> or <a href="/daily/2022/11/14/camel-case-or-snake-case-for-test-methods">how you write your test methods</a>, it is important to be consistent in how code is written.</p>
<p>If you're working in a file that uses snake-case variable names, you should do the same and follow the same conventions.</p>
<p>When reading a file, everything should be consistent and seem like it was written by the same person following the same approaches.</p>
<p>Otherwise, when you need to add to or refactor this code in the future, it will be harder to do so.</p>
<p>Whether you <a href="/daily/2024/09/19/the-two-ways-of-writing-php-code">prefer strict code or not</a>, <a href="/daily/2023/04/19/camel-case-or-snake-case-for-drupal-code">use snake-case or camel-case for variable names</a> or <a href="/daily/2022/11/14/camel-case-or-snake-case-for-test-methods">how you write your test methods</a>, it is important to be consistent in how code is written.</p>