PHPackages                             zerkalica/phpcs - 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. zerkalica/phpcs

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

zerkalica/phpcs
===============

Unofficial version of PHP\_CodeSniffer to be handled with Composer

212.4k↓85.7%45PHP

Since Nov 6Pushed 13y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (5)

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/792dacca54e2267b179d3e3a77dc7fd48724200edca96311329b530054ccb91e/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f737175697a6c6162732f5048505f436f6465536e69666665722e706e67)](http://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 don't want to install PEAR, you can 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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/06052ad7decfcf0505d3e9bd0d7c51eeb95317020bc52e71551941aa8fabe99a?d=identicon)[zerkalica](/maintainers/zerkalica)

---

Top Contributors

[![gsherwood](https://avatars.githubusercontent.com/u/185976?v=4)](https://github.com/gsherwood "gsherwood (1479 commits)")[![zerkalica](https://avatars.githubusercontent.com/u/274786?v=4)](https://github.com/zerkalica "zerkalica (32 commits)")[![andygrunwald](https://avatars.githubusercontent.com/u/320064?v=4)](https://github.com/andygrunwald "andygrunwald (16 commits)")[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (9 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)")[![jnrbsn](https://avatars.githubusercontent.com/u/207088?v=4)](https://github.com/jnrbsn "jnrbsn (2 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)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (1 commits)")[![yesmeck](https://avatars.githubusercontent.com/u/465125?v=4)](https://github.com/yesmeck "yesmeck (1 commits)")[![hashar](https://avatars.githubusercontent.com/u/281689?v=4)](https://github.com/hashar "hashar (1 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (1 commits)")[![radeksimko](https://avatars.githubusercontent.com/u/287584?v=4)](https://github.com/radeksimko "radeksimko (1 commits)")[![donaldducky](https://avatars.githubusercontent.com/u/249234?v=4)](https://github.com/donaldducky "donaldducky (1 commits)")[![dominics](https://avatars.githubusercontent.com/u/97427?v=4)](https://github.com/dominics "dominics (1 commits)")[![ihabunek](https://avatars.githubusercontent.com/u/482138?v=4)](https://github.com/ihabunek "ihabunek (1 commits)")[![aboks](https://avatars.githubusercontent.com/u/815524?v=4)](https://github.com/aboks "aboks (1 commits)")

### Embed Badge

![Health badge](/badges/zerkalica-phpcs/health.svg)

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M359](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

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