PHP code example of realodix / relax

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

    

realodix / relax example snippets


use Realodix\Relax\Config;

return Config::this()
    ->setRules([
        '@Realodix/Laravel' => true,
    ]);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = (new Finder)->in(__DIR__);

return (new Config)
    ->registerCustomRuleSets([
        new \Realodix\Relax\Rulesets\Laravel,
    ])
    ->setRules([
        '@Realodix/Laravel' => true,
    ])
    ->setFinder($finder)
;
sh
./vendor/bin/php-cs-fixer fix