PHPackages                             mrchetan/php\_standard - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. mrchetan/php\_standard

ActivePhpcodesniffer-standard[PSR &amp; Standards](/categories/psr-standards)

mrchetan/php\_standard
======================

PHP coding standard to be followed in Laravel projects

5.3.0(5mo ago)68531MIT

Since Jul 17Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/mrchetan/PHPStandard)[ Packagist](https://packagist.org/packages/mrchetan/php_standard)[ GitHub Sponsors](https://github.com/mr-chetan)[ RSS](/packages/mrchetan-php-standard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (47)Used By (1)

PHP Coding Standard
===================

[](#php-coding-standard)

This repository contains rulesets for **PHP CodeSniffer** and **PHP Mess Detector** along with some custom rules.

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

[](#installation)

Install this repository globally using following composer commands:

```
composer global require mrchetan/php_standard
```

Always use the latest version of the repository.

Setup
-----

[](#setup)

The project will be installed in global composer folder on your PC.

- **Mac**: `.composer/vendor` folder in your home directory
- **Windows**: `AppData/Roaming/Composer/vendor` folder in your user directory
- **Ubuntu**: `.config/composer/vendor` folder in your home directory

You follow the steps respective to your favourite IDE to configure PHP CodeSniffer and PHP MessDetector and point to the two rulesets in the installation folder.

- **ruleset.xml** - For CodeSniffer

Attribution
-----------

[](#attribution)

Some sniffs in this repository have been derived from original PHP\_CodeSniffer project. Credits for those go to the respective developers.

VS Code SETUP
-------------

[](#vs-code-setup)

Install the extension name **[Sniffer of PHP](https://marketplace.visualstudio.com/items?itemName=MrChetan.sniffer-of-php)** by **MrChetan**

[![Sniffer of PHP](./img/sniffer-of-php.png)](https://marketplace.visualstudio.com/items?itemName=MrChetan.sniffer-of-php)After Activation add the below file to settings.json file

For Mac

```
"phpSniffer.standard": "~/.composer/vendor/mrchetan/php_standard/ruleset.xml",

```

For Linux

```
"phpSniffer.standard": "~/.config/composer/vendor/mrchetan/php_standard/ruleset.xml",

```

For Windows

```
"phpSniffer.standard": "%userprofile%/AppData/Roaming/Composer/vendor/mrchetan/php_standard/ruleset.xml",

```

To check

```
phpcs --standard=

```

For Example

```
phpcs --standard=~/.composer/vendor/mrchetan/php_standard/ruleset.xml index.php

```

TO fix

```
phpcbf --standard=

```

Ignoring a file

```
// @codingStandardsIgnoreFile

// phpcs:ignoreFile

```

Ignoring a line

```
// @codingStandardsIgnoreLine

// phpcs:ignore

```

Ignoring a block

```
// @codingStandardsIgnoreStart

// phpcs:disable

// @codingStandardsIgnoreEnd

// phpcs:enable

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance77

Regular maintenance activity

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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 ~35 days

Recently: every ~70 days

Total

46

Last Release

172d ago

Major Versions

1.3 → 2.0.02022-02-12

2.3.6 → 3.0.02023-06-12

3.2.7 → 4.0.02023-07-19

4.3.0 → 5.0.02025-02-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/5039d3102378ab6c20d60bf6fe8e864b7ee984e6a96c6f0cfcb48bc070574cf8?d=identicon)[mrchetan](/maintainers/mrchetan)

---

Top Contributors

[![mr-chetan](https://avatars.githubusercontent.com/u/56998650?v=4)](https://github.com/mr-chetan "mr-chetan (80 commits)")[![amitchandrakar](https://avatars.githubusercontent.com/u/22864828?v=4)](https://github.com/amitchandrakar "amitchandrakar (1 commits)")[![rodrigoprimo](https://avatars.githubusercontent.com/u/77215?v=4)](https://github.com/rodrigoprimo "rodrigoprimo (1 commits)")

---

Tags

phpphpcslaravelCoding Standardphp-code-snifferphpcs-standardmrchetandevanoxphpcs-rulesetphpcs-standard-laravel

### Embed Badge

![Health badge](/badges/mrchetan-php-standard/health.svg)

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

###  Alternatives

[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[orisai/coding-standard

Strict PHP coding standard

19193.5k62](/packages/orisai-coding-standard)[mreduar/laravel-phpcs

PHP Codesniffer ruleset to follow Laravel's coding style

3817.3k1](/packages/mreduar-laravel-phpcs)

PHPackages © 2026

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