Setup PHP syntax analysis in code inspection

I'm brand new to PHPStorm, and I can't figure out how to setup code inspections for PHP. In particular, I have a syntax error of the form 

if !empty($field)

i.e. missing parenthesis. The PHPStorm editor highlights this as an error, but code inspection does not find it. I'm sure I haven't set it up properly, but I lcan't figure it out.

 

2 comments

Please check your Specify Inspection Scope window settings (the one you see on Code | Inspect Code).
You either chose a wrong scope or a wrong inspection profile.
http://prntscr.com/mefheg

1

Thanks. My scope was correct, but I had a more basic problem. I had not configured a code sniffer. When I did that, it all worked.

I am a new user to this and I don't use Composer, so I found the docs confusing. Eventually I navigated through them.

0

Please sign in to leave a comment.