PHPackages                             cul8r/php-codesat - 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. cul8r/php-codesat

ActiveUtil

cul8r/php-codesat
=================

php code check tool

06PHP

Since Aug 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/cul8rcode/php-codesat)[ Packagist](https://packagist.org/packages/cul8r/php-codesat)[ RSS](/packages/cul8r-php-codesat/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-codesat
===========

[](#php-codesat)

#### 介绍

[](#介绍)

PHP Code Static Analysis Tool 利用git hook、phplint、phpstan，在code commit的时候对php代码进行语法检测、代码风格检查，如果有问题，不允许提交。

#### 使用

[](#使用)

composer require cul8r/php-codesat

安装成功之后执行:`composer exec php-codesat install`该命令会检查phplint、phpstan的安装情况，并将git原有的pre-commit钩子备份，再将php-codesat的pre-commit钩子拷贝至`.git/hooks`中。

这样，在git commit之前，就会执行phplint和phpstan检查待提交的文件，如果不满足要求，则会组织代码提交。

#### 指令

[](#指令)

指令 (composer exec -v phpsat {指令}用法install安装php-codesatremove移除php-codesatconfig配置#### 注意事项

[](#注意事项)

1. 建议使用最新版本，最新版本可以在仓库的tags中查看;
2. 包以提交到packagist，但是国内安装比较慢，推荐自建composer的repository来安装。

#### 注意事项

[](#注意事项-1)

phpcc的pre-commit会覆盖原有的pre-commit，但仍然会将它备份为pre-commit.bak.{timestamp}。所以之前有在pre-commit中插入操作，请谨慎安装。

change from php-cc

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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/fea796fa88ff1bbcaf6053b7edbf615c707fbbbd2e3fd6fbf5ed09116066fc15?d=identicon)[changliangbd](/maintainers/changliangbd)

---

Top Contributors

[![cxyac](https://avatars.githubusercontent.com/u/11714528?v=4)](https://github.com/cxyac "cxyac (10 commits)")

### Embed Badge

![Health badge](/badges/cul8r-php-codesat/health.svg)

```
[![Health](https://phpackages.com/badges/cul8r-php-codesat/health.svg)](https://phpackages.com/packages/cul8r-php-codesat)
```

PHPackages © 2026

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