25 lines
649 B
PHP
25 lines
649 B
PHP
#!/usr/bin/php
|
|
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
$finder = \PhpCsFixer\Finder::create();
|
|
|
|
$config = new \PhpCsFixer\Config();
|
|
$config->setRules([
|
|
'@PSR12' => true,
|
|
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
|
'concat_space' => ['spacing' => 'one'],
|
|
'whitespace_after_comma_in_array' => true,
|
|
'align_multiline_comment' => true,
|
|
'no_unused_imports' => true,
|
|
'phpdoc_align' => true,
|
|
'phpdoc_indent' => true,
|
|
// 'psr_autoloading' => true,
|
|
'no_useless_return' => true,
|
|
'return_assignment' => true,
|
|
'trailing_comma_in_multiline' => true,
|
|
])->setRiskyAllowed(true);
|
|
|
|
return $config->setFinder($finder);
|