PHPackages                             own3d/php-cs-fixer-config - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. own3d/php-cs-fixer-config

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

own3d/php-cs-fixer-config
=========================

Personal PHP-CS-Fixer Configuration

3.0.1(3y ago)02.9k1MITPHPPHP ^7.1|^8.0

Since Jan 15Pushed 3y agoCompare

[ Source](https://github.com/own3d/php-cs-fixer-config)[ Packagist](https://packagist.org/packages/own3d/php-cs-fixer-config)[ RSS](/packages/own3d-php-cs-fixer-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (11)Used By (1)

PHP-CS-Fixer Configuration
==========================

[](#php-cs-fixer-configuration)

[![Latest Stable Version](https://camo.githubusercontent.com/3ca8d4ed0132ed56d36413cab50ec723f127efb029eaa5cde2a33d6fcc32f59e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6d616e7a6970702f5048502d43532d46697865722d436f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/php-cs-fixer-config)[![Total Downloads](https://camo.githubusercontent.com/8dc9e41677d9c2c298c26b8afa2a0775d9558fd7758bd03d165195df2f54363b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6d616e7a6970702f5048502d43532d46697865722d436f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/php-cs-fixer-config)[![License](https://camo.githubusercontent.com/0f07462327b66f9b2314067f5a4ed60ec769eb71124966850a69d9fb05df44bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726f6d616e7a6970702f5048502d43532d46697865722d436f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/romanzipp/php-cs-fixer-config)[![GitHub Build Status](https://camo.githubusercontent.com/21acacdc87eb325279458405de69f27e28cf1c18d47c152fd7f3a663c0adadac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f726f6d616e7a6970702f5048502d43532d46697865722d436f6e6669672f54657374733f7374796c653d666c61742d737175617265)](https://github.com/romanzipp/PHP-CS-Fixer-Config/actions)

Personal [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) wrapper &amp; preset management.

Installation
------------

[](#installation)

```
composer require romanzipp/php-cs-fixer-config --dev

```

**Notice**: You also need to [install the PHP-CS-Fixer package](https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation) itself if you need a local installation with executable in you `vendor/bin` folder.

Usage
-----

[](#usage)

This package has been created to streamline configuration management for multiple projects and keeping PHP CS Fixer rules up to date.

#### `.php-cs-fixer.dist.php`

[](#php-cs-fixerdistphp)

```
return romanzipp\Fixer\Config::make()
    ->in(__DIR__)
    ->preset(
        new romanzipp\Fixer\Presets\PrettyPHP()
    )
    ->out();
```

### Available Presets

[](#available-presets)

- [**PrettyPHP**](src/Presets/PrettyPHP.php)
- [**PrettyLaravel**](src/Presets/PrettyLaravel.php) (extends [PrettyPHP](src/Presets/PrettyPHP.php))

You can easily create your own presets by extending the [**AbstractPreset**](src/Presets/AbstractPreset.php) class.

### Overriding presets

[](#overriding-presets)

In case you only need some tweaks for specific projects - which won't deserve an own preset - there are various methods you can make us of.

```
$config = romanzipp\Fixer\Config::make();

$config->allowRisky(true);                  // Allow risky rules.
$config->withRules(['...']);                // Set additional rules
$config->exclude(['...']);                  // Add single or many files to the list of excluded files.
$config->excludeDirectories(['...']);       // Add single or many directories to the list of excluded directories.
```

#### Access the config and finder instances

[](#access-the-config-and-finder-instances)

```
return romanzipp\Fixer\Config::make()
    // ...
    ->finderCallback(static function (PhpCsFixer\Finder $finder): void {
        // ...
    })
    ->configCallback(static function (PhpCsFixer\Config $config): void {
        // ...
    })
    // ...
    ->out();
```

PHPStorm Configuration
----------------------

[](#phpstorm-configuration)

### Prequisites

[](#prequisites)

You will need to install PHP CS Fixer globally on your system because PHPStorm [does not allow](https://youtrack.jetbrains.com/issue/WI-56557) you to set the php-cs-fixer executable on a per-project basis or relative to the project path.

```
composer global require friendsofphp/php-cs-fixer
```

### 1. Enable Inspection

[](#1-enable-inspection)

[![](images/inspection.png)](images/inspection.png)

### 2. Select ruleset .php-cs-fixer.dist.php file `[...]`

[](#2-select-ruleset-php-cs-fixerdistphp-file-)

[![](images/ruleset.png)](images/ruleset.png)

Unfortunately you have to repeat this process for every project since [there is a bug in PHPStorm](https://youtrack.jetbrains.com/issue/WI-56557) which prevents users from using relative paths for the `.php-cs-fixer.dist.php` configuration or executable file.

Another theoretical approach to this issue is to create a unified ruleset file in your users .composer folder. This has the downside on only having one single ruleset.

### 3. Navigate to Quality Tools by clicking on the "PHP CS Fixer" link

[](#3-navigate-to-quality-tools-by-clicking-on-the-php-cs-fixer-link)

[![](images/navigate.png)](images/navigate.png)

### 4. Select PHP-CS-Fixer executable

[](#4-select-php-cs-fixer-executable)

[![](images/executable.png)](images/executable.png)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Recently: every ~189 days

Total

10

Last Release

1193d ago

Major Versions

1.0.7 → 3.02021-08-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/03da561a330aa76d1a09096b2ee0c48ee53ca51d62fa0239469d9615b6855733?d=identicon)[ghostzero](/maintainers/ghostzero)

---

Top Contributors

[![romanzipp](https://avatars.githubusercontent.com/u/11266773?v=4)](https://github.com/romanzipp "romanzipp (35 commits)")[![ghostzero](https://avatars.githubusercontent.com/u/6547306?v=4)](https://github.com/ghostzero "ghostzero (3 commits)")[![derpierre65](https://avatars.githubusercontent.com/u/7004269?v=4)](https://github.com/derpierre65 "derpierre65 (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/own3d-php-cs-fixer-config/health.svg)

```
[![Health](https://phpackages.com/badges/own3d-php-cs-fixer-config/health.svg)](https://phpackages.com/packages/own3d-php-cs-fixer-config)
```

###  Alternatives

[phpdocumentor/type-resolver

A PSR-5 based resolver of Class names, Types and Structural Element Names

9.2k719.5M166](/packages/phpdocumentor-type-resolver)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
