{"id":28409452,"url":"https://github.com/amochohan/phpunit-code-quality","last_synced_at":"2025-06-25T00:31:14.532Z","repository":{"id":56971962,"uuid":"101517813","full_name":"amochohan/phpunit-code-quality","owner":"amochohan","description":"Check code quality once PHPUnit tests pass","archived":false,"fork":false,"pushed_at":"2017-10-20T08:22:07.000Z","size":18,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T05:55:40.960Z","etag":null,"topics":["code-quality","php","phpunit"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amochohan.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-26T23:00:48.000Z","updated_at":"2023-02-13T16:17:24.000Z","dependencies_parsed_at":"2022-08-21T12:50:15.233Z","dependency_job_id":null,"html_url":"https://github.com/amochohan/phpunit-code-quality","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/amochohan/phpunit-code-quality","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amochohan%2Fphpunit-code-quality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amochohan%2Fphpunit-code-quality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amochohan%2Fphpunit-code-quality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amochohan%2Fphpunit-code-quality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amochohan","download_url":"https://codeload.github.com/amochohan/phpunit-code-quality/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amochohan%2Fphpunit-code-quality/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261782098,"owners_count":23208901,"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","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":["code-quality","php","phpunit"],"created_at":"2025-06-02T08:01:00.430Z","updated_at":"2025-06-25T00:31:14.522Z","avatar_url":"https://github.com/amochohan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHPUnit Code Quality\n\nAutomatically check code quality once your PHPUnit tests pass.\n\n## Installation\n\nInstallation is performed via Composer.\n\n```bash\ncomposer require --dev drawmyattention/phpunit-code-quality\n```\n\nRegister a test listener to your `phpunit.xml` file:\n\n```xml\n\u003clisteners\u003e\n    \u003clistener class=\"DrawMyAttention\\CodeQuality\\Listeners\\ComplexityAnalysisListener\"\u003e\n        \u003carguments\u003e\n            \u003cobject class=\"DrawMyAttention\\CodeQuality\\ComplexityAnalyser\"/\u003e\n            \u003cbool\u003etrue\u003c/bool\u003e\n        \u003c/arguments\u003e\n    \u003c/listener\u003e\n\u003c/listeners\u003e\n```\n\n## Configuring Project Settings\n\nYou can define which directories are scanned for code quality checking, as well as which directories and files are excluded. Sensible defaults are provided. By default, code stored in your `src` directory is checked, and any code in your `tests` directory is excluded.\n\nYou can create a `complexity-analyser-config.php` file in your project's root directory to specify alternative settings. See the provided config file, or copy and paste the following example:\n\n```php\n\nreturn [\n\n    // Directories which should be checked for code quality\n    'scan_directories' =\u003e [\n        'src',\n    ],\n\n    // Directories which should not be checked\n    'excluded_directories' =\u003e [\n        'app/Support',\n        'tests',\n    ],\n\n    // Files which should not be checked\n    'excluded_files' =\u003e [\n        'app/Http/Controllers/SomeController.php',\n    ],\n\n];\n```\n\nBecause this application utilises [PHP Mess Detector](https://github.com/phpmd/phpmd) to check code quality, you can define which rules should be applied when checking code quality. [A full list of rules is available here](https://phpmd.org/rules/index.html).\n\n\n## Contributing\n\nIf you find a bug or would like to contribute to the development of this package, please submit a pull-request (with tests if possible).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famochohan%2Fphpunit-code-quality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famochohan%2Fphpunit-code-quality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famochohan%2Fphpunit-code-quality/lists"}