Are there best practices for simplifying and improving the readability of PHP code that uses ternary operators?

When using ternary operators in PHP code, it's important to maintain readability and simplicity for easier understanding by other developers. One way to achieve this is by breaking down complex ternary expressions into multiple lines with clear indentation and formatting. Additionally, using descriptive variable names and comments can also help improve the readability of the code.

// Original code with ternary operator
$result = ($condition) ? 'Value if true' : 'Value if false';

// Improved code with expanded ternary operator
$result = ($condition)
    ? 'Value if true'
    : 'Value if false';