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

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

laminas70/laminas-coding-standard
=================================

PHP 7.0 support for: Laminas Coding Standard

2.4.x-dev(4y ago)0523BSD-3-ClausePHPPHP &gt;=7.0.0

Since Apr 22Pushed 4y agoCompare

[ Source](https://github.com/laminas70/laminas-coding-standard)[ Packagist](https://packagist.org/packages/laminas70/laminas-coding-standard)[ Docs](https://laminas.dev)[ RSS](/packages/laminas70-laminas-coding-standard/feed)WikiDiscussions 2.4.x Synced 4w ago

READMEChangelogDependencies (4)Versions (1)Used By (3)

laminas-coding-standard
=======================

[](#laminas-coding-standard)

[![Build Status](https://github.com/laminas70/laminas-coding-standard/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/laminas/laminas-coding-standard/actions/workflows/continuous-integration.yml)

> ## 🇷🇺 Русским гражданам
>
> [](#-русским-гражданам)
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> [](#-to-citizens-of-russia)
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

The coding standard ruleset for Laminas components.

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. These are minimal specifications and don't address all factors, including things like:

- whitespace around operators
- alignment of array keys and operators
- alignment of object operations
- how to format multi-line conditionals
- what and what not to import, and how
- etc.

Contributors have different coding styles and so do the maintainers. During code reviews there are regularly discussions about spaces and alignments, where and when was said that a function needs to be imported. And that's where this coding standard comes in: To have internal consistency in a component and between components.

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

[](#installation)

1. Install the module via composer by running:

    ```
    composer require --dev laminas70/laminas-coding-standard
    ```
2. Add composer scripts into your `composer.json`:

    ```
    "scripts": {
      "cs-check": "phpcs",
      "cs-fix": "phpcbf"
    }
    ```
3. Create file `phpcs.xml` on base path of your repository with this content:

    ```

        config
        src
        test

    ```

You can add or exclude some locations in that file. For a reference please see: [https://github.com/squizlabs/PHP\_CodeSniffer/wiki/Annotated-Ruleset](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset)

Usage
-----

[](#usage)

- To run checks only:

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

    ```
    composer cs-fix
    ```

Ignoring parts of a File
------------------------

[](#ignoring-parts-of-a-file)

> Note: Before PHP\_CodeSniffer version 3.2.0, `// @codingStandardsIgnoreStart` and `// @codingStandardsIgnoreEnd` were used. These are deprecated and will be removed in PHP\_CodeSniffer version 4.0.

Disable parts of a file:

```
$xmlPackage = new XMLPackage;
// phpcs:disable
$xmlPackage['error_code'] = get_default_error_code_value();
$xmlPackage->send();
// phpcs:enable
```

Disable a specific rule:

```
// phpcs:disable Generic.Commenting.Todo.Found
$xmlPackage = new XMLPackage;
$xmlPackage['error_code'] = get_default_error_code_value();
// TODO: Add an error message here.
$xmlPackage->send();
// phpcs:enable
```

Ignore a specific violation:

```
$xmlPackage = new XMLPackage;
$xmlPackage['error_code'] = get_default_error_code_value();
// phpcs:ignore Generic.Commenting.Todo.Found
// TODO: Add an error message here.
$xmlPackage->send();
```

Development
-----------

[](#development)

> **New rules or Sniffs may not be introduced in minor or bugfix releases and should always be based on the develop branch and queued for the next major release, unless considered a bugfix for existing rules.**

If you want to test changes against Laminas components or your own projects, install your forked laminas-coding-standard globally with composer:

```
$ composer global config repositories.laminas-coding-standard vcs git@github.com:/laminas-coding-standard.git
$ composer global require --dev laminas70/laminas-coding-standard:dev-

# For this to work, add this to your path: ~/.composer/vendor/bin
# Using `-s` prints the rules that triggered the errors so they can be reviewed easily. `-p` is for progress display.
$ phpcs -sp --standard=LaminasCodingStandard src test
```

Make sure you remove the global installation after testing from your global composer.json file!!!

Documentation can be previewed locally by installing [MkDocs](https://www.mkdocs.org/#installation) and run `mkdocs serve`. This will start a server where you can read the docs.

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

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

1478d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/12bb1d3b51340daa0f19c946f2ba7d3e4b277854fc722409809d0e43845fe0de?d=identicon)[garygitton](/maintainers/garygitton)

---

Top Contributors

[![geerteltink](https://avatars.githubusercontent.com/u/9497586?v=4)](https://github.com/geerteltink "geerteltink (189 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (46 commits)")[![froschdesign](https://avatars.githubusercontent.com/u/103362?v=4)](https://github.com/froschdesign "froschdesign (11 commits)")[![laminas-bot](https://avatars.githubusercontent.com/u/68250880?v=4)](https://github.com/laminas-bot "laminas-bot (10 commits)")[![boesing](https://avatars.githubusercontent.com/u/2189546?v=4)](https://github.com/boesing "boesing (7 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (5 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (4 commits)")[![garygitton](https://avatars.githubusercontent.com/u/3704874?v=4)](https://github.com/garygitton "garygitton (3 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (3 commits)")[![gszy](https://avatars.githubusercontent.com/u/12767117?v=4)](https://github.com/gszy "gszy (1 commits)")[![Danack](https://avatars.githubusercontent.com/u/1505719?v=4)](https://github.com/Danack "Danack (1 commits)")[![autowp](https://avatars.githubusercontent.com/u/2299280?v=4)](https://github.com/autowp "autowp (1 commits)")[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (1 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (1 commits)")[![sommer-gei](https://avatars.githubusercontent.com/u/29099046?v=4)](https://github.com/sommer-gei "sommer-gei (1 commits)")

---

Tags

laminasCoding Standardphp 7.0

### Embed Badge

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

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

###  Alternatives

[laminas/laminas-servicemanager

Factory-Driven Dependency Injection Container

15955.1M693](/packages/laminas-laminas-servicemanager)[laminas/laminas-di

Automated dependency injection for PSR-11 containers

3618.1M38](/packages/laminas-laminas-di)[laminas/laminas-coding-standard

Laminas Coding Standard

331.7M534](/packages/laminas-laminas-coding-standard)[mayflower/mo4-coding-standard

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

17508.3k5](/packages/mayflower-mo4-coding-standard)[orisai/coding-standard

Strict PHP coding standard

19193.5k62](/packages/orisai-coding-standard)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

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