Php Inspections (EA Extended)

Compatible with: IntelliJ IDEA PhpStorm
150 067
For support and donations please visit Github | Issues | PayPal.

Please follow me at twitter for status updates.

This plugin is a Static Code Analysis tool for PHP (aka inspections in JetBrains products).

It covers:
- architecture related issues (e.g. design pattern violations)
- weak types control and possible code construct simplifications
- performance issues
- non-optimal, duplicate and suspicious "if" conditions
- validation of magic methods usage
- regular expressions
- validation of exception handling workflow
- compatibility issues
- variety of time-consuming bugs
- PhpUnit API usage
- security issues

Some of inspections are expecting conditional statements (e.g. "if") to use group statement for wrapping body expressions. If this requirement is met then additional inspections are applied to the source code.

For Mac shortcuts, see this reference card. Windows/Linux ones are:
Alt + Shift + I to inspect current file with current profile
Ctrl + Alt + Shift + I to run inspection by name
Ctrl + Shift + F4 to close results of inspection.

On some projects CPU and therefore battery usage could be intensive, so it should be taken into account when traveling with a laptop.

Download plugin

Recent change notes

Our crowdfunding campaign needs your support! This release brings important bug-fixes and new inspections.

- Empty class: resolved false-positives (inheriting abstract classes)
- Incomplete throw statements: resolved false-positives (%s, non-exception classes being reported)
- Non-optimal regular expression: resolve false-positives (suggested ctype_* are locale-dependent)
- Power operator can be used: bug-fix (incorrect QFing in some cases)
- Unnecessary double quotes: bug-fix ("" was not reported)
- 'explode()' misused: QF implemented
- 'file_put_contents(...)' misused: resolved false-positives (method calls)
- 'isset(...)' usage: resolved false-positives (@property annotations)
- *printf/*scanf arguments count mismatches: resolved false-positives (*scanf %[...] modifiers, variadic variables)

- Argument unpacking can be used: implemented
- Redundant 'else' keyword: implemented
- Strings normalization: implemented