mxrvx/code-style

Code style and static analysis tools rulesets collection

Maintainers

👁 vgrish

Package info

github.com/mxrvx/code-style

pkg:composer/mxrvx/code-style

Statistics

Installs: 40

Dependents: 7

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2025-12-04 08:34 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT f43bcd26c19b1038422f83e524b7e2870cf0c7ad

  • Vgrish <vgrish.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-04 09:39:49 UTC


README

This repository contains ruleset for PHP CS Fixer based on PER-2.

Installation and configuration

Install the package via composer:

composer require --dev mxrvx/code-style

👁 PHP
👁 Latest Version on Packagist
👁 License
👁 Total Downloads

Create a configuration file .php-cs-fixer.dist.php in the root of your project:

<?php

declare(strict_types=1);

require_once 'vendor/autoload.php';

return \MXRVX\CodeStyle\Builder::create()
 ->include(__DIR__ . '/src')
 ->include(__FILE__)
 ->build();

Feel free to adjust the paths to include/exclude files and directories.

Usage

To more convenient usage, you can add the following commands to the scripts section of the composer.json file:

{
 "scripts": {
 "cs:diff": "php-cs-fixer fix --dry-run -v --diff",
 "cs:fix": "php-cs-fixer fix -v"
 }
}

Now you can run the following commands:

composer cs:diff
composer cs:fix