40 lines
1.4 KiB
PHP
40 lines
1.4 KiB
PHP
<?php
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
->notName('phpstan-baseline.php')
|
|
->in(__DIR__);
|
|
|
|
$config = new PhpCsFixer\Config();
|
|
$config
|
|
->setRules([
|
|
'@Symfony' => true,
|
|
'@PSR2' => true,
|
|
'@PhpCsFixer' => true,
|
|
'@PHP81Migration' => true,
|
|
'array_syntax' => ['syntax' => 'short'],
|
|
'blank_line_after_opening_tag' => false,
|
|
'blank_line_before_statement' => ['statements' => ['declare', 'try']],
|
|
'blank_line_between_import_groups' => false,
|
|
'cast_spaces' => false,
|
|
'concat_space' => ['spacing' => 'one'],
|
|
'echo_tag_syntax' => ['format' => 'long'],
|
|
'global_namespace_import' => true,
|
|
'increment_style' => ['style' => 'post'],
|
|
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
|
|
'no_whitespace_in_blank_line' => false,
|
|
'ordered_class_elements' => false,
|
|
'php_unit_internal_class' => false,
|
|
'php_unit_test_class_requires_covers' => false,
|
|
'phpdoc_align' => ['align' => 'left'],
|
|
'phpdoc_separation' => false,
|
|
'phpdoc_summary' => false,
|
|
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
|
|
'single_line_comment_style' => ['comment_types' => ['hash']],
|
|
'yoda_style' => false,
|
|
])
|
|
->setIndent(' ')
|
|
->setLineEnding("\n")
|
|
->setFinder($finder);
|
|
|
|
return $config;
|