mirror of
https://github.com/pterodactyl/panel.git
synced 2025-12-11 03:02:04 -06:00
58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
<?php
|
|
|
|
use PhpCsFixer\Config;
|
|
use PhpCsFixer\Finder;
|
|
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
|
|
|
|
$finder = (new Finder())
|
|
->name('*.php')
|
|
->ignoreVCSIgnored(true)
|
|
->exclude([__DIR__ . '/bootstrap/cache'])
|
|
->in([
|
|
__DIR__ . '/app',
|
|
__DIR__ . '/bootstrap',
|
|
__DIR__ . '/config',
|
|
__DIR__ . '/database',
|
|
__DIR__ . '/routes',
|
|
__DIR__ . '/tests',
|
|
]);
|
|
|
|
return (new Config())
|
|
->setFinder($finder)
|
|
->setUsingCache(true)
|
|
->setParallelConfig(ParallelConfigFactory::detect())
|
|
->setRules([
|
|
'@Symfony' => true,
|
|
'@PSR1' => true,
|
|
'@PSR2' => true,
|
|
'@PSR12' => true,
|
|
'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,
|
|
'no_useless_return' => true,
|
|
'ordered_imports' => [
|
|
'sort_algorithm' => 'length',
|
|
],
|
|
'phpdoc_align' => [
|
|
'align' => 'left',
|
|
'tags' => [
|
|
'param',
|
|
'property',
|
|
'return',
|
|
'throws',
|
|
'type',
|
|
'var',
|
|
],
|
|
],
|
|
// 'random_api_migration' => true,
|
|
'ternary_to_null_coalescing' => true,
|
|
'yoda_style' => [
|
|
'equal' => false,
|
|
'identical' => false,
|
|
'less_and_greater' => false,
|
|
],
|
|
]);
|