PHPackages                             biaoqianwo/yii2-coding-standards - 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. [Framework](/categories/framework)
4. /
5. biaoqianwo/yii2-coding-standards

ActivePhpcodesniffer-standard[Framework](/categories/framework)

biaoqianwo/yii2-coding-standards
================================

Yii PHP Framework Version 2 - Coding standard tools

3.0.0(8y ago)040BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jul 11Pushed 8y agoCompare

[ Source](https://github.com/biaoqianwo/yii2-coding-standards)[ Packagist](https://packagist.org/packages/biaoqianwo/yii2-coding-standards)[ Docs](http://www.yiiframework.com/)[ RSS](/packages/biaoqianwo-yii2-coding-standards/feed)WikiDiscussions master Synced 2w ago

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

Yii 2 Web Framework Coding Standard
===================================

[](#yii-2-web-framework-coding-standard)

This repository contains settings for [Yii2 coding style](https://github.com/yiisoft/yii2/wiki/Core-framework-code-style)for various tools.

Getting code
------------

[](#getting-code)

```
$ php composer.phar install biaoqianwo/yii2-coding-standards

```

PHP\_Codesniffer
----------------

[](#php_codesniffer)

[PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) coding standard, rule set and sniff token parsing classes for the [Yii 2 Web Framework](https://github.com/yiisoft/yii2/). Overally rules are based on PSR-2 standard with some minor exceptions and changes. Rules derived from PSR-2 standard and excluded in Yii2 standard were implemented (or planned to be) as sniff classes.

Rules could also be used for checking code style of an existing Yii2 applications.

Everything that is merged into main [Yii2 development repository](https://github.com/yiisoft/yii2) being checked with these rule set as well.

### Using code style

[](#using-code-style)

After CodeSniffer is installed you can launch it with custom code style using the following syntax:

```
$ ./vendor/bin/phpcs --extensions=php --standard=Yii2 /home/resurtm/work/Yii2MegaApp/

```

If you're using PhpStorm you can configure it to use CodeSniffer using Settings → PHP → Code Sniffer. Yii2 code style can be specified at Inspections → PHP → PHP Code Sniffer validation.

PhpStorm
--------

[](#phpstorm)

Yii uses PSR-1 and PSR-2 as code style standards. You can choose these via `Settings` → `Code Style` → `PHP` → `Set from...` → `Predefined Style` → `PSR1/PSR2`.

### More

[](#more)

[中文Yii规范](http://www.jianshu.com/p/02cc5d507841)

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~327 days

Total

6

Last Release

3106d ago

Major Versions

2.0.3 → 3.0.02018-02-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/65043553783e26857146cd82158daf7f77db1d2ad7117cfe342716b3ff4740db?d=identicon)[biaoqianwo](/maintainers/biaoqianwo)

---

Top Contributors

[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (9 commits)")[![resurtm](https://avatars.githubusercontent.com/u/100198?v=4)](https://github.com/resurtm "resurtm (4 commits)")[![nkovacs](https://avatars.githubusercontent.com/u/2269242?v=4)](https://github.com/nkovacs "nkovacs (4 commits)")[![edgardmessias](https://avatars.githubusercontent.com/u/1530997?v=4)](https://github.com/edgardmessias "edgardmessias (4 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (3 commits)")[![biaoqianwo](https://avatars.githubusercontent.com/u/3367795?v=4)](https://github.com/biaoqianwo "biaoqianwo (2 commits)")[![AlexGx](https://avatars.githubusercontent.com/u/1571119?v=4)](https://github.com/AlexGx "AlexGx (2 commits)")[![tanakahisateru](https://avatars.githubusercontent.com/u/403893?v=4)](https://github.com/tanakahisateru "tanakahisateru (1 commits)")[![frenck](https://avatars.githubusercontent.com/u/195327?v=4)](https://github.com/frenck "frenck (1 commits)")[![gsherwood](https://avatars.githubusercontent.com/u/185976?v=4)](https://github.com/gsherwood "gsherwood (1 commits)")[![krukru](https://avatars.githubusercontent.com/u/10072630?v=4)](https://github.com/krukru "krukru (1 commits)")[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (1 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (1 commits)")

---

Tags

frameworkcodesnifferyii

### Embed Badge

![Health badge](/badges/biaoqianwo-yii2-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/biaoqianwo-yii2-coding-standards/health.svg)](https://phpackages.com/packages/biaoqianwo-yii2-coding-standards)
```

###  Alternatives

[cakephp/cakephp-codesniffer

CakePHP CodeSniffer Standards

23711.9M814](/packages/cakephp-cakephp-codesniffer)[yiisoft/yii2-coding-standards

Yii PHP Framework Version 2 - Coding standard tools

1821.2M178](/packages/yiisoft-yii2-coding-standards)[spryker/code-sniffer

Spryker Code Sniffer Standards

384.3M2.9k](/packages/spryker-code-sniffer)[hprose/hprose-yii

Hprose Server for Yii 2

357.3k](/packages/hprose-hprose-yii)[linnk/allman-codesniffer

Allman CodeSniffer &amp; Linnk Standards

122.2k](/packages/linnk-allman-codesniffer)[yiisoft/cache-apcu

Yii Caching Library - APCu Handler

139.2k](/packages/yiisoft-cache-apcu)

PHPackages © 2026

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