mediact/coding-standard-magento2

This package is abandoned and no longer maintained. The author suggests using the mediact/coding-standard-magento2 package instead.

MediaCT PHP Coding Standard for Magento2

1.6.0 2020-09-01 14:42 UTC

This package is auto-updated.

Last update: 2022-08-10 18:33:32 UTC


README

This is the MediaCT coding standard for Magento 2 projects. It is based on the default MediaCT coding standard but some tests have been removed to create a workable and fast standard.

Installation

Use composer to require the standard in a project.

composer require --dev mediact/coding-standard-magento2

To let PHPCS know that this standard should be used add a phpcs.xml file in the root of the project.

<?xml version="1.0"?>
<ruleset>
    <rule ref="./vendor/mediact/coding-standard-magento2/src/MediactMagento2"/>
</ruleset>

Integration with PHPStorm and automatic testing

The recommended way to enable the coding standard in PHPStorm and automatic testing is by requiring the MediaCT testing suite in a project.

composer require --dev mediact/testing-suite

For more information go to MediaCT Testing Suite.

Contribution guidelines

Contributions are welcome. Please create pull requests which add or remove tests.