PHPackages                             suifengpiao14/php-pre-commit - 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. suifengpiao14/php-pre-commit

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

suifengpiao14/php-pre-commit
============================

A simple library for specification code

02.5k↓50%Shell

Since Oct 11Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP [pre-commit](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
==========================================================================

[](#php-pre-commit)

> GIT pre-commit script appropriate for any PHP project. A pre-commit script that validates syntax errors in **PHP**. It also validates PHP files against `PSR2` coding styles.

About
-----

[](#about)

This is a pre commit script that checks added, copied, modified or renamed files for syntax errors and `PSR2` coding standards.

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

[](#installation)

```
 composer require --dev suifengpiao14/php-pre-commit:dev-master
```

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

```
{
    "require-dev": {
        "suifengpiao14/php-pre-commit": "dev-master"
    }
}
```

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

```
"post-install-cmd": [
    "sh ./vendor/suifengpiao14/php-pre-commit/src/setup.sh"
],
"post-update-cmd": [
    "sh ./vendor/suifengpiao14/php-pre-commit/src/setup.sh"
]
```

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

Usage
-----

[](#usage)

This will work automatically before every commit.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/3aa36128003c09127b4bf665c7e1ba43a8232f992b5b4bd72914b09346de9b2c?d=identicon)[suifengpiao14](/maintainers/suifengpiao14)

---

Top Contributors

[![suifengpiao14](https://avatars.githubusercontent.com/u/10387707?v=4)](https://github.com/suifengpiao14 "suifengpiao14 (1 commits)")

### Embed Badge

![Health badge](/badges/suifengpiao14-php-pre-commit/health.svg)

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

###  Alternatives

[silverstripe/recipe-plugin

Helper plugin to install SilverStripe recipes

102.5M68](/packages/silverstripe-recipe-plugin)[mvo/contao-group-widget

Adds a new group widget that allows repeating a set of DCA fields.

28124.3k31](/packages/mvo-contao-group-widget)

PHPackages © 2026

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