Skip to content

Commit fe4185e

Browse files
committed
Update instructions
1 parent 953debc commit fe4185e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,27 @@ Errors and warnings reported by PHP Code Sniffer on-the-fly are displayed as pop
117117
Install coding standard for development
118118
_See Installation steps._
119119

120-
Configure PhpStorm
120+
**Configure PhpStorm**
121121
* Open Preference: "Settings > Preferences > Editor > Inspections > PHP > Quality Tools".
122-
* Select a checkbox next to "PHP Code Sniffer validation" option.
123-
* On the right-hand pane of the page, configure the PHP Code Sniffer tool using the controls in the "Options" area:
124-
* From the "Severity" list, choose the "Error" for the PHP Code Sniffer inspection.
125-
* From the "Scope" list, choose the "Changed Files" to limit the inspection application to only changed files.
126-
* In the "Check files with extensions" field, provide the comma-separated list of file extensions that should be checked by PHP Code Sniffer.
127-
* To have PHP Code Sniffer report warnings in addition to errors, select the "Show warnings as..." checkbox and choose the "Errors" from the list.
122+
* Choose "PHP_CodeSniffer validation" option.
123+
* It is ok to configure everything under the scope "Everything else":
124+
* In the "Check files with extensions" field, provide the comma-separated list of file extensions that should be checked by PHP Code Sniffer: php, js, phtml.
125+
* Installed standard path should be checked and selected project path
126+
```
127+
/path/to/your/folder/vendor/magento-ecg/coding-standard
128+
```
128129
* Choose installed coding standard path as the main for standards
129-
* Select "EcgM2" it the "Coding standard" list.
130+
* Select "EcgM2" or "Custom" it the "Coding standard" list.
131+
132+
![PHP Storm](image/php_storm.png)
130133

131134
https://www.jetbrains.com/help/phpstorm/using-php-code-sniffer.html#installing-configuring-code-sniffer
132135

133136
Note: We would also suggest enabling PHP Mess Detector validation as well.
134-
135137
Note: in case of using a Docker or VM, It needs to configure new PHPCS CLI Interpreter which will point out to VM/Docker.
136138

137139

140+
138141
# Requirements
139142

140143
PHP 5.4 and up.

image/php_storm.png

287 KB
Loading

0 commit comments

Comments
 (0)