PHPackages                             spiral/code-style - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. spiral/code-style

ActiveLibrary[Testing &amp; Quality](/categories/testing)

spiral/code-style
=================

Code style and static analysis tools rulesets collection

v2.3.1(8mo ago)7429.8k↑21.6%3[2 issues](https://github.com/spiral/code-style/issues)20MITPHPPHP &gt;=8.0CI failing

Since Oct 9Pushed 8mo ago8 watchersCompare

[ Source](https://github.com/spiral/code-style)[ Packagist](https://packagist.org/packages/spiral/code-style)[ Docs](https://github.com/spiral/code-style)[ GitHub Sponsors](https://github.com/sponsors/spiral)[ RSS](/packages/spiral-code-style/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (4)Versions (20)Used By (20)

Code style presets for Spiral components
========================================

[](#code-style-presets-for-spiral-components)

This repository contains ruleset for [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) based on PER-2.

Installation and configuration
------------------------------

[](#installation-and-configuration)

Install the package via composer:

```
composer require --dev spiral/code-style

```

[![PHP](https://camo.githubusercontent.com/93a81b05876a61084d9e1cc7fb22de630eb72bd708ad6a968faec0f10ff9a3aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73706972616c2f636f64652d7374796c652e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/spiral/code-style)[![Latest Version on Packagist](https://camo.githubusercontent.com/6e3008ebac8ffa4e6fec5a87cc37f40d6f139a8be32fa30f3493042a4ab38124/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73706972616c2f636f64652d7374796c652e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/spiral/code-style)[![License](https://camo.githubusercontent.com/8df9bc12adc74669835e82ab0a7eef479e5eba501d1d467d2a01b083a28eebda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73706972616c2f636f64652d7374796c652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/e3694f15015642ecf10f0f2561c0b310bd4cbcf2331439cb58cd59b6d0b76679/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706972616c2f636f64652d7374796c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spiral/code-style)

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

```
