PHP code example of camelot / coding-style

1. Go to this page and download the library: Download camelot/coding-style 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/ */

    

camelot / coding-style example snippets




return Camelot\CsFixer\Config::create()
    // addRules() accepts arrays and traversable objects.
    ->addRules(
        // Create Camelot's standard rules.
        Camelot\CsFixer\Rules::create()
            // Enable risky rules.
            ->risky()
            // Enable PHP 5.6, 7.0, and 7.1 rules. Methods exist for each version.
            //->php71()
    )

    // Modify existing rules or add new ones.
    ->addRules([
        'heredoc_to_nowdoc' => false,
        'mb_str_functions'  => true,
    ])

    // Add directories to scan.
    ->in('src', 'tests')
;