PHPackages                             wickedreports/phpcs-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wickedreports/phpcs-pre-commit-hook

ActiveScripts[Utility &amp; Helpers](/categories/utility)

wickedreports/phpcs-pre-commit-hook
===================================

PHPCS check before commit

0.8(5y ago)1920.9k↓100%12GPL-3.0PowerShell

Since Nov 29Pushed 5y agoCompare

[ Source](https://github.com/WickedReports/phpcs-pre-commit-hook)[ Packagist](https://packagist.org/packages/wickedreports/phpcs-pre-commit-hook)[ RSS](/packages/wickedreports-phpcs-pre-commit-hook/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (9)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 `wickedreports/phpcs-pre-commit-hook` with composer require command:

```
composer require "wickedreports/phpcs-pre-commit-hook"

```

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

```
{
    "require-dev": {
        "wickedreports/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": [
        "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 phpcs.phar --standard=PSR2 --colors --encoding=utf-8 -n -p /path/to/file.php

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~169 days

Recently: every ~295 days

Total

8

Last Release

1900d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/706615f8c791f7d39fa5119b09ff031e6a45bc7de0977f97b73bceefca68132e?d=identicon)[alright](/maintainers/alright)

![](https://www.gravatar.com/avatar/bdeca9895d1214e27b88389c7f24bc8ea7c269dbbf26a252b4c9d9782488d673?d=identicon)[moskeet-wickedreports](/maintainers/moskeet-wickedreports)

![](https://www.gravatar.com/avatar/319ce1ad84f2403a1be94005ceceb8e262036c9b9b8101ccfbdcd5b26f0f4018?d=identicon)[dmitrywicked](/maintainers/dmitrywicked)

![](https://www.gravatar.com/avatar/615db17fcbd38ee8f6bd4ece58f8f2d46575f93351eb5cbfde8cbd0a320975f6?d=identicon)[stanma](/maintainers/stanma)

---

Top Contributors

[![stanma](https://avatars.githubusercontent.com/u/1821782?v=4)](https://github.com/stanma "stanma (18 commits)")[![bjornjohansen](https://avatars.githubusercontent.com/u/399136?v=4)](https://github.com/bjornjohansen "bjornjohansen (3 commits)")[![moskeet-wickedreports](https://avatars.githubusercontent.com/u/50370503?v=4)](https://github.com/moskeet-wickedreports "moskeet-wickedreports (1 commits)")

### Embed Badge

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

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

###  Alternatives

[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k13](/packages/shopsys-coding-standards)[flyeralarm/php-code-validator

A custom coding standard for FLYERALARM

2226.9k5](/packages/flyeralarm-php-code-validator)

PHPackages © 2026

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