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

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

brandembassy/coding-standard
============================

Brand Embassy Coding Standard

14.3(1y ago)2515.7k↓46.1%1[3 issues](https://github.com/BrandEmbassy/coding-standard/issues)[1 PRs](https://github.com/BrandEmbassy/coding-standard/pulls)16proprietaryPHPPHP &gt;=8.1CI failing

Since Apr 27Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/BrandEmbassy/coding-standard)[ Packagist](https://packagist.org/packages/brandembassy/coding-standard)[ RSS](/packages/brandembassy-coding-standard/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (20)Versions (78)Used By (16)

Brand Embassy Coding Standard
=============================

[](#brand-embassy-coding-standard)

- The [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) and [cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) rules to check that repositories are following the unified coding standard for Brand Embassy projects.
- The [PHPStan](https://github.com/phpstan/phpstan) default configuration file.
- PhpStorm code style and inspections (with [Php Inspections (EA Extended)](https://plugins.jetbrains.com/plugin/7622-php-inspections-ea-extended-) plugin) configuration files.

Standards
---------

[](#standards)

For full reference of enforcements, go through `default-ecs.php` where each sniff / fixer deviating from default set lists is briefly described.

@TODO list of important sniffs

### Skippable sniffs / fixers

[](#skippable-sniffs--fixers)

Skipping of sniffs / fixers in general or for particular files should be configured in the `ecs.php` of your project. This file should leverage the `default-ecs.php` as the default configuration, but it expected that you will make adjustments to fit your project needs.

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

[](#installation)

You can install the Brand Embassy Coding Standard as a composer dependency to your project:

```
$ composer require --dev brandembassy/coding-standard
```

ECS
---

[](#ecs)

You can run ecs with this command (without performing automatic fixes):

```
$ ./vendor/bin/ecs check --ansi
```

Or with automatic fixes:

```
$ ./vendor/bin/ecs check --ansi --fix
```

You can use the `--clear-cache` option to clear the cache before applying the fixers and sniffers:

```
$ ./vendor/bin/ecs check --ansi --fix --clear-cache
```

PHPStan
-------

[](#phpstan)

- includes [phpstan-strict-rules](https://github.com/phpstan/phpstan-strict-rules) extension
- includes [phpstan-nette](https://github.com/phpstan/phpstan-nette) extension
- includes max level configuration by default

To use default configuration include default-phpstan.neon in your project's PHPStan config:

```
includes:
    - vendor/brandembassy/coding-standard/integration-phpstan.neon
```

Rector
------

[](#rector)

To use default configuration require default-rector.php in your project's Rector config:

```
$rectorConfigBuilder = RectorConfig::configure();
$defaultRectorConfigurationSetup = require __DIR__ . '/vendor/brandembassy/coding-standard/default-rector.php';

$defaultSkipList = $defaultRectorConfigurationSetup($rectorConfigBuilder);

// You can skip unwanted rules here
$skipList = array_merge(
    $defaultSkipList,
    [
        '*/__fixtures__/*',
        NewlineAfterStatementRector::class, // might conflict with ECS
    ],
);

// You can override/append to the default configuration here
$rectorConfigBuilder
    ->withPHPStanConfigs([__DIR__ . '/phpstan.neon'])
    ->withCache('./var/temp/rector', FileCacheStorage::class)
    ->withSkip($skipList);

return $rectorConfigBuilder;
```

PhpStorm
--------

[](#phpstorm)

This project contains inspections and code style configurations for PhpStorm.

- `BrandEmbassyCodeStyle.xml`
- `BrandEmbassyInspections.xml`

Importing these configurations reduces number of errors in `phpcs` check before committing.

Versioning
----------

[](#versioning)

This library follows semantic versioning, and additions to the code ruleset are only performed in major releases.

Testing
-------

[](#testing)

@TODO: inspiration -

If you are contributing to the Brand Embassy Coding Standard and want to test your contribution, you just need to execute PHPCS with the tests folder and ensure it matches the expected report:

```
$ ./vendor/bin/phpcs tests/input --report=summary --report-file=phpcs.log; diff tests/expected_report.txt phpcs.log
```

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance48

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~34 days

Recently: every ~4 days

Total

74

Last Release

452d ago

Major Versions

11.6 → 12.0.02024-09-05

12.1.0 → 13.02024-10-22

13.0 → 14.02024-12-16

13.1 → 14.22025-03-13

13.2 → 14.32025-03-14

PHP version history (3 changes)8.4PHP ^7.1 || ^8.0

9.x-devPHP ^7.4 || &gt;=8.1

11.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3398651?v=4)[Jan Veselý](/maintainers/janveselynet)[@janveselynet](https://github.com/janveselynet)

![](https://avatars.githubusercontent.com/u/10008612?v=4)[Petr Heinz](/maintainers/PetrHeinz)[@PetrHeinz](https://github.com/PetrHeinz)

![](https://avatars.githubusercontent.com/u/6583541?v=4)[Dominik Voda](/maintainers/dominikvoda)[@dominikvoda](https://github.com/dominikvoda)

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

---

Top Contributors

[![dominikkaluza](https://avatars.githubusercontent.com/u/38032505?v=4)](https://github.com/dominikkaluza "dominikkaluza (46 commits)")[![dorrogeray](https://avatars.githubusercontent.com/u/4999006?v=4)](https://github.com/dorrogeray "dorrogeray (18 commits)")[![dominikvoda](https://avatars.githubusercontent.com/u/6583541?v=4)](https://github.com/dominikvoda "dominikvoda (15 commits)")[![PetrHeinz](https://avatars.githubusercontent.com/u/10008612?v=4)](https://github.com/PetrHeinz "PetrHeinz (10 commits)")[![janveselynet](https://avatars.githubusercontent.com/u/3398651?v=4)](https://github.com/janveselynet "janveselynet (5 commits)")[![jakubkulhanek](https://avatars.githubusercontent.com/u/6791232?v=4)](https://github.com/jakubkulhanek "jakubkulhanek (4 commits)")[![michalbrauner](https://avatars.githubusercontent.com/u/1190316?v=4)](https://github.com/michalbrauner "michalbrauner (3 commits)")[![signor-pedro](https://avatars.githubusercontent.com/u/53906348?v=4)](https://github.com/signor-pedro "signor-pedro (3 commits)")[![Dominik-Chrastecky-Nice](https://avatars.githubusercontent.com/u/223265550?v=4)](https://github.com/Dominik-Chrastecky-Nice "Dominik-Chrastecky-Nice (2 commits)")[![tomasJancar](https://avatars.githubusercontent.com/u/33625465?v=4)](https://github.com/tomasJancar "tomasJancar (1 commits)")[![michalbrauner-nicecxone](https://avatars.githubusercontent.com/u/211993115?v=4)](https://github.com/michalbrauner-nicecxone "michalbrauner-nicecxone (1 commits)")[![michal-tichy-84](https://avatars.githubusercontent.com/u/37624917?v=4)](https://github.com/michal-tichy-84 "michal-tichy-84 (1 commits)")[![milan-zelenka](https://avatars.githubusercontent.com/u/26469679?v=4)](https://github.com/milan-zelenka "milan-zelenka (1 commits)")[![mksada](https://avatars.githubusercontent.com/u/13765595?v=4)](https://github.com/mksada "mksada (1 commits)")[![nclemons78](https://avatars.githubusercontent.com/u/104171116?v=4)](https://github.com/nclemons78 "nclemons78 (1 commits)")[![ptrzdnk](https://avatars.githubusercontent.com/u/93596081?v=4)](https://github.com/ptrzdnk "ptrzdnk (1 commits)")[![rahuljain-nice](https://avatars.githubusercontent.com/u/208470271?v=4)](https://github.com/rahuljain-nice "rahuljain-nice (1 commits)")[![akasharya-nice](https://avatars.githubusercontent.com/u/166787470?v=4)](https://github.com/akasharya-nice "akasharya-nice (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[wp-cli/wp-cli-tests

WP-CLI testing framework

423.0M129](/packages/wp-cli-wp-cli-tests)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20276.8k20](/packages/shopsys-coding-standards)[tomasvotruba/ctor

Prefer constructor over always called setters

1524.9k19](/packages/tomasvotruba-ctor)

PHPackages © 2026

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