Code style and static analysis tools rulesets collection

v1.1.0 2023-01-30 08:52 UTC

This package is auto-updated.

Last update: 2024-06-29 04:35:38 UTC


Codestyle presets for Spiral components

Latest Stable Version Build Status Codecov

This repository contains ruleset for static analyses tools. Currently supported:

Current codestyle is PSR-12.

PHP Codesniffer ruleset is located in config/ruleset.xml.

PHP CS Fixer ruleset is located in config/.php_cs

To apply it in your project do the following:

Install the package

composer require --dev spiral/code-style

Check the code

#vendor/bin/spiral-cs check <dir1> <dir2> <file1>....
vendor/bin/spiral-cs check src tests

Automatically fix the code style

#vendor/bin/spiral-cs fix <dir1> <dir2> <file1>....
vendor/bin/spiral-cs fix src tests