Question

I've installed phpmd and I'm trying to set up PhpStorm with it. When I add the path to the phpmd.bat file in PhpStorm "Settings | PHP | Mess Detector" and press validate I get the following error:

PHP Mess Detector
phpmd: /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
@echo: command not found /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
REM: command not found /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
syntax error near unexpected token `(' /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
`REM Copyright (c) 2008-2012, Manuel Pichler  .'

I've installed phpmd with composer:

"require-dev": {
    "phpmd/phpmd": "2.0.*"
}

and I'm running on Mac.

I found a chat were a person was having the same problem and solved it but I wasn't able to solve it the same way http://chat.stackexchange.com/transcript/6/2014/7/11

Any ideas to where the problem lies are greatly appreciated.

Was it helpful?

Solution

It worked when I set the path to the phpmd exec file instead of to the .bat file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top