PHP code example of comlaude / php-formatter

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

    

comlaude / php-formatter example snippets


return [
    // A flag to enable/disable caching mode
    'cache' => false,
    // See https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/doc/rules/index.rst for available rules and rulesets
    'rules' => [
        '@PSR2' => true,
        '@DoctrineAnnotation' => true,
        'whitespace_after_comma_in_array' => true,
    ],
    // You can initialises your own ParallelConfig class here with your desired parameters
    // default is set to detect the environment and use the appropriate resources
    'parallel' => PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect(),
    // this is used to call function on configuring a finder as defined here https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/doc/config.rst
    'finder' => [
        '
js
"comlaude/php-formatter": "^1.0.0"
shell
$ php composer update
shell
$ php composer 
shell
php vendor/bin/php-formatter fix
shell
php vendor/bin/php-formatter fix -v --dry-run