ticketswap/php-cs-fixer-config

TicketSwap code style rules for PHP CS Fixer

1.1.0 2025-08-14 06:39 UTC

This package is auto-updated.

Last update: 2025-08-14 06:40:12 UTC


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