PHPackages                             sunray/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. sunray/coding-standard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sunray/coding-standard
======================

The Sunray development coding standard

145

Since Mar 7Pushed 7y ago2 watchersCompare

[ Source](https://github.com/sunray/coding-standard)[ Packagist](https://packagist.org/packages/sunray/coding-standard)[ RSS](/packages/sunray-coding-standard/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Sunray Coding Standard
======================

[](#sunray-coding-standard)

[![Downloads](https://camo.githubusercontent.com/f24285cd37c9fac0fc5a55f8c53ae2b548c9d50f0e89392a0206d30f36199db0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756e7261792f636f64696e672d7374616e646172642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sunray/coding-standard)[![License](https://camo.githubusercontent.com/ed433f7f20648b57eb83c2d2ad9678aaee0ac13fd7af616e4912bb33081504a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73756e7261792f636f64696e672d7374616e646172642e7376673f7374796c653d666c61742d737175617265)](https://github.com/sunray/coding-standard/blob/master/LICENSE)

A coding standard to use for common PHP and JavaScript modules.

The main objectives of this standard are outlined in the [Sunray Coding Philosophy](coding-philosophy.md) which aims to create an efficient development workflow resulting from readable, debuggable, and maintainable code. The general principles are:

- [Consistency](coding-philosophy.md#consistency)
- [Strict and Predictable Code](coding-philosophy.md#strict-and-predictable-code)
- [Minimize The Impact of Change](coding-philosophy.md#minimize-the-impact-of-change)
- [Optimize for Readability](coding-philosophy.md#optimize-for-readability)
- [Optimize for Code Completion](coding-philosophy.md#optimize-for-code-completion)

PHP
---

[](#php)

> **The PHP specific coding standards are outlined in a [separate document](coding-standard-php.md).**

#### Requirements

[](#requirements)

- PHP 7.1+
- Composer

#### Installation

[](#installation)

1. Add `"sunray/coding-standard": "dev-master"` to the `require-dev` block in your application's `composer.json` as follows: ```
    {
        "require-dev": {
            "sunray/coding-standard": "dev-master"
        }
    }
    ```

    or automatically: ```
    composer require --dev sunray/coding-standard:dev-master
    ```

#### Usage

[](#usage)

1. Create a `phpcs.xml` file in the root of your application as follows: ```

    DOCTYPE xml>

    ```
2. From your application root execute the following: ```
    vendor/bin/phpcs
    ```

JavaScript
----------

[](#javascript)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/2028c7b5e1e01380a709478988e8bcdff58b5aec2c0709e991a4f6c7ba9502ec?d=identicon)[virgofx](/maintainers/virgofx)

---

Top Contributors

[![virgofx](https://avatars.githubusercontent.com/u/739719?v=4)](https://github.com/virgofx "virgofx (1 commits)")

---

Tags

coding-standardscoding-styleeslintjavascriptphpphp-codesnifferphp7prettier

### Embed Badge

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

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

PHPackages © 2026

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