-
-
Notifications
You must be signed in to change notification settings - Fork 39
PHPStorm
Tony Coyle edited this page Dec 10, 2018
·
25 revisions
Recommended IDE (proprietary).
- Demo Video: https://streamable.com/nnqzg
- Demo Video element() autocomplete (NEW): https://streamable.com/ixrbg
In Editor
=> General
- Strip trailing spaces on save for "Modified lines".
- Ensure line feed at file end of Save
In Editor
=> File Types
- Add
*.ctp
to PHP
In Editor
=> Inspections
=> PHP
- Code smell: Too many parameters in function declaration
- Code style: uncheck Unecessary fully qualified name (we need this for doc blocks)
- General: Static method called as dynamic
- PHPDoc: Missing PHPDoc comment
- Probable bugs: Assignment in condition
In Editor
=> CodeStyle
=> PHP
- PHPDoc: Blank line before the first tag
- PHPDoc => Generated Doc Blocks: Use fully-qualified class names
- Blank Lines => Before return statement [1]
- Code Conversion => Array Declaration Style: Force short declaration style
- Code Conversion => Array Declaration Style: Add a comma after last element in multiline array
in Plugins
:
- Add
EditorConfig
plugin.
Further links:
In Languages & Frameworks
=> PHP
=> Servers
add a new Server with the current (.local) domain.
Use the path mapping if you are using a vagrant box like "cakebox".
In Tools
=> External Tools
you can set up cs-sniff
and cs-fix
and then assign them a keyboard shortcut.