You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There will be a dropdown with label _"Configuration"_, choose _"Local"_.
287
-
Next to the dropdown there will be a button with _"..."_ and once clicked will show a dialog
288
-
were it is possible to select the path for the Code Sniffer executable.
289
-
Navigate inside the `vendor` folder a found the file: `/vendor/bin/phpcs` (`phpcs.bat` in Windows).
286
+
Choose _"Local"_ in the _"Configuration"_ dropdown.
287
+
Click the _"..."_ button next to the dropdown, it will show a dialog
288
+
where you need to specify the path for the Code Sniffer executable.
289
+
Open the file selection dialog, navigate to `vendor/bin/` in your project and select `phpcs` (`phpcs.bat` on Windows).
290
+
Click the _"Validate"_ button next to the path input field, if everything is fine
291
+
a success message will be shown at the bottom of the window.
290
292
291
-
Next to the input for path selection there's a button _"Validate"_, click it, if everything is fine
292
-
a success message will be shown.
293
-
294
-
At this point navigate to the settings:
293
+
Navigate to
295
294
296
295
`Editor` -> `Inspections`
297
296
298
-
From the list of inspections, expand the _"PHP"_ one and scroll down to _"PHP Code Sniffer validation"_
299
-
to enable it.
297
+
Type `codesniffer` in the search field before the list of inspections, select `PHP` -> `Quality Tools` -> `PHP_CodeSniffer validation` and enable it using the checkbox in the list, press _"Apply"_.
300
298
301
-
When selecting _"PHP Code Sniffer validation"_ inspections, on the right there a dropdown to select the
302
-
code style.
299
+
Select _"PHP_CodeSniffer validation"_, press the refresh icon next to the _"Coding standard"_ dropdown on the right and choose `Inpsyde`.
303
300
304
-
If you have created a `phpcs.xml` file, select _"Custom"_ as standard, then using the _"..."_ button
305
-
next to the dropdown for standard selection, you can pick the `phpcs.xml` file.
306
-
In case of no `phpcs.xml` present, it is possible to select _"Inpsyde"_ standard from the dropdown.
307
-
If _"Inpsyde"_ is not present in the dropdown, click the "refresh" icon next to the dropdown.
301
+
If you do not see `Inpsyde` here, you may need to specify `phpcs.xml` file by selecting _"Custom"_ as standard and using the _"..."_ button next to the dropdown.
308
302
309
-
Now PhpStorm integration is complete, and errors in the codestyle will be shown in the IDE editor
310
-
so can be recognized without running any command at all.
303
+
Now PhpStorm integration is complete, and errors in the code style will be shown in the IDE editor
304
+
allowing to detect them without running any commands at all.
0 commit comments