phpmd
phpmd copied to clipboard
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measure...
In recent years, it has become the best practice to name unused variable, that cannot be removed from code (caught exception that doesn't use, for example) with name `$_`. The...
- PHPMD version: 2.7.0 - PHP Version: 7.0.30 - Installation type: composer - Operating System / Distribution & Version: Windows 10 ### Current Behavior PHPMD does not detect errors located...
Hi! I have discovered that when I use a private variable only in a trait it will give a false positive unused private field warning: Simplified example: ```php trait {...
I encountered these errors: * `Unexpected token: unset` on a function called `unset()` * `Unexpected token: NEW` on a class constant called `NEW` * `Unexpected token: EMPTY` on a class...
Error: ``` Unexpected token: }, line: 15, col: 1, file: /home/samy/Git/portail/app/Pivots/AssoMember.php. ``` Code: ```php /** * .... */ namespace App\Pivots; use App\Models\{ User, Asso, Semester, Role, }; ```
https://github.com/phpmd/phpmd/blob/08a38d44da7865b7938dd6da860c2f44ac19b002/src/main/php/PHPMD/Rule/Design/NumberOfChildren.php#L39 It basically ends up looking like this in the ruleset xml file:
I wanted to inquire about getting the command line option (perhaps an extra flag) to output the priority of an infraction while in text output mode. I would imagine it...
From the read the following example is available as a ruleset: ` This class has too many methods, consider refactoring it. ` It seems it is a phpmd report file...
- PHPMD version: Tested with 2.15, but any version since 2011 is affected (Since 9a8b52114d432a41945cb4d66def015b68e49f30) - PHP Version: PHP 8.1-8.3 (irrelevant) - Installation type: phar via composer (I've started an...