Skip to content

Commit d18dcaf

Browse files
authored
update and simplify PhpStorm readme
1 parent 9bf9f0c commit d18dcaf

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

README.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -279,32 +279,26 @@ class Foo
279279
## PhpStorm
280280

281281
After having installed the package as explained above in the _"Installation"_ section,
282-
open PhpStorm settings, and navigate the settings:
282+
open PhpStorm settings, and navigate to
283283

284-
`Language & Frameworks` -> `PHP` -> `Code Sniffer`
284+
`Language & Frameworks` -> `PHP` -> `Quality Tools` -> `PHP_CodeSniffer`
285285

286-
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 (it should be in the `vendor` directory).
289+
Enter `vendor/bin/phpcs` (`vendor/bin/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.
290292

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
295294

296295
`Editor` -> `Inspections`
297296

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"_.
300298

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`.
303300

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.
308302

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

Comments
 (0)