What are the best practices for adding whitespace and formatting in PHP code to ensure readability and maintainability?

Adding whitespace and proper formatting in PHP code is essential for improving readability and maintainability. It is recommended to use consistent indentation, spacing around operators, and line breaks between logical sections of code. This makes the code easier to read and understand for both the original developer and anyone who may need to work on it in the future.

// Example of well-formatted PHP code
function calculateTotal($price, $quantity) {
    $total = $price * $quantity;

    return $total;
}