Right-click a folder in the Project tool window → Reformat Code → choose scope.
Ctrl + Alt + L (Windows/Linux) or ⌘ + ⌥ + L (macOS). phpstorm format code
Use Code → Run Code Cleanup – it applies formatting + fixes low-priority inspection warnings (e.g., convert array to short syntax). Right-click a folder in the Project tool window
Go to .
Consistent code style isn’t just about looks—it improves readability, reduces merge conflicts, and enforces standards. PhpStorm makes this effortless with built-in formatting tools. reduces merge conflicts
Before formatting, you should ensure your IDE knows which "style" to follow. Navigate to (or PhpStorm | Settings on macOS).