PHP code example of bitvalencia / laravel-style-rules
1. Go to this page and download the library: Download bitvalencia/laravel-style-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/ */
bitvalencia / laravel-style-rules example snippets
// specify the paths to fix
$finder = PhpCsFixer\Finder::create()
->notPath('bootstrap/*')
->notPath('storage/*')
->notPath('vendor')
->in([
__DIR__ . '/app',
__DIR__ . '/tests',
__DIR__ . '/database',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
// then call and return the following style function
return BitValencia\style_rules($finder);
sh
./vendor/bin/php-cs-fixer fix
sh
./vendor/bin/php-cs-fixer fix --dry-run