--- date: 2025-07-04 title: Avoiding indentation permalink: /daily/2025/07/04/avoiding-indentation --- A guide that I use when writing or reviewing code is to avoid or minimise indentation. Usually, the nearer to the left of the file the text is, the better. If you had this code: ```php 3) { // Do something... } } } } ``` What if you refactored it to use early returns and remove some indentation? ```php