PHP code example of symplify / easy-coding-standard
1. Go to this page and download the library: Download symplify/easy-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/ */
symplify / easy-coding-standard example snippets
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withConfiguredRule(
ArraySyntaxFixer::class,
['syntax' => 'long']
)
->withRules([
ListSyntaxFixer::class,
])
->withPreparedSets(psr12: true);