PHPackages                             opsway/psr12-strict-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. opsway/psr12-strict-coding-standard

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

opsway/psr12-strict-coding-standard
===================================

Modern &amp; strict coding standard extend PSR12

1.1.1(2y ago)7131.6k↓15.1%4[1 PRs](https://github.com/opsway/psr12-strict-modern-standart/pulls)18BSD-3-ClauseShellPHP ^8.0

Since Nov 17Pushed 2y ago16 watchersCompare

[ Source](https://github.com/opsway/psr12-strict-modern-standart)[ Packagist](https://packagist.org/packages/opsway/psr12-strict-coding-standard)[ RSS](/packages/opsway-psr12-strict-coding-standard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (18)

OpsWay PSR-12 strict coding standard
====================================

[](#opsway-psr-12-strict-coding-standard)

The coding standard ruleset for strong code style checking.

This specification extends and expands [PSR-12](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md), the extended coding style guide and requires adherence to [PSR-1](https://www.php-fig.org/psr/psr-1), the basic coding standard. All additional checks and sniffs use from another third-party libraries:

- slevomat/coding-standard
- webimpress/coding-standard

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

[](#installation)

1. Install the module via composer by running:

    ```
    composer require --dev opsway/psr12-strict-coding-standard
    ```
2. Add composer scripts into your `composer.json`:

    ```
    "scripts": {
      "cs-check": "phpcs",
      "cs-fix": "phpcbf"
    }
    ```
3. Run the `init_phpcs.sh` to generate the PHP\_CodeSniffer ruleset into your project root:

    ```
    wget https://raw.githubusercontent.com/opsway/psr12-strict-modern-standart/master/init_phpcs.sh
    chmod +x ./init_phpcs.sh
    ./init_phpcs.sh
    ```

    or, create a ruleset `phpcs.xml` in the project root with the following content (notice entries under `\`):

    ```

        config
        src
        test

    ```

You can include or exclude relevant directories within `file` elements under `\` in the PHP\_CodeSniffer ruleset above. For further reference, please see the PHP\_CodeSniffer wiki: [https://github.com/squizlabs/PHP\_CodeSniffer/wiki/Annotated-ruleset.xml](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml)

Usage
-----

[](#usage)

- To run checks only:

    ```
    $ composer cs-check
    ```
- To automatically fix many CS issues:

    ```
    $ composer cs-fix
    ```

Reference
---------

[](#reference)

Rules can be added, excluded or tweaked locally, depending on your preferences. More information on how to do this can be found here:

- [Coding Standard Tutorial](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial)
- [Configuration Options](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options)
- [Selectively Applying Rules](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset#selectively-applying-rules)
- [Customisable Sniff Properties](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~152 days

Recently: every ~240 days

Total

11

Last Release

853d ago

Major Versions

0.7.0 → 1.0.02022-10-22

PHP version history (4 changes)0.1.0PHP ^7.2

0.4.0PHP ^7.3

0.5.0PHP ^7.3 || ^8.0

1.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a3d517fca6beada9002dedcf38cfd8b0e3df6f0dcfbd636a4c55c70da055bbb?d=identicon)[shandyDev](/maintainers/shandyDev)

---

Top Contributors

[![mavaddat](https://avatars.githubusercontent.com/u/5055400?v=4)](https://github.com/mavaddat "mavaddat (11 commits)")[![ViktorTkachenko](https://avatars.githubusercontent.com/u/44123039?v=4)](https://github.com/ViktorTkachenko "ViktorTkachenko (1 commits)")

---

Tags

Coding Standardopswaypsr12-strict

### Embed Badge

![Health badge](/badges/opsway-psr12-strict-coding-standard/health.svg)

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

###  Alternatives

[mayflower/mo4-coding-standard

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

17508.3k5](/packages/mayflower-mo4-coding-standard)[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)[laminas/laminas-coding-standard

Laminas Coding Standard

331.7M534](/packages/laminas-laminas-coding-standard)

PHPackages © 2026

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