PHPMD - the PHP Mess Detector -- is a code quality analysis tool for PHP, similar to PMD for Java.
Questions tagged [phpmd]
80 questions
0
votes
1 answer
PHP Mess Detector integration with Teamcity
I have Teamcity 7.0.3 installed with different projects. I want to use PHP Mess Detector. I want to have limited set of rules from PHP Mess Detector. And different set of rules for every project. So my questions are
1: How can I modify default…

user1635914
- 125
- 10
0
votes
1 answer
PHPMD setup in Jenkins
I am having trouble setting up Mess Detector in Jenkins.
The code I want to run, which works in terminal is:
phpmd /var/www/sitename/site/src/private/app xml codesize,unusedcode,naming,design
--reportfile /var/www/sitename/messdetector.xml…

ConquestXD
- 754
- 1
- 8
- 18
-1
votes
1 answer
Else is never necessary for an array operation
PHPMD says 'Else is never necessary' for the following code:
if (!isset($myArray[$myKey])) { // or in_array
$myArray[$myKey] = $myValue;
} else {
$myArray[$myKey] += $myValue;
}
Is it possible to write this code in a cleaner way without a…

tolga
- 2,462
- 4
- 31
- 57
-1
votes
1 answer
Will you please tell me how to set custom phpmd ruleset file in netbeans 8.1?
I'm installing phpmd into netbeans and it gives me error also but what if I want to set my custom ruleset file in netbeans 8.1?

hemali savaliya
- 69
- 1
- 7
-10
votes
2 answers
According to Standards Recommendations How many properties are allowed in class
Here some example of code
class A {
public $attribute1;
public $attribute2;
public $attribute3;
........
public $attributeN;
}
I need to know how many properties I can have in the class.
What say about this PSR or phpmd or…

Aram Grigoryan
- 740
- 1
- 6
- 24