51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
<?php
|
|
|
|
use PhpCsFixer\Config;
|
|
use PhpCsFixer\Finder;
|
|
|
|
return (new Config())
|
|
->setUsingCache(true)
|
|
->setRules([
|
|
'@PSR12' => true,
|
|
'array_syntax' => [
|
|
'syntax' => 'short',
|
|
],
|
|
'cast_spaces' => true,
|
|
'class_attributes_separation' => [
|
|
'elements' => [
|
|
'method' => 'one',
|
|
],
|
|
],
|
|
'function_typehint_space' => true,
|
|
'method_argument_space' => [
|
|
'on_multiline' => 'ignore',
|
|
],
|
|
'no_multiline_whitespace_around_double_arrow' => true,
|
|
'no_singleline_whitespace_before_semicolons' => true,
|
|
'no_trailing_comma_in_singleline_array' => true,
|
|
'no_unused_imports' => true,
|
|
'no_whitespace_before_comma_in_array' => true,
|
|
'object_operator_without_whitespace' => true,
|
|
'ordered_imports' => [
|
|
'imports_order' => ['class', 'function', 'const'],
|
|
'sort_algorithm' => 'alpha',
|
|
],
|
|
'single_quote' => true,
|
|
'trailing_comma_in_multiline' => [
|
|
'elements' => ['arrays'],
|
|
],
|
|
'trim_array_spaces' => true,
|
|
'whitespace_after_comma_in_array' => true,
|
|
])
|
|
->setFinder(
|
|
Finder::create()
|
|
->in([
|
|
__DIR__.'/app',
|
|
__DIR__.'/config',
|
|
__DIR__.'/database',
|
|
__DIR__.'/resources/lang',
|
|
__DIR__.'/routes',
|
|
__DIR__.'/tests',
|
|
])
|
|
);
|