PHPackages                             treehouselabs/standards - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. treehouselabs/standards

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

treehouselabs/standards
=======================

Development standards by and for TreeHouse employees

v0.2(8y ago)347.6k↓93.3%2MITPHPPHP &gt;=7.1

Since Mar 7Pushed 7y ago9 watchersCompare

[ Source](https://github.com/treehouselabs/standards)[ Packagist](https://packagist.org/packages/treehouselabs/standards)[ RSS](/packages/treehouselabs-standards/feed)WikiDiscussions master Synced today

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

Using code standards in TreeHouse projects
==========================================

[](#using-code-standards-in-treehouse-projects)

This repository provides documentation and tools to help comply with our code standards.

Code standards
--------------

[](#code-standards)

We mostly adhere to the [Symfony code style](http://symfony.com/doc/current/contributing/code/standards.html), but each project can define its own rules. What's more important than specific rules, is that everyone applies them, consistently. That's what this repository aims to help with.

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

[](#installation)

To install in a project, add this as a dev dependency:

```
composer require --dev treehouselabs/standards
```

### Configuration

[](#configuration)

Copy the distributed `.php_cs` file, modify where needed:

```
cp vendor/treehouselabs/standards/.php_cs .
```

**NOTE**: Make sure that `.php_cs.cache` is in `.gitignore`!

```
vendor/
.php_cs.cache
composer.lock
```

### Travis

[](#travis)

When the fixer is run as a Travis script, builds fail when there is a CS violation. Add this to `.travis.yml`:

```
script:
  - bin/php-cs-fixer fix --config=.php_cs --verbose --diff --dry-run
```

For increased performance, make sure to cache the fixer's cache dir:

```
cache:
  directories:
    - $HOME/.php-cs-fixer
```

Usage
-----

[](#usage)

There are multiple ways to integrate CS in your workflow. Here are some methods that we use:

### Just write it yourself 😄

[](#just-write-it-yourself-smile)

Not the easiest way, but if it suits you, adopt the code style, and write it that way. No fixes needed!

### Apply manually

[](#apply-manually)

At any time before committing, run the fixer manually:

```
./bin/php-cs-fixer fix -v
```

This can also be done using a [plugin](http://cs.sensiolabs.org/#helpers) for your editor of choice.

### Using a git commit hook

[](#using-a-git-commit-hook)

The repository ships with a git pre-commit hook that automatically fixes your code before committing it. Be careful however since this can modify code without you seeing it.

```
cp vendor/treehouselabs/standards/hooks/pre-commit .git/pre-commit
chmod +x .git/pre-commit
```

Of course if you prefer a different method, that's cool. Whatever works. Again, the important thing is that it's applied consistently.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.5% 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 ~217 days

Total

2

Last Release

3187d ago

PHP version history (2 changes)0.1PHP &gt;=7.0

v0.2PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5eceacbc3912547ac51ba584798cc5a7c1bfae49b714978f62b6e1af389307dd?d=identicon)[fieg](/maintainers/fieg)

---

Top Contributors

[![pkruithof](https://avatars.githubusercontent.com/u/330828?v=4)](https://github.com/pkruithof "pkruithof (60 commits)")[![fieg](https://avatars.githubusercontent.com/u/1086908?v=4)](https://github.com/fieg "fieg (15 commits)")[![cleentfaar](https://avatars.githubusercontent.com/u/795661?v=4)](https://github.com/cleentfaar "cleentfaar (9 commits)")[![ChristianVermeulen](https://avatars.githubusercontent.com/u/1062751?v=4)](https://github.com/ChristianVermeulen "ChristianVermeulen (7 commits)")[![oldskool](https://avatars.githubusercontent.com/u/567664?v=4)](https://github.com/oldskool "oldskool (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/treehouselabs-standards/health.svg)

```
[![Health](https://phpackages.com/badges/treehouselabs-standards/health.svg)](https://phpackages.com/packages/treehouselabs-standards)
```

###  Alternatives

[redaxo/php-cs-fixer-config

php-cs-fixer config for REDAXO

10105.6k17](/packages/redaxo-php-cs-fixer-config)

PHPackages © 2026

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