0

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 https://chat.stackexchange.com/transcript/6/2014/7/11

Any ideas to where the problem lies are greatly appreciated.

Community
  • 1
  • 1
Swoot
  • 1,304
  • 11
  • 12
  • Why are you trying to use `.bat` file (which is for **Windows ONLY**) on you Mac? – LazyOne Aug 01 '14 at 19:35
  • Sorry I didn't know that. It's my first time on mac :) Which file should i point the path to @LazyOne? – Swoot Aug 02 '14 at 12:27
  • Never mind now that I've stopped trying to make the .bat file work and changed to the exec file it worked a lot better. Thank you for your help @LazyOne – Swoot Aug 02 '14 at 12:36

1 Answers1

0

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

Swoot
  • 1,304
  • 11
  • 12