Files

59 lines
1.6 KiB
PHP
Raw Permalink Normal View History

<?php
2021-01-23 12:33:34 -08:00
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
2024-10-21 19:18:20 -06:00
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
2021-01-23 12:33:34 -08:00
2021-08-15 17:20:36 -07:00
$finder = (new Finder())
->name('*.php')
->ignoreVCSIgnored(true)
->exclude([__DIR__ . '/bootstrap/cache'])
->in([
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/database',
__DIR__ . '/routes',
__DIR__ . '/tests',
]);
2021-01-23 13:44:35 -08:00
return (new Config())
2021-01-23 12:33:34 -08:00
->setFinder($finder)
->setUsingCache(true)
->setParallelConfig(ParallelConfigFactory::detect())
2017-08-21 22:06:52 -05:00
->setRules([
'@Symfony' => true,
'@PSR1' => true,
'@PSR2' => true,
2021-01-23 12:33:34 -08:00
'@PSR12' => true,
2017-08-21 22:06:52 -05:00
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'heredoc_to_nowdoc' => true,
// 'no_alias_functions' => true,
// 'no_unreachable_default_argument_value' => true,
2017-08-21 22:06:52 -05:00
'no_useless_return' => true,
'ordered_imports' => [
'sort_algorithm' => 'length',
],
'phpdoc_align' => [
'align' => 'left',
'tags' => [
'param',
'property',
'return',
'throws',
'type',
'var',
],
],
'phpdoc_no_alias_tag' => false,
// 'random_api_migration' => true,
2017-11-05 13:33:42 -06:00
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
2017-12-01 20:10:06 -06:00
],
2021-01-23 12:33:34 -08:00
]);