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.2.1(2mo ago)023.0k[1 issues](https://github.com/konradmichalik/php-cs-fixer-preset/issues)5GPL-3.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Oct 8Pushed 3d 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 2d ago

READMEChangelog (4)Dependencies (20)Versions (16)Used By (5)

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\RuleSet;
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(
        RuleSet::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

49

—

FairBetter than 94% of packages

Maintenance93

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.6% 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 ~64 days

Total

4

Last Release

75d 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

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (75 commits)")[![konradmichalik](https://avatars.githubusercontent.com/u/4558190?v=4)](https://github.com/konradmichalik "konradmichalik (53 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

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[symfony/stimulus-bundle

Integration with your Symfony app &amp; Stimulus!

17417.5M295](/packages/symfony-stimulus-bundle)[illuminate/session

The Illuminate Session package.

9939.3M850](/packages/illuminate-session)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

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

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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