Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Cs Fixer Config Laravel Package

eliashaeussler/php-cs-fixer-config

Reusable PHP-CS-Fixer config package by Elias Häussler. Provides a ready-to-use ruleset and sensible defaults to keep PHP code style consistent across projects, with easy installation and quick integration into existing fixer setups.

View on GitHub
Deep Wiki
Context7

PHP-CS-Fixer config

Coverage CGL Tests Supported PHP Versions

This package contains basic PHP-CS-Fixer config for use in my personal projects. It is not meant to be used anywhere else. I won't provide support and don't accept pull requests for this repo.

🔥 Installation

Packagist Packagist Downloads

composer require eliashaeussler/php-cs-fixer-config

⚡ Usage

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

use EliasHaeussler\PhpCsFixerConfig;
use Symfony\Component\Finder;

// Create header rule
$header = PhpCsFixerConfig\Rules\Header::create(
    'eliashaeussler/package-name',
    PhpCsFixerConfig\Package\Type::ComposerPackage,
    PhpCsFixerConfig\Package\Author::create('Elias Häußler', 'elias@haeussler.dev'),
    PhpCsFixerConfig\Package\CopyrightRange::from(2021),
    PhpCsFixerConfig\Package\License::GPL3OrLater,
);

// Create TYPO3 rule set
$typo3RuleSet = PhpCsFixerConfig\Rules\Set\TYPO3RuleSet::create();

// Create custom rule set
$customRuleSet = PhpCsFixerConfig\Rules\RuleSet::fromArray([
    'modernize_types_casting' => true,
    'php_unit_test_case_static_method_calls' => [
        'call_type' => 'self',
    ],
]);

return PhpCsFixerConfig\Config::create()
    ->withRule($header)
    ->withRule($typo3RuleSet)
    ->withRule($customRuleSet)
    // You can also overwrite all rules
    ->withRule($customRuleSet, false)
    ->withFinder(static fn (Finder\Finder $finder) => $finder->in(__DIR__))
    // You can also inject your own Finder instance
    ->withFinder($finder)
;

⭐ License

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

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport