PHP code example of the-ge / phpcsfixer-fixers

1. Go to this page and download the library: Download the-ge/phpcsfixer-fixers 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/ */

    

the-ge / phpcsfixer-fixers example snippets


// Before
namespace N;
class Foo {}

// After
namespace N;


class Foo {}

// .php-cs-fixer.dist.php
use TheGe\PhpCsFixer\Fixer\ClassNotation\BlankLinesBeforeClassyBlockFixer;

return (new PhpCsFixer\Config())
    ->registerCustomFixers([new BlankLinesBeforeClassyBlockFixer()])
    ->setRules([
        'TheGe/blank_lines_before_classy_block' => true,
    ]);