PHP code example of daniel-de-wit / php-cs-fixer-rules
1. Go to this page and download the library: Download daniel-de-wit/php-cs-fixer-rules 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/ */
daniel-de-wit / php-cs-fixer-rules example snippets
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/app',
__DIR__.'/config',
__DIR__.'/database',
__DIR__.'/routes',
__DIR__.'/tests',
]);
$customRules = [];
return DanielDeWit\phpcsfixer($finder, $customRules);
{
"scripts": {
"php-cs-fixer": [
"vendor/bin/php-cs-fixer fix"
]
}
}
bash
vendor/bin/php-cs-fixer fix