OpenEMR PHPStorm Setup
From OpenEMR Project Wiki
- This document is based on PHPStorm 2017.2
OpenEMR currently has several free licenses available to developers interested in using PHPStorm as their primary IDE. Note that OpenEMR owns the licenses and our agreement with JetBrains (developer of PHPStorm) stipulates that our PHPStorm licenses may only be used for development of OpenEMR, no commercial property.
OpenEMR Coding Standards require new code to be PSR-2/4 compliant. PHPStorm can analyze your code in real time, giving feedback to improve your quality of code. These steps should be the same for all 3 major platforms (Windows, macOS, Linux)
- Open Settings File → Settings
- Drill down into Editor → Inspections
- From the Main Window drill down into PHP → PHP Code Sniffing validation
- From the Detail Window on the right, click the
...button next to "Coding standard"
- Enter the path
<Your openemr root directory>/ci/phpcs_strict.xml
- Click Ok to return to the main settings window
- You can modify the settings to show errors as you like
- Click Ok