27 lines
868 B
PHP
27 lines
868 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
->in(__DIR__)
|
|
->exclude('vendor');
|
|
|
|
return (new PhpCsFixer\Config())
|
|
->setRules([
|
|
'@PSR12' => true,
|
|
'@PSR12:risky' => true,
|
|
'array_indentation' => true,
|
|
'declare_strict_types' => true,
|
|
'explicit_string_variable' => true,
|
|
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
|
|
'native_function_invocation' => true,
|
|
'no_unused_imports' => true,
|
|
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
|
|
'single_quote' => true,
|
|
'strict_comparison' => true,
|
|
'strict_param' => true,
|
|
'trailing_comma_in_multiline' => true,
|
|
])
|
|
->setRiskyAllowed(true)
|
|
->setFinder($finder);
|