PHPackages                             mironov-pik/pik-pre-commit-hook - 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. mironov-pik/pik-pre-commit-hook

ActiveScripts

mironov-pik/pik-pre-commit-hook
===============================

PHPCS check before commit

0.7(8y ago)0231GPL-3.0Shell

Since Nov 29Pushed 7y agoCompare

[ Source](https://github.com/mironovPik/pik-pre-commit-hook)[ Packagist](https://packagist.org/packages/mironov-pik/pik-pre-commit-hook)[ RSS](/packages/mironov-pik-pik-pre-commit-hook/feed)WikiDiscussions master Synced today

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

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

[](#universal-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.

Inspired by [Enforce code standards with composer, git hooks, and phpcs](http://tech.zumba.com/2014/04/14/control-code-quality/) and  and  . Installer checks OS on hosting machine and installs needed hooks for platform.

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

[](#installation)

Install `mironov-pik/phpcs-pre-commit-hook` with composer require command:

```
composer require "mironov-pik/phpcs-pre-commit-hook"

```

Or alternatively, include a dependency for `mironov-pik/phpcs-pre-commit-hook` in your composer.json file manually:

```
{
    "require-dev": {
        "mironov-pik/phpcs-pre-commit-hook": "*"
    }
}

```

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

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

```

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 phpcs.phar --standard=PSR2 --colors --encoding=utf-8 -n -p /path/to/file.php

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% 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 ~17 days

Recently: every ~26 days

Total

7

Last Release

2979d ago

### Community

Maintainers

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

---

Top Contributors

[![stanma](https://avatars.githubusercontent.com/u/1821782?v=4)](https://github.com/stanma "stanma (18 commits)")[![mironovPik](https://avatars.githubusercontent.com/u/48753998?v=4)](https://github.com/mironovPik "mironovPik (11 commits)")[![bjornjohansen](https://avatars.githubusercontent.com/u/399136?v=4)](https://github.com/bjornjohansen "bjornjohansen (3 commits)")

### Embed Badge

![Health badge](/badges/mironov-pik-pik-pre-commit-hook/health.svg)

```
[![Health](https://phpackages.com/badges/mironov-pik-pik-pre-commit-hook/health.svg)](https://phpackages.com/packages/mironov-pik-pik-pre-commit-hook)
```

###  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)[drupal/coder

Coder is a library to review Drupal code.

3043.6M460](/packages/drupal-coder)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

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