I was asked to implement PHPMD at work (as well as PHPCS... another upcoming posted question, I assume). I am not very Linux-savvy, either. Sorry.
I followed the download instructions on PHPMD. I used Composer and got all the dependencies properly (I assume). I placed them in the usr/bin directory with full permissions.
I tried using the terminal to enter the command line on the documentation page, except with the changes being relevant to my machine and I wanted the output to be a file I can save for documentation.
PHPMD Command
phpmd sampleFile.php xml codesize --reportfile report.xml
Output File
<?xml version="1.0" encoding="UTF-8" ?>
<pmd version="@project.version@" timestamp="2016-01-28T14:10:47-05:00">
</pmd>
This doesn't look like the response that is shown in the PHPMD documentation. Any guesses as to what I did wrong? I am not sure if I should be looking into something that I did wrong with PHPMD or something that I did wrong with Linux. I am using a Linux Red Hat v6.7 (Santiago) VM, if you care.
Thank you!
phpmd does not seem to show any output for scripts that have no functions or classes (pure spaghetti code). I wonder if there is a way to enable this?