PHPackages                             drawmyattention/phpunit-code-quality - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. drawmyattention/phpunit-code-quality

ActiveLibrary[Testing &amp; Quality](/categories/testing)

drawmyattention/phpunit-code-quality
====================================

Automatically PHP check code quality once PHPUnit tests pass

1.0.1(8y ago)8262[2 issues](https://github.com/amochohan/phpunit-code-quality/issues)MITPHP

Since Aug 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/amochohan/phpunit-code-quality)[ Packagist](https://packagist.org/packages/drawmyattention/phpunit-code-quality)[ RSS](/packages/drawmyattention-phpunit-code-quality/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

PHPUnit Code Quality
====================

[](#phpunit-code-quality)

Automatically check code quality once your PHPUnit tests pass.

Installation
------------

[](#installation)

Installation is performed via Composer.

```
composer require --dev drawmyattention/phpunit-code-quality
```

Register a test listener to your `phpunit.xml` file:

```

            true

```

Configuring Project Settings
----------------------------

[](#configuring-project-settings)

You 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.

You 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:

```
return [

    // Directories which should be checked for code quality
    'scan_directories' => [
        'src',
    ],

    // Directories which should not be checked
    'excluded_directories' => [
        'app/Support',
        'tests',
    ],

    // Files which should not be checked
    'excluded_files' => [
        'app/Http/Controllers/SomeController.php',
    ],

];
```

Because 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).

Contributing
------------

[](#contributing)

If you find a bug or would like to contribute to the development of this package, please submit a pull-request (with tests if possible).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Total

2

Last Release

3177d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a8a6d7576ffbce954cdfe28b99409f1575f9ebea23ece6e6bd0498e0d5d9159?d=identicon)[drawmyattention](/maintainers/drawmyattention)

---

Top Contributors

[![amochohan](https://avatars.githubusercontent.com/u/2978619?v=4)](https://github.com/amochohan "amochohan (11 commits)")[![ttomdewit](https://avatars.githubusercontent.com/u/2845400?v=4)](https://github.com/ttomdewit "ttomdewit (1 commits)")

---

Tags

code-qualityphpphpunit

### Embed Badge

![Health badge](/badges/drawmyattention-phpunit-code-quality/health.svg)

```
[![Health](https://phpackages.com/badges/drawmyattention-phpunit-code-quality/health.svg)](https://phpackages.com/packages/drawmyattention-phpunit-code-quality)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M960](/packages/brianium-paratest)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M40.1k](/packages/orchestra-testbench)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M294](/packages/laravel-horizon)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.3k](/packages/infection-infection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
