PHPackages                             robloach/php\_codesniffer\_drupal - 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. robloach/php\_codesniffer\_drupal

Abandoned → [drupal/coder](/?search=drupal%2Fcoder)Library

robloach/php\_codesniffer\_drupal
=================================

Drupal Code Sniffer

010PHP

Since May 13Pushed 12y ago1 watchersCompare

[ Source](https://github.com/RobLoach/PHP_CodeSniffer_Drupal)[ Packagist](https://packagist.org/packages/robloach/php_codesniffer_drupal)[ RSS](/packages/robloach-php-codesniffer-drupal/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Drupal Code Sniffer [![Build Status](https://camo.githubusercontent.com/54e1d3cb723e1155113b5e342273b53543649b864f49714f605fc227b4c0b167/68747470733a2f2f7472617669732d63692e6f72672f526f624c6f6163682f5048505f436f6465536e69666665725f44727570616c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RobLoach/PHP_CodeSniffer_Drupal)
================================================================================================================================================================================================================================================================================================================================================

[](#drupal-code-sniffer-)

Drupal standards for [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). This is a copy from [Coder module](http://drupal.org/project/coder)'s [Code Sniffer](https://drupal.org/node/1419980). It's a prototype of seeing if it would be possible to abstract it away from Coder and [Drush](https://github.com/drush-ops/drush) entirely. This allows the Drupal Code Sniffer standard definition to be managed and run completely independently from Coder or Drush.

Why?
----

[](#why)

There are number of benefits from running the code independently from the Coder module and Drush:

- Steps towards [encapsulation](http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming))
- [Travis tests](https://travis-ci.org/RobLoach/PHP_CodeSniffer_Drupal)
- Can be run without needing Coder or Drush installed
- Can have releases independent from Coder module

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

[](#installation)

### Drush

[](#drush)

```
drush dl composer-8.x
drush composer require global robloach/php_codesniffer_drupal @dev

```

### Composer

[](#composer)

```
composer require global robloach/php_codesniffer_drupal @dev

```

Usage
-----

[](#usage)

### Shell

[](#shell)

```
~/.composer/vendor/bin/drupalcs /path/to/module

```

### PHP\_CodeSniffer

[](#php_codesniffer)

```
phpcs --standard ~/.composer/vendor/robloach/php_code_sniffer_drupal /path/to/module

```

Test
----

[](#test)

```
phpunit

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a85a85ea4ad6e54bbb6491dcfaadaccecdb8abb16407da8d51a0678b57481116?d=identicon)[klausi](/maintainers/klausi)

![](https://avatars.githubusercontent.com/u/25086?v=4)[Rob Loach](/maintainers/RobLoach)[@RobLoach](https://github.com/RobLoach)

---

Top Contributors

[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (6 commits)")

### Embed Badge

![Health badge](/badges/robloach-php-codesniffer-drupal/health.svg)

```
[![Health](https://phpackages.com/badges/robloach-php-codesniffer-drupal/health.svg)](https://phpackages.com/packages/robloach-php-codesniffer-drupal)
```

PHPackages © 2026

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