ticketswap / php-cs-fixer-config
TicketSwap code style rules for PHP CS Fixer
1.1.0
2025-08-14 06:39 UTC
Requires
- php: ^8.4
- erickskrauch/php-cs-fixer-custom-fixers: ^1.3
- friendsofphp/php-cs-fixer: ^3.86
- symplify/coding-standard: ^12.4
Requires (Dev)
README
TicketSwap code style rules for PHP CS Fixer.
Installation
Install the package via Composer:
composer require --dev ticketswap/php-cs-fixer-config
Configuration
Create a .php-cs-fixer.php
file in the root of your project:
<?php declare(strict_types=1); use PhpCsFixer\Finder; use Ticketswap\PhpCsFixerConfig\PhpCsFixerConfigFactory; use Ticketswap\PhpCsFixerConfig\RuleSet\TicketSwapRuleSet; $finder = Finder::create() ->in(__DIR__ . '/src') ->append([__DIR__ . '/.php-cs-fixer.php']); return PhpCsFixerConfigFactory::create(TicketSwapRuleSet::create())->setFinder($finder);
Adjust the paths in the Finder
to match your project structure.
Usage
Run PHP CS Fixer to fix your code style:
vendor/bin/php-cs-fixer fix
To check for violations without fixing:
vendor/bin/php-cs-fixer check --diff