PHPackages                             wataridori/framgia-php-codesniffer - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. wataridori/framgia-php-codesniffer

ActivePhpcodesniffer-standard[Testing &amp; Quality](/categories/testing)

wataridori/framgia-php-codesniffer
==================================

Framgia PHP Standards Checker by PHP CodeSniffer

0.3.0(7y ago)1416.1k16[3 issues](https://github.com/wataridori/framgia-php-codesniffer/issues)MITPHPCI failing

Since Jan 15Pushed 5y ago2 watchersCompare

[ Source](https://github.com/wataridori/framgia-php-codesniffer)[ Packagist](https://packagist.org/packages/wataridori/framgia-php-codesniffer)[ RSS](/packages/wataridori-framgia-php-codesniffer/feed)WikiDiscussions master Synced 3w ago

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

Framgia PHP Standards Checker by PHP CodeSniffer
================================================

[](#framgia-php-standards-checker-by-php-codesniffer)

About
-----

[](#about)

- **[PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)** is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. **[PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)** is an essential development tool that ensures your code remains clean and consistent.
- **[Framgia PHP Standard](https://github.com/framgia/coding-standards/blob/master/eng/README.md#php)** is a set of coding conventions used by PHP team in [Framgia Vietnam](http://framgia.vn/). It is based on the [PSR-2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) with some additional rules.
- This is the Coding Standard package for Code Sniffer to check whether your codes satisfy the Framgia Standard or not.
- **New**: This standard is compatible with both PHP CodeSniffer version 2 and 3. If you are using PHP CodeSniffer 2, please use the codes in `0.2` branch. If you are using PHP CodeSniffer 3, use the codes in `master` branch.

Install
-------

[](#install)

### Install locally

[](#install-locally)

You can install in each project folder:

```
composer require --dev dealerdirect/phpcodesniffer-composer-installer
composer require --dev wataridori/framgia-php-codesniffer

```

`phpcs` command will be installed to folder `vendor/bin`.

Now you can check and run phpcs:

```
./vendor/bin/phpcs -i

```

```
./vendor/bin/phpcs --standard=Framgia /path/to/your/code

```

### Install globally

[](#install-globally)

- [Install `PHP_CodeSniffer`](https://github.com/squizlabs/PHP_CodeSniffer#installation) globally by `composer`. Make sure you have `~/.composer/vendor/bin/` in your `PATH`.

```
composer global require "squizlabs/php_codesniffer=*"

```

- Clone this repository

```
// Version 2
cd ~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards
git clone -b 0.2 git@github.com:wataridori/framgia-php-codesniffer.git FramgiaPHPCS

// Version 3
cd ~/.composer/vendor/squizlabs/php_codesniffer/src/Standards
git clone git@github.com:wataridori/framgia-php-codesniffer.git FramgiaPHPCS

```

- Add its path to the PHP\_CodeSniffer configuration:

```
phpcs --config-set installed_paths /path/to/FramgiaPHPCS

```

> NOTE: If you want to set multiple installed\_paths, you can get old paths by command:
>
> ```
> phpcs --config-show installed_paths
>
> ```
>
>
>
> Then you can set multiple paths by command:
>
> ```
> phpcs --config-set installed_paths /absolute/path/1,/absolute/path/2,/yet/another/absolute/path/
>
> ```

- Check whether the Framgia Standard has been installed succesfully or not

```
phpcs -i

```

- Check your code using Framgia Standard

```
phpcs --standard=Framgia /path/to/your/code

```

- If you do not want to install this package inside **CodeSniffer Standards** folder, you can clone it to everywhere you want and specify the installed folder when you run `phpcs` command.

```
phpcs --standard=/path/to/your/framgia-php-codesniffer /path/to/your/code

```

- It's a pity that the default encoding used by PHP\_CodeSniffer is ISO-8859-1. **Yes, it is not UTF-8**. Therefore, you will have some problems with the words counter if you use Japanese in your codes. You'd better change the default encoding to `UTF-8`.

```
phpcs --config-set encoding utf-8

```

Or set the encoding to `UTF-8` when running the command.

```
phpcs --standard=Framgia /path/to/your/code --encoding=utf-8

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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

Unknown

Total

1

Last Release

2719d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/134a69054257dfdda1ccde099a44209654a12800b97c459b1ef4e9c3a90fe3c1?d=identicon)[wataridori](/maintainers/wataridori)

---

Top Contributors

[![wataridori](https://avatars.githubusercontent.com/u/1189893?v=4)](https://github.com/wataridori "wataridori (15 commits)")[![tuanpht](https://avatars.githubusercontent.com/u/21072956?v=4)](https://github.com/tuanpht "tuanpht (7 commits)")[![dinhhoanglong91](https://avatars.githubusercontent.com/u/1893820?v=4)](https://github.com/dinhhoanglong91 "dinhhoanglong91 (2 commits)")

---

Tags

coding-conventioncoding-standardsframgia-standardphpphp-codesniffersniffer

### Embed Badge

![Health badge](/badges/wataridori-framgia-php-codesniffer/health.svg)

```
[![Health](https://phpackages.com/badges/wataridori-framgia-php-codesniffer/health.svg)](https://phpackages.com/packages/wataridori-framgia-php-codesniffer)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k130.4M2.1k](/packages/slevomat-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13186.2k8](/packages/youwe-testing-suite)[hyva-themes/hyva-coding-standard

A set of Hyvä specific PHP CodeSniffer rules extending the Magento Coding Standard

2926.2k](/packages/hyva-themes-hyva-coding-standard)

PHPackages © 2026

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