PHP code example of wucdbm / php-cs-fixers

1. Go to this page and download the library: Download wucdbm/php-cs-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/ */

    

wucdbm / php-cs-fixers example snippets


 

return PhpCsFixer\Config::create()
    ->registerCustomFixers([
        // Register the Custom Fixer
        new \Wucdbm\PhpCsFixer\Fixer\EnsureBlankLineAfterClassOpeningFixer()
    ])
    ->setRules([
        '@Symfony'                                     => true,
        // And add it to your list of rules
        'Wucdbm/ensure_blank_line_after_class_opening' => true
    ]);



use Wucdbm\PhpCsFixer\Config\ConfigFactory;

$copyright = <<<COMMENT
This file is part of the Wucdbm PhpCSFixers package.

(c) Martin Kirilov <[email protected]>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;

return ConfigFactory::createCopyrightedConfig([
    __DIR__ . '/src',
    __DIR__ . '/tests'
], $copyright)
    ->setUsingCache(false);



use Wucdbm\PhpCsFixer\Config\ConfigFactory;

return ConfigFactory::createConfig(__DIR__ . '/src')
    ->setUsingCache(false);