phpmd
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 measured by PHP Depend
What XERJ indexed
Snapshot
Only src/Rule/CleanCode, src/Utility, tests/resources/files/Rule/CleanCode/UndefinedVariable at commit b0f328de45 (2026-10-04). 3.x is 14 commits ahead.
Selected work

“Fix #991 UndefinedVariable false positives for static properties from…”. 11 files, 473 lines in tests, src/Utility, src/Rule.
Licence
The repository
LICENSE file checked at the pinned commit; the author agreed to inclusion.
The XERJ corpus
The author agreed by email on 2026-10-12. Same terms as the repository. Answers name the repo, the commit and the file:line.
selected for the XERJ Corpus Hublicence clearedsuggested use: adapt with attribution
mess-detectorphppmdstatic-analysisstatic-analyzerclean-codehacktoberfest
Example questions
- How does phpmd implement mess-detector?
- What does src/Utility do in phpmd?
- Show the php code in phpmd.
Inside the indexed corpus
- 974 files, 1.9 MB in total, about 2.0 KB per file.
- The selected commit changed 11 of those files (1.1%).
- Languages by size: PHP 98.6%, XSLT 0.8%, CSS 0.5%, Batchfile 0%.
- On GitHub since 2011-01-29, last push 2026-10-20, 2,961 commits on 3.x.
- The pin is 14 commits behind 3.x; the corpus answers from the pinned code, not the newest.
Licence on GitHub and in the corpus
GitHub reported BSD-3-Clause for phpmd/phpmd on 2026-10-31, and the LICENSE file at commit b0f328de45 was reviewed as BSD-3-Clause. They match, so answers from this corpus carry the same terms as the live repository.
Contributors
Jillur Rahman (@developerjillur) has 1 selected repository on the hub.
Using XERJ with phpmd
- How do I run syntax-aware code search? phpmd is tagged static-analysis on GitHub.
- XERJ vs ast-grep: syntax search and an index
- Audit a PHP codebase with an index, not grep PHP is 98.6% of the code by size.
- Best grep alternative for AI coding agents (2026)
The prompt
Paste it into your AI agent. It clones phpmd/phpmd at the pinned commit and indexes it on your machine.
Search the GitHub repository phpmd/phpmd with XERJ (https://hub.xerj.org/corpus/phpmd--phpmd). Run these in a shell, in order, and check each result before the next: 1. xerj --help (success: it prints usage). If xerj is missing: curl -fsSL https://xerj.org/get | sh 2. git clone https://github.com/phpmd/phpmd phpmd && git -C phpmd checkout b0f328de45f7af9a7355f794cf016779a763955c 3. Start a local node and leave it running: xerj --insecure --data-dir ./xerj-data 4. xerj autoindex ./phpmd --url http://127.0.0.1:9200 --prefix phpmd --progress plain 5. xerj autoindex map --url http://127.0.0.1:9200 Then answer my question from the indexed files and cite the ax_path of every hit. Query syntax: https://xerj.org/llms.txt Licence: BSD-3-Clause. Keep the copyright notice and credit the authors.
Related
Jillur RahmanWeb and frontend platform corporatikvqwikxobotyi--cc-foundry-phpChrisAbner/Cordon-Modulithsymfony/symfonyfazal305/keelwatch
Stats: GitHub API, fetched 2026-10-31. Snapshot: the git tree at the pinned commit. Selected work and consent: the XERJ registry.