I don't understand how can I format correctly HTML code when is surrounded between PHP tags when I click "Auto-Indent Lines".
What do I expect:
What PhpStorm does when I click "Auto-Indent Lines".:
Please see comments in WI-17786. In general, it's not currently possible to format HTML mixed with PHP