PHPackages                             alanwillms/php-hound - 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. alanwillms/php-hound

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

alanwillms/php-hound
====================

Runs a set of quality assurance tools for PHP.

0.7.1(10y ago)113034[3 issues](https://github.com/alanwillms/php-hound/issues)[1 PRs](https://github.com/alanwillms/php-hound/pulls)PHP

Since Aug 7Pushed 7y ago4 watchersCompare

[ Source](https://github.com/alanwillms/php-hound)[ Packagist](https://packagist.org/packages/alanwillms/php-hound)[ RSS](/packages/alanwillms-php-hound/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (10)Used By (0)

PHP Hound
=========

[](#php-hound)

[![Build Status](https://camo.githubusercontent.com/8e9ab841c94202b470e34333a81d66661a762918ba8906c44dac054ecde3ec68/68747470733a2f2f7472617669732d63692e6f72672f616c616e77696c6c6d732f7068702d686f756e642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alanwillms/php-hound)[![Code Climate](https://camo.githubusercontent.com/b230526d996595b5d411ce17cd51b8e0602dbce97ad2004086ba78ceae0349ac/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616c616e77696c6c6d732f7068702d686f756e642f6261646765732f6770612e737667)](https://codeclimate.com/github/alanwillms/php-hound)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/19da6e2668089f549611356fdcb71b84059eda2087754fb1e937e871cc95ab02/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c616e77696c6c6d732f7068702d686f756e642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alanwillms/php-hound/?branch=master)[![Test Coverage](https://camo.githubusercontent.com/9f27e7421a3ab6b858adcabacfeb28108a2fe5980e4d65562e493f36e94a3692/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616c616e77696c6c6d732f7068702d686f756e642f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/alanwillms/php-hound/coverage)[![Packagist Version](https://camo.githubusercontent.com/828a76bdf66dcf13f84dec9ffc7c42376cbe96cc55f5c68885aff3e3eb50ffd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c616e77696c6c6d732f7068702d686f756e642e737667)](https://packagist.org/packages/alanwillms/php-hound)[![Total Downloads](https://camo.githubusercontent.com/ee46cbd1296572e628d9c23bb737c8aeb70d3ac9a22f8982e45a8c2a39f6492b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c616e77696c6c6d732f7068702d686f756e642e737667)](https://packagist.org/packages/alanwillms/php-hound)

**This is a work in progress!**

PHP Hound runs a set of quality assurance tools for PHP and reduce results to a single beautiful report.

It currently supports:

- [PHPCodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer): code style and identation according to [PSR-2](http://www.php-fig.org/psr/psr-2/).
- [PHPCopyPasteDetector](https://github.com/sebastianbergmann/phpcpd): duplicated code detection.
- [PHPMessDetector](https://github.com/phpmd/phpmd): checks for complex, unused, broken or unclear code.

[![HTML index page example](html-index.png)](html-index.png)

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

[](#installation)

PHP Hound can be installed through [Composer](https://getcomposer.org).

### Local installation

[](#local-installation)

To install it locally, run the following command:

```
composer require alanwillms/php-hound
```

Then you can execute PHP Hound by running `./vendor/bin/php-hound`.

### Global installation

[](#global-installation)

You can install PHP Hound globally with:

```
composer global require alanwillms/php-hound
```

Then you can add `~/.composer/bin` directory to your `PATH`, so you can simply type `php-hound` to run it from anywhere. If you want to do this, add the following to your `~/.profile` (or `~/.bashrc`) file:

```
export PATH="$HOME/.composer/vendor/bin:$PATH"
```

If you want to apply the changes to your current terminal session, run `source ~/.profile` (or `source ~/bashrc`).

Command line usage
------------------

[](#command-line-usage)

Basic usage:

```
# Analyze current directory files
php-hound

# Analyze "informed/directory/" files
php-hound informed/directory/

# Analyze "script.php" file
php-hound script.php
```

You can run `php-hound --help` to display a list of all available options.

```
php-hound [optional arguments] [path to be analysed]

Optional Arguments:
	-f format, --format format (default: text)
		Output format
	-h, --help
		Prints a usage statement
	-i ignore, --ignore ignore (default: vendor,tests,features,spec)
		Ignore a comma-separated list of directories
	-v, --version
		Prints installed version

```

Gradually fix legacy code
-------------------------

[](#gradually-fix-legacy-code)

If you have a huge base of legacy code, it's really hard to fix all code issues at the same time, in a single commit.

PHP Hound helps you to gradually fix your code by only warning about issues found in the files and lines touched by a branch or commit. All other files or lines will be ignored.

That's pretty easy to achieve:

```
# Usage:
# php-hound --git-diff

# Only return issues found on lines and files changed on the "windows10" branch:
php-hound --git-diff master..windows10 /path/to/git/repo

# Only return issues found on lines and files changed between two commits
php-hound --git-diff b28a1df..4fff883 /path/to/git/repo
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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 ~10 days

Recently: every ~18 days

Total

9

Last Release

3853d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/750b110f062631f035f4762f2b07f8e21de79d750f02e56050f491e3f7fe9d23?d=identicon)[alanwillms](/maintainers/alanwillms)

---

Top Contributors

[![alanwillms](https://avatars.githubusercontent.com/u/704204?v=4)](https://github.com/alanwillms "alanwillms (74 commits)")[![GuidoBR](https://avatars.githubusercontent.com/u/1057287?v=4)](https://github.com/GuidoBR "GuidoBR (2 commits)")

---

Tags

phpcsphpmdqualityqaphpcpd

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alanwillms-php-hound/health.svg)

```
[![Health](https://phpackages.com/badges/alanwillms-php-hound/health.svg)](https://phpackages.com/packages/alanwillms-php-hound)
```

###  Alternatives

[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

598161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k123.5M1.8k](/packages/slevomat-coding-standard)[phpmetrics/phpmetrics

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

2.6k14.5M299](/packages/phpmetrics-phpmetrics)[jbzoo/ci-report-converter

The tool converts different error reporting standards for deep integration with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc)

30784.4k2](/packages/jbzoo-ci-report-converter)[sci3ma/symfony-grumphp

Configured GrumPHP with bunch of tools for static code analysis Symfony Framework

196.7k](/packages/sci3ma-symfony-grumphp)[ec-europa/qa-automation

Extra php codesniffs for QualityAssurance.

10290.4k3](/packages/ec-europa-qa-automation)

PHPackages © 2026

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