PHPackages                             smile/magento2-smilelab-phpcs - 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. smile/magento2-smilelab-phpcs

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

smile/magento2-smilelab-phpcs
=============================

PHPCS coding standard for Magento projects.

4.0.0(1y ago)361.4k↓41.9%11OSL-3.0PHPCI passing

Since Jan 25Pushed 9mo ago6 watchersCompare

[ Source](https://github.com/Smile-SA/magento2-smilelab-phpcs)[ Packagist](https://packagist.org/packages/smile/magento2-smilelab-phpcs)[ RSS](/packages/smile-magento2-smilelab-phpcs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (1)

Smile Lab PHPCS Coding Standard
===============================

[](#smile-lab-phpcs-coding-standard)

Description
-----------

[](#description)

This coding standard is meant to be used on Magento projects and modules.

It uses the following rulesets:

- [PSR-12](https://www.php-fig.org/psr/psr-12/)
- [Magento Coding Standard](https://github.com/magento/magento-coding-standard)
- [Slevomat Coding Standard](https://github.com/slevomat/coding-standard)

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

[](#installation)

To use this ruleset, require it in composer:

```
composer require --dev smile/magento2-smilelab-phpcs
```

Rulesets
--------

[](#rulesets)

Two rulesets are available:

- `SmileLab` (Magento &gt;=2.4.4)
- `SmileLab-237-243` (Magento &gt;=2.3.7 &lt;2.4.4)

Older versions of Magento (&lt;2.4.4) require a separate ruleset, because they use an outdated version of the Magento coding standard.

Configuration
-------------

[](#configuration)

Create a configuration file named`phpcs.xml.dist` at the root of your project.

Example for a Magento project:

```

    app/code
    app/design

```

Example for a community module:

```

    .
    vendor/*

```

Where `{{min_php_version}}` is the minimum compatible version of PHP required by your module. For example, if the min version is PHP 7.4:

```

```

Usage
-----

[](#usage)

You can run phpcs with this command:

```
vendor/bin/phpcs --extensions=php,phtml
```

You can fix most of the errors found with:

```
vendor/bin/phpcbf --extensions=php,phtml
```

Guidelines
----------

[](#guidelines)

If your class overrides a method declared in a parent class, use `@inheritdoc`:

```
/**
 * @inheritdoc
 */
public function execute(InputInterface $input, OutputInterface $output): int
{
    // ...
}
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance52

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 75.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 ~249 days

Recently: every ~195 days

Total

13

Last Release

404d ago

Major Versions

1.0.5 → 2.0.02019-03-01

2.0.0 → 3.0.02022-09-23

3.0.3 → 4.x-dev2025-04-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c4859b63b960878ef37185d533dbd629247859679dfcdf465259d6a4a488ee7?d=identicon)[romainruaud](/maintainers/romainruaud)

![](https://www.gravatar.com/avatar/53fd29100f3b7087742b99c75f58c5488b95a3858d68636f3ad6d3d8b5f91168?d=identicon)[rbayet](/maintainers/rbayet)

![](https://www.gravatar.com/avatar/965d8c2ff0fdcac3a8b6058d27705410e735b11b6a0e926fcd0cc6c2ce87e4ba?d=identicon)[guvra](/maintainers/guvra)

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

---

Top Contributors

[![guvra](https://avatars.githubusercontent.com/u/3967259?v=4)](https://github.com/guvra "guvra (37 commits)")[![PierreGauthier](https://avatars.githubusercontent.com/u/4659198?v=4)](https://github.com/PierreGauthier "PierreGauthier (6 commits)")[![romainruaud](https://avatars.githubusercontent.com/u/15340849?v=4)](https://github.com/romainruaud "romainruaud (6 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smile-magento2-smilelab-phpcs/health.svg)

```
[![Health](https://phpackages.com/badges/smile-magento2-smilelab-phpcs/health.svg)](https://phpackages.com/packages/smile-magento2-smilelab-phpcs)
```

###  Alternatives

[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k13](/packages/shopsys-coding-standards)[genealabs/php-coding-standards

1654.8k1](/packages/genealabs-php-coding-standards)

PHPackages © 2026

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