PHPackages                             ramsey/coding-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ramsey/coding-standard

ActivePhpcodesniffer-standard[Utility &amp; Helpers](/categories/utility)

ramsey/coding-standard
======================

A common coding standard for Ramsey's PHP libraries.

2.4.0(6mo ago)9101.7k↑24.4%4[2 PRs](https://github.com/ramsey/coding-standard/pulls)20MITPHPPHP ^8.1CI passing

Since Aug 21Pushed 3w ago1 watchersCompare

[ Source](https://github.com/ramsey/coding-standard)[ Packagist](https://packagist.org/packages/ramsey/coding-standard)[ Docs](https://github.com/ramsey/coding-standard)[ GitHub Sponsors](https://github.com/sponsors/ramsey)[ RSS](/packages/ramsey-coding-standard/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (10)Versions (23)Used By (20)

ramsey/coding-standard
======================

[](#ramseycoding-standard)

 **A common coding standard for [@ramsey](https://github.com/ramsey)'s PHP libraries.**

 [![Source Code](https://camo.githubusercontent.com/658927f3229f44d37c66bb5ab602eb7453d05ce2f6008a4a54f0f90d90636f4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d72616d7365792f636f64696e672d2d7374616e646172642d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/ramsey/coding-standard) [![Download Package](https://camo.githubusercontent.com/af1e7c4c8dcf2585f79d8537f28bf21a51898eefd31aee1da9a88864fb426d0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616d7365792f636f64696e672d7374616e646172642e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/ramsey/coding-standard) [![PHP Programming Language](https://camo.githubusercontent.com/b347727f2a844adb6ddf227aadf94a29d19fe5b4b6e42f548825a998ebc54bdc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72616d7365792f636f64696e672d7374616e646172642e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d253233383839324246)](https://php.net) [![Read License](https://camo.githubusercontent.com/6c824ee5371e71196671dacc057c10a4667f28e961a8ca3a7e6441cdf06f8309/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72616d7365792f636f64696e672d7374616e646172642e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6461726b6379616e)](https://github.com/ramsey/coding-standard/blob/master/LICENSE) [![Build Status](https://camo.githubusercontent.com/095116f534d3adae9f99899b59c3b2f2874fa59f43b7ccc1b66f53a4aab2b7d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72616d7365792f636f64696e672d7374616e646172642f636f6e74696e756f75732d696e746567726174696f6e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/ramsey/coding-standard/actions/workflows/continuous-integration.yml)

About
-----

[](#about)

This is a custom coding standard for [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). It borrows many sniffs from [Slevomat Coding Standard](https://github.com/slevomat/coding-standard)and [PHPCSExtra](https://github.com/PHPCSStandards/PHPCSExtra) and combines them into a single unified, common standard for [@ramsey's](https://github.com/ramsey)PHP libraries.

This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating in this project and its community, you are expected to uphold this code.

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

[](#installation)

Install this package as a development dependency using [Composer](https://getcomposer.org).

```
composer require --dev ramsey/coding-standard
```

Usage
-----

[](#usage)

To use this coding standard, add `` to your `phpcs.xml`configuration.

Here are the contents of an example `phpcs.xml.dist` file that you may place in the root of your repository:

```

    ./src
    ./tests

```

Then, run PHP\_CodeSniffer:

```
./vendor/bin/phpcs
```

Contributing
------------

[](#contributing)

Contributions are welcome! To contribute, please familiarize yourself with [CONTRIBUTING.md](CONTRIBUTING.md).

Coordinated Disclosure
----------------------

[](#coordinated-disclosure)

Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. If you believe you've found a security issue in software that is maintained in this repository, please read [SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.

Copyright and License
---------------------

[](#copyright-and-license)

The ramsey/coding-standard library is copyright © [Ben Ramsey](https://benramsey.com)and licensed for use under the terms of the MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 63.1% 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 ~118 days

Recently: every ~282 days

Total

18

Last Release

183d ago

Major Versions

1.3.0 → 2.0.02021-07-01

PHP version history (3 changes)1.0.0PHP ^7.4 || ^8

2.1.0PHP ^7.4 || ^8.0

2.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f514481fa9cfdfd5dbcaccb3e5b480f18ea05ebf331cddf9b1c5a2a96a78fef5?d=identicon)[ramsey](/maintainers/ramsey)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (125 commits)")[![ramsey](https://avatars.githubusercontent.com/u/42941?v=4)](https://github.com/ramsey "ramsey (66 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (6 commits)")[![ncou](https://avatars.githubusercontent.com/u/16743322?v=4)](https://github.com/ncou "ncou (1 commits)")

---

Tags

coding-standardphpstandardsphpcsdevelopmenttools

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ramsey-coding-standard/health.svg)

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

###  Alternatives

[slevomat/coding-standard

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

1.5k137.8M2.5k](/packages/slevomat-coding-standard)[drupal/coder

Coder is a library to review Drupal code.

3046.8M629](/packages/drupal-coder)[humanmade/coding-standards

Human Made Coding Standards

161450.0k66](/packages/humanmade-coding-standards)[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6342.7M106](/packages/phpcsstandards-phpcsutils)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.2M36](/packages/yoast-yoastcs)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17542.0k7](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

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