PHPackages                             rikless/phpcs-commit-check - 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. rikless/phpcs-commit-check

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

rikless/phpcs-commit-check
==========================

PHPCS check before commit

1.0.2(7y ago)53.5k1GPL-3.0Shell

Since Nov 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rikless/phpcs-commit-check)[ Packagist](https://packagist.org/packages/rikless/phpcs-commit-check)[ RSS](/packages/rikless-phpcs-commit-check/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHPCS git pre-commit hook
=========================

[](#phpcs-git-pre-commit-hook)

About
-----

[](#about)

Auto installed git pre-commit hook for running [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) code checking to PSR2 coding standard compliance. It checks only files that are to be committed. It also run php linter.

Only works on Unix OS.

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

[](#installation)

Install `rikless/phpcs-commit-check` with composer require command:

```
composer require "rikless/phpcs-commit-check"

```

To enable code sniff, аdd to `post-install-cmd` and `post-update-cmd` in `composer.json` installation script:

```
"scripts": {
    "post-install-cmd": [
        "PHPCodeChecker\\Installer::postInstall"
    ],
    "post-update-cmd": [
        "PHPCodeChecker\\Installer::postInstall"
    ]
}

```

Then run `composer install` or `composer update`. `pre-commit` hook will be installed or updated if it already exists.

Usage
-----

[](#usage)

Run `git commit` and pre-commit hook will check your committed files like if you run

```
php -l -d display_errors=0 && phpcs --standard=PSR2 --colors --encoding=utf-8 -n -p /path/to/file.php

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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 ~36 days

Total

3

Last Release

2669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29c5ca89f47135cd2d291123456cc24c2272d1506e8ecea6abc195e288379134?d=identicon)[rikless](/maintainers/rikless)

### Embed Badge

![Health badge](/badges/rikless-phpcs-commit-check/health.svg)

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

###  Alternatives

[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)[magento/magento-coding-standard

A set of Magento specific PHP CodeSniffer rules.

37113.4M299](/packages/magento-magento-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)

PHPackages © 2026

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