Steps to import PhpStorm Code Style Schemes:
- From the main menu:
File > Manage IDE Settings > Settings Repository
Note: For older PhpStorm versions, this may be under
File -> Settings > Tools -> Settings Repository
- Paste
https://github.com/northernco/northern-phpstorm-settings.git
as the Upstream URL and clickOverwrite Local
- You may need a GitHub Personal Access Token if it prompts you for one.
- Restart PhpStorm
You should now be able to select a code style scheme by doing the following:
- From the main menu:
File -> Settings
- Navigate to:
Editor -> Code Style
- Open the
Scheme
dropdown - The list should now include Northern code styles
Unfortunately not all settings can be imported using the Settings Repository tool.
Please set the following settings below using File -> Settings
:
Editor -> General
below theOn Save
heading, checkEnsure every saved file ends with a line break
andRemove trailing blank lines at the end of saved files
Editor -> General -> Auto Import
below thePHP
heading, uncheck bothEnable auto-import in file scope
andEnable auto-import in namespace scope
Editor -> Inspections
navigate toPHP -> Code Style -> Fully qualified name usage
and changeSeverity
toNo highlighting, only fix
Editor -> File Types
selectPHP
and add*.theme
as a file name pattern
PhpStorm will automatically change the code styles if it detects that the project is on Drupal.
After setting up the project in PhpStorm, please double check that the Northern Drupal
code styles are being used.