PHP code example of interaction-design-foundation / coding-standard

1. Go to this page and download the library: Download interaction-design-foundation/coding-standard 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/ */

    

interaction-design-foundation / coding-standard example snippets


 declare(strict_types=1);

use IxDFCodingStandard\PhpCsFixer\Config;

// @see https://mlocati.github.io/php-cs-fixer-configurator/ for ruleOverrides options.
return Config::create(__DIR__, ruleOverrides: []);

use PhpCsFixer\Finder;

$finder = Finder::create()->in(__DIR__)->name('*.php');

// Override individual rules, your own Finder and use your cache path
return Config::create(__DIR__, finder: $finder, ruleOverrides: [
    'final_class' => true,
])->setCacheFile('./.cache/.php-cs-fixer.cache');

$rules = \IxDFCodingStandard\PhpCsFixer\Rules::get();
shell
vendor/bin/php-cs-fixer fix