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(3mo ago)1091.1k↑62%4[2 PRs](https://github.com/ramsey/coding-standard/pulls)20MITPHPPHP ^8.1CI passing

Since Aug 21Pushed 1mo 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 1mo ago

READMEChangelog (10)DependenciesVersions (21)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 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 60.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

Every ~118 days

Recently: every ~282 days

Total

18

Last Release

92d 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] (112 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

### 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

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[symfony/event-dispatcher-contracts

Generic abstractions related to dispatching event

3.4k756.5M424](/packages/symfony-event-dispatcher-contracts)[symfony/service-contracts

Generic abstractions related to writing services

2.6k860.1M360](/packages/symfony-service-contracts)[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6333.4M58](/packages/phpcsstandards-phpcsutils)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[phpcompatibility/phpcompatibility-paragonie

A set of rulesets for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.

1031.3M10](/packages/phpcompatibility-phpcompatibility-paragonie)

PHPackages © 2026

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