Difference between revisions of "OpenEMR PHPStorm Setup"
From OpenEMR Project Wiki
Robert Down (talk | contribs) m (→Code Sniffing) |
Robert Down (talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Code Sniffing == | == Code Sniffing == | ||
OpenEMR | 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) | ||
# [https://www.jetbrains.com/help/phpstorm/php-code-sniffer.html https://www.jetbrains.com/help/phpstorm/php-code-sniffer.html] | |||
# Open Settings '''File''' | # Open Settings '''File''' → '''Settings''' | ||
[[File:2017-07-20_18-44-44.png | [[File:2017-07-20_18-44-44.png]] | ||
# Drill down into '''Editor''' | # Drill down into '''Editor''' → '''Inspections''' | ||
# From the Main Window drill down into '''PHP''' | # From the Main Window drill down into '''PHP''' → '''PHP Code Sniffing validation''' | ||
# From the Detail Window on the right, click the '''<code>...</code>''' button next to "Coding standard" | # From the Detail Window on the right, click the '''<code>...</code>''' button next to "Coding standard" | ||
[[File:Phpstorm64_2017-07-20_18-46-55.png||900px]] | [[File:Phpstorm64_2017-07-20_18-46-55.png||900px]] |
Latest revision as of 21:10, 16 August 2017
- 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.
If you are interested in obtaining a license to use PHPStorm please email Robert Down (robertdown@live.com) or Brady Miller (brady.g.miller@gmail.com)
Code Sniffing
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)
- https://www.jetbrains.com/help/phpstorm/php-code-sniffer.html
- 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