friendsofphp/php-cs-fixer not fixing Livewire classes

29 views Asked by At

I'm relatively new to csfixer and Livewire, and I have set up a static analyser on my codebase.

but when I run: docker-compose run --rm --no-deps api vendor/bin/php-cs-fixer fix it fixes everything but the classes inside App\Livewire.

Here's my csfixer config:

<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

return (new Config())
    ->setRules([
        '@PSR2'                           => true,
        '@Symfony'                        => true,
        '@PHP81Migration'                 => true,
        'class_attributes_separation'     => ['elements' => ['const' => 'none', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none', 'case' => 'none']],
        'no_superfluous_phpdoc_tags'      => false,
        'compact_nullable_typehint'       => true,
        'list_syntax'                     => ['syntax' => 'short'],
        'no_null_property_initialization' => true,
        'no_superfluous_elseif'           => true,
        'no_useless_else'                 => true,
        'ordered_class_elements'          => true,
        'simplified_null_return'          => true,
        'yoda_style'                      => false,
        'single_line_throw'               => false,
        'binary_operator_spaces'          => [
            'operators' => [
                '='  => 'align_single_space_minimal',
                '=>' => 'align_single_space_minimal',
            ],
        ],
    ])
    ->setFinder(
        Finder::create()
            ->in(__DIR__)
            ->path([
                'app',
                'config',
                'database',
                'routes',
                'tests',
            ])
            ->notPath('application/views')
            ->name('*.php')
            ->ignoreDotFiles(true)
            ->ignoreVCS(true)
    );

I haven't tried anything yet because I don't know where to start.

0

There are 0 answers