Skip to content
Mark Sch edited this page Mar 16, 2018 · 26 revisions

PHPStorm

Recommended IDE (proprietary).

Must have

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
  • Other: Blank line before return statement
  • Other => Array Declaration Style: Force short declaration style
  • Other => Array Declaration Style: Add a comma after last element in multiline array

in Plugins:

  • Add EditorConfig plugin.

Further links:

Nice to have

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.

Clone this wiki locally