Php Mess Detector (PHPMD) - Does not work

Hello, I am trying to use php mess detector and so far - no luck.

I have installed phpmd using composer:

 
----------------------------------------------------------
 
> composer install

Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing symfony/filesystem (v2.5.1)
    Loading from cache

  - Installing symfony/config (v2.5.1)
    Loading from cache

  - Installing symfony/dependency-injection (v2.5.1)
    Loading from cache

  - Installing pdepend/pdepend (2.0.0)
    Loading from cache

  - Installing phpmd/phpmd (1.4.1)
    Loading from cache

symfony/dependency-injection suggests installing symfony/yaml ()
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (G
enerate service proxies to lazy load them)
Writing lock file
Generating autoload files
 
----------------------------------------------------------


Then I set up path in PhpStorm, but when i click "Validate" button i see error messages:

2014-07-14 13-27-21 Untitled - Paint.png

It says that script "<pathOnDisk>\_phpMessDetector\vendor\phpmd\phpmd\src\main\php\PHP\PMD\ParserFactory.php" in line 48 failed to include file: "require_once 'PHP/Depend/Autoload.php';"
I checked my directory and i do not have file Autoload.php (with capital "A") anywhere (only vendor/autoload.php), and no directory "Depend" (only "<pathOnDisk>\_phpMessDetector\vendor\pdepend\")

If i just comment out that "require" line - click on "Validate" button gives me green message "PHPMD @package_version@ by Manuel Pichler" and that's it.

2014-07-14 13-38-47 Untitled - Paint.png

I see PHPMD options in Inspections, I checked everything but new PHPMD inspections does not work (for example, it does not say anything about assignment $a = 1, in their example PHPMD reports that variable name is not obvious, not specific).

2014-07-14 13-42-33 Settings.png

What could be wrong?
Thanks!

1 comment
Comment actions Permalink

Hi, your set up looks OK. Try to check PhpStorm logs, there's a lot of very useful information there.
Help menu -> Show Log in Explorer

0

Please sign in to leave a comment.