{"id":15089029,"url":"https://github.com/pascal-splotches/php-composter-phpmd","last_synced_at":"2026-01-04T17:03:07.481Z","repository":{"id":57057037,"uuid":"150649689","full_name":"pascal-splotches/php-composter-phpmd","owner":"pascal-splotches","description":"Automatically install a git pre-commit hook to check your PHP files upon each commit to make sure they follow the rules defined in phpmd.xml. ","archived":false,"fork":false,"pushed_at":"2018-09-28T12:15:42.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T09:16:05.141Z","etag":null,"topics":["composer","githook","phpmd"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pascal-splotches.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-27T21:25:03.000Z","updated_at":"2018-09-28T12:12:17.000Z","dependencies_parsed_at":"2022-08-24T06:01:02.119Z","dependency_job_id":null,"html_url":"https://github.com/pascal-splotches/php-composter-phpmd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pascal-splotches/php-composter-phpmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-splotches%2Fphp-composter-phpmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-splotches%2Fphp-composter-phpmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-splotches%2Fphp-composter-phpmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-splotches%2Fphp-composter-phpmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pascal-splotches","download_url":"https://codeload.github.com/pascal-splotches/php-composter-phpmd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-splotches%2Fphp-composter-phpmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28206358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-04T02:00:06.065Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","githook","phpmd"],"created_at":"2024-09-25T08:39:19.580Z","updated_at":"2026-01-04T17:03:07.443Z","avatar_url":"https://github.com/pascal-splotches.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Composter PHPMD \r\n\r\n![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)\r\n\r\nAutomatically install a git pre-commit hook to check your PHP files upon each commit to make sure they follow the rules defined in `phpmd.xml`. \r\n\r\n## Table Of Contents\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Built With](#built-with)\r\n- [Contributing](#contributing)\r\n- [Versioning](#versioning)\r\n- [Authors](#authors)\r\n- [License](#license)\r\n\r\n## Installation\r\n\r\nAdd as a development requirement to your `composer.json`:\r\n\r\n```bash\r\ncomposer require --dev pascal-splotches/php-composter-phpmd\r\n```\r\n\r\n## Usage\r\n\r\nIt automatically works whenever you execute a `git commit`.\r\n\r\n## Configuration\r\n\r\nYou need to add a configuration section to your `phpmd.xml` ruleset with the correct flags and paths:\r\n\r\n```xml\r\n\u003cconfiguration\u003e\r\n    \u003c!-- Required --\u003e\r\n    \u003csource\u003e\r\n        \u003cpath\u003esrc\u003c/path\u003e\r\n        \u003c!-- \u003cpath\u003e\u003c/path\u003e... --\u003e\r\n    \u003c/source\u003e\r\n    \r\n    \u003c!-- Optional --\u003e\r\n    \u003cexclude\u003e\r\n        \u003cpath\u003edocs\u003c/path\u003e\r\n        \u003c!-- \u003cpath\u003e\u003c/path\u003e... --\u003e\r\n    \u003c/exclude\u003e\r\n    \r\n    \u003c!-- Required --\u003e\r\n    \u003coutput mode=\"text\"/\u003e\r\n    \r\n    \u003c!-- Optional --\u003e\r\n    \u003cminimum-priority value=\"5\"/\u003e\r\n    \u003creport file=\"report.txt\"/\u003e\r\n    \r\n    \u003c!-- Optional --\u003e\r\n    \u003csuffixes\u003e\r\n        \u003csuffix\u003ephp\u003c/suffix\u003e\r\n        \u003c!-- \u003csuffix\u003e\u003c/suffix\u003e... --\u003e\r\n    \u003c/suffixes\u003e\r\n    \r\n    \u003c!-- Optional --\u003e\r\n    \u003cstrict/\u003e\r\n\u003c/configuration\u003e\r\n```\r\n\r\n## Built With\r\n\r\n- [Composter](https://github.com/php-composter/php-composter)\r\n- [PHP Mess Detector](https://phpmd.org/)\r\n\r\n## Contributing\r\n\r\nAll feedback, bug reports and pull requests are welcomed.\r\n\r\n## Versioning\r\n\r\nWe use [SemVer](https://semver.org/) for versioning. For the versions available, see the [releases on this repository](https://github.com/pascal-splotches/php-composter-phpmd/releases).\r\n\r\n## Authors\r\n\r\n- Pascal Scheepers \u003cpascal@splotch.es\u003e\r\n\r\n## License\r\n\r\nThis project is licensed under the GPL v3 License - see the [LICENSE](./LICENSE) file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascal-splotches%2Fphp-composter-phpmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascal-splotches%2Fphp-composter-phpmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascal-splotches%2Fphp-composter-phpmd/lists"}