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;
return Config::create(__DIR__);
return Config::create(__DIR__, ruleOverrides: [
'final_public_method_for_abstract_class' => false,
]);
use IxDFCodingStandard\PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()->in(__DIR__)->name('*.php');
return Config::create(__DIR__, finder: $finder);
$rules = \IxDFCodingStandard\PhpCsFixer\Rules::get();
shell
vendor/bin/phpcs # check with PHP_CodeSniffer
vendor/bin/phpcbf # fix with PHP_CodeSniffer
vendor/bin/php-cs-fixer fix --dry-run --diff # check with PHP-CS-Fixer
vendor/bin/php-cs-fixer fix # fix with PHP-CS-Fixer