PHP code example of kevyworks / laravel-php-cs-fixer

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

    

kevyworks / laravel-php-cs-fixer example snippets


// $path : a path or an array of paths.
// $options : an array of options.
php_cs_fixer($path, $options);

// Quick.
php_cs_fixer('path/to/a/file/or/dir');

// Advanced.
php_cs_fixer(['path/to/file/or/dir/1', 'path/to/file/or/dir/2'], [
    '--allow-risky' => true,
    '--dry-run' => true,
    '--config' => 'path/to/a/config/file'
]);
$ php artisan vendor:publish --tag=bgaze-php-cs-fixer-config
$ php artisan php-cs-fixer:fix [options] [path/to/dir/or/file]
$ php artisan php-cs-fixer:version