ose/magento2-phpcs

Custom PHPCS Ruleset for Magento 2

Installs: 3 619

Dependents: 1

Suggesters: 0

Security: 0

Type:phpcodesniffer-standard

1.4.0 2025-06-19 02:39 UTC

This package is auto-updated.

Last update: 2025-06-19 02:40:18 UTC


README

Description

This ruleset is meant to be used on Magento projects and modules. It combines PSR-12, Magento Coding Standards and custom rules from Slevomat Coding Standard

Installation

To use this ruleset, require it in composer:

composer require --dev ose/magento2-phpcs

Usage

You can check this custom phpcs ruleset has been installed with this command:

php vendor/bin/phpcs -i

You can run phpcs on the app/code/Ose folder with this command:

php vendor/bin/phpcs --standard=magento2-phpcs app/code/Ose