Laravel Shift uses the Laravel coding style guide, which is based on the PSR-2 coding standard. To set up code formatting in PhpStorm to match Laravel Shift's style, you can follow these steps:
- Open PhpStorm and go to "Preferences" (or "Settings" on Windows) from the main menu.
- In the left sidebar, navigate to "Editor" -> "Code Style" -> "PHP".
- In the "PHP" tab, select the "Set from..." dropdown and choose "Predefined Style" -> "PSR1/PSR2".
- Click on the "Tabs and Indents" tab and make sure the following settings are configured:
- "Use tab character": unchecked
- "Tab size": 4
- "Indent": 4
- "Continuation indent": 8
- Click on the "Wrapping and Braces" tab and make sure the following settings are configured:
- "Brace placement" -> "In new line for control statements": unchecked
- "Brace placement" -> "In new line for method declaration": unchecked
- "Brace placement" -> "In new line for other constructs": unchecked
- "Method declaration parameters" -> "Align when multiline": unchecked
- "Method call arguments" -> "Align when multiline": unchecked
- Click "OK" to save the changes.
By following these steps, your PhpStorm IDE will be configured to match the Laravel Shift coding style.