PHP code example of theofidry / php-cs-fixer-config

1. Go to this page and download the library: Download theofidry/php-cs-fixer-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

theofidry / php-cs-fixer-config example snippets


 // php-cs-fixer.dist.php

declare(strict_types=1);

use Fidry\PhpCsFixerConfig\FidryConfig;
use PhpCsFixer\Finder;

$finder = // Configure Finder here as usual;

// Here use the specific config.
$config = new FidryConfig(
    // The header comment used
    <<<'EOF'
        This file is part of the Fidry PHP-CS-Fixer Config package.

        (c) Théo FIDRY <[email protected]>

        For the full copyright and license information, please view the LICENSE
        file that was distributed with this source code.
        EOF,
    // The min PHP version supported (best to align with your composer.json)
    72000,
);

// You can further configure the $config here, to add or override some rules. 
$config->addRules([
    // ...
]);

return $config->setFinder($finder);