PHPackages                             konradmichalik/php-cs-fixer-preset - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. konradmichalik/php-cs-fixer-preset

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

konradmichalik/php-cs-fixer-preset
==================================

Preset configuration for PHP-CS-Fixer

0.1.1(5mo ago)015.1k[5 PRs](https://github.com/konradmichalik/php-cs-fixer-preset/pulls)4GPL-3.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Oct 8Pushed 2mo agoCompare

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

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

PHP-CS-Fixer Preset
===================

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

[![Coverage](https://camo.githubusercontent.com/57d2fcdd6223acaed1d03fdd9af5b46a9433cacc48b1865fc2cc493dfbc26292/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365743f6c6f676f3d636f766572616c6c73)](https://coveralls.io/github/konradmichalik/php-cs-fixer-preset)[![CGL](https://camo.githubusercontent.com/befdc2a8408708bf5d03b7c480e097bdaad516110ff6977738fe7f689203b985/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365742f63676c2e796d6c3f6c6162656c3d63676c266c6f676f3d676974687562)](https://github.com/konradmichalik/php-cs-fixer-preset/actions/workflows/cgl.yml)[![Tests](https://camo.githubusercontent.com/a9a889780e9bcbf279546aefc91a5183b6f1413cbeb9f103130f6f6d4a064815/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365742f74657374732e796d6c3f6c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/konradmichalik/php-cs-fixer-preset/actions/workflows/tests.yml)[![Supported PHP Versions](https://camo.githubusercontent.com/9a32d140323f039f5609e7d301d28dd36996e8444164bf31a16061d080fdafdf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365742f7068703f6c6f676f3d706870)](https://packagist.org/packages/konradmichalik/php-cs-fixer-preset)

This package provides a basic [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) configuration.

Important

This package is intended for use in my personal projects only. It is not designed for general use.

🔥 Installation
--------------

[](#-installation)

[![Packagist](https://camo.githubusercontent.com/3cc2af6fbb130fef611f5f01ffa5fad948446d3265d01b7a8f52b834399ada09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365743f6c6162656c3d76657273696f6e266c6f676f3d7061636b6167697374)](https://packagist.org/packages/konradmichalik/php-cs-fixer-preset)[![Packagist Downloads](https://camo.githubusercontent.com/cc38f2dbd5ea35b623fe3c0fb2428cd4a456619dcbf4fc8cabb41e9b9094a7e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f6e7261646d696368616c696b2f7068702d63732d66697865722d7072657365743f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/konradmichalik/php-cs-fixer-preset)

```
composer require konradmichalik/php-cs-fixer-preset --dev
```

⚡ Usage
-------

[](#-usage)

Configure PHP-CS-Fixer in your `.php-cs-fixer.php` file:

```
use KonradMichalik\PhpCsFixerPreset\Config;
use KonradMichalik\PhpCsFixerPreset\Package\{Author, CopyrightRange, Type};
use KonradMichalik\PhpCsFixerPreset\Rules\Header;
use KonradMichalik\PhpCsFixerPreset\Rules\Set\Set;
use Symfony\Component\Finder\Finder;

return Config::create()
    // Header Comment Rule with manual data
    ->withRule(
        Header::create(
            'php-cs-fixer-preset',
            Type::ComposerPackage,
            Author::create('Konrad Michalik', 'hej@konradmichalik.dev'),
            CopyrightRange::from(2025),
        ),
    )
    // Header Comment Rule with Composer Detection
    ->withRule(
        Header::fromComposer(
            copyrightRange: CopyrightRange::from(2025) // Optional overwrite specific composer information
        ),
    )
    // Custom Rule
    ->withRule(
        Set::fromArray([
            'modernize_types_casting' => true,
        ]),
    )
    ->withFinder(static fn (Finder $finder) => $finder->in(__DIR__))
;
```

💎 Credits
---------

[](#-credits)

This project is highly inspired by the fabulous [php-cs-fixer-config](https://github.com/eliashaeussler/php-cs-fixer-config) package by [Elias Häußler](https://github.com/eliashaeussler).

⭐ License
---------

[](#-license)

This project is licensed under [GNU General Public License 3.0 (or later)](LICENSE).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance80

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.7% 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 ~47 days

Total

2

Last Release

175d ago

PHP version history (2 changes)0.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

0.1.1PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/11557705846f24da32a0e6e75c460db505c1b847f081ddaa3d27f3ea27f4097b?d=identicon)[konradmichalik](/maintainers/konradmichalik)

---

Top Contributors

[![konradmichalik](https://avatars.githubusercontent.com/u/4558190?v=4)](https://github.com/konradmichalik "konradmichalik (35 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (29 commits)")

---

Tags

php-cs-fixerphp-cs-fixer-config

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[akeneo/php-coupling-detector

Detect all the coupling issues of your project with respect to the coupling rules you have defined.

431.1M2](/packages/akeneo-php-coupling-detector)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)

PHPackages © 2026

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