PHPackages                             instaclick/php-code-sniffer - 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. instaclick/php-code-sniffer

ActiveLibrary

instaclick/php-code-sniffer
===========================

(fork) PHP\_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.

1.4.2(13y ago)2195.0k↓20.5%38BSD-3-ClausePHPPHP &gt;=5.1.2

Since Nov 9Pushed 13y ago1 watchersCompare

[ Source](https://github.com/instaclick/PHP_CodeSniffer)[ Packagist](https://packagist.org/packages/instaclick/php-code-sniffer)[ Docs](http://www.squizlabs.com/php-codesniffer)[ RSS](/packages/instaclick-php-code-sniffer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (8)

About
-----

[](#about)

PHP\_CodeSniffer is a PHP5 script that tokenises PHP, JavaScript and CSS files to detect violations of a defined coding standard. It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers.

[![Build Status](https://camo.githubusercontent.com/6ea573f46609666043218d843a9c26cf1d67f8cfd43ae2923c947651d8738732/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f737175697a6c6162732f5048505f436f6465536e69666665722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/squizlabs/PHP_CodeSniffer)

Requirements
------------

[](#requirements)

PHP\_CodeSniffer requires PHP version 5.1.2 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](http://pear.php.net/manual/en/package.php.php-codesniffer.config-options.php) for a list of these requirements.

The SVN pre-commit hook requires PHP version 5.2.4 or greater due to its use of the vertical whitespace character.

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

[](#installation)

The easiest way to install PHP\_CodeSniffer is to use the PEAR installer. This will make the `phpcs` command immediately available for use. To install PHP\_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:

```
pear install PHP_CodeSniffer

```

If you use [Composer](http://getcomposer.org/), include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:

```
{
    "require": {
        "squizlabs/php_codesniffer": "1.*"
    }
}

```

You will then be able to run PHP\_CodeSniffer from the vendor bin directory:

```
./vendor/bin/phpcs -h

```

You can also download the PHP\_CodeSniffer source and run the `phpcs` command directly from the GIT checkout:

```
git clone git://github.com/squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php scripts/phpcs -h

```

Documentation
-------------

[](#documentation)

The documentation for PHP\_CodeSniffer is available in the [PEAR manual](http://pear.php.net/manual/en/package.php.php-codesniffer.php).

Information about upcoming features and releases is available on the [Squiz Labs blog](http://www.squizlabs.com/php-codesniffer).

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

[](#contributing)

If you do contribute code to PHP\_CodeSniffer, please make sure it conforms to the PEAR coding standard and that the PHP\_CodeSniffer unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit:

```
cd PHP_CodeSniffer
php scripts/phpcs --ignore=*/tests/* . -n

```

Which should give you no output, indicating that there are no PEAR coding standard errors. And then:

```
phpunit tests/AllTests.php

```

Which should give you no failures or errors. You can ignore any skipped tests as these are for external tools.

Issues
------

[](#issues)

Bug reports and feature requests can be submitted on the [PEAR bug tracker](http://pear.php.net/package/PHP_CodeSniffer/bugs).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

4939d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7527f543a29a1e6b1bcbe7525e619a3a02345b49abbc40f775f88a26aaf39a96?d=identicon)[instaclick](/maintainers/instaclick)

---

Top Contributors

[![gsherwood](https://avatars.githubusercontent.com/u/185976?v=4)](https://github.com/gsherwood "gsherwood (1543 commits)")[![andygrunwald](https://avatars.githubusercontent.com/u/320064?v=4)](https://github.com/andygrunwald "andygrunwald (18 commits)")[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (9 commits)")[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (6 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (5 commits)")[![ktomk](https://avatars.githubusercontent.com/u/352517?v=4)](https://github.com/ktomk "ktomk (4 commits)")[![illusori](https://avatars.githubusercontent.com/u/360670?v=4)](https://github.com/illusori "illusori (4 commits)")[![ajgarlag](https://avatars.githubusercontent.com/u/388184?v=4)](https://github.com/ajgarlag "ajgarlag (3 commits)")[![CloCkWeRX](https://avatars.githubusercontent.com/u/365751?v=4)](https://github.com/CloCkWeRX "CloCkWeRX (2 commits)")[![kristofser](https://avatars.githubusercontent.com/u/5928907?v=4)](https://github.com/kristofser "kristofser (2 commits)")[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (2 commits)")[![jnrbsn](https://avatars.githubusercontent.com/u/207088?v=4)](https://github.com/jnrbsn "jnrbsn (2 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (2 commits)")[![yesmeck](https://avatars.githubusercontent.com/u/465125?v=4)](https://github.com/yesmeck "yesmeck (1 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (1 commits)")[![dominics](https://avatars.githubusercontent.com/u/97427?v=4)](https://github.com/dominics "dominics (1 commits)")[![hashar](https://avatars.githubusercontent.com/u/281689?v=4)](https://github.com/hashar "hashar (1 commits)")[![ihabunek](https://avatars.githubusercontent.com/u/482138?v=4)](https://github.com/ihabunek "ihabunek (1 commits)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (1 commits)")[![klausi](https://avatars.githubusercontent.com/u/213229?v=4)](https://github.com/klausi "klausi (1 commits)")

---

Tags

standardsphpcs

### Embed Badge

![Health badge](/badges/instaclick-php-code-sniffer/health.svg)

```
[![Health](https://phpackages.com/badges/instaclick-php-code-sniffer/health.svg)](https://phpackages.com/packages/instaclick-php-code-sniffer)
```

###  Alternatives

[squizlabs/php_codesniffer

PHP\_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

1.5k365.7M25.5k](/packages/squizlabs-php-codesniffer)[phpcompatibility/php-compatibility

A set of sniffs for PHP\_CodeSniffer that checks for PHP cross-version compatibility.

2.3k74.3M1.3k](/packages/phpcompatibility-php-compatibility)[wp-coding-standards/wpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

2.8k42.5M1.6k](/packages/wp-coding-standards-wpcs)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

598161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[phpcompatibility/phpcompatibility-wp

A ruleset for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.

22130.6M587](/packages/phpcompatibility-phpcompatibility-wp)[automattic/vipwpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions

25510.2M145](/packages/automattic-vipwpcs)

PHPackages © 2026

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