Skip to content

Commit

Permalink
all migration rules
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Feb 6, 2024
1 parent f99bfbc commit bf38ec7
Showing 1 changed file with 33 additions and 21 deletions.
54 changes: 33 additions & 21 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,54 @@
->ignoreVCSIgnored(true)
->in(__DIR__.'/lib')
->in(__DIR__.'/tests')
->append(array(__FILE__))
->append([__FILE__])
// Exclude generated files (single files)
->notPath('should-be-ignored.php')
;

$config = new PhpCsFixer\Config();
$config->setRules(array(
$config->setRules([
'@PhpCsFixer' => true,
'@Symfony' => true,
'array_syntax' => array(
'syntax' => 'long',
),
'method_argument_space' => array(
'@PHP54Migration' => true,
'@PHP56Migration:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'void_return' => false,
'declare_strict_types' => false,
'array_syntax' => [
'syntax' => 'short',
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
),
'general_phpdoc_annotation_remove' => array(
'annotations' => array('version', 'license', 'since'),
),
],
'general_phpdoc_annotation_remove' => [
'annotations' => ['version', 'license', 'since'],
],
'phpdoc_no_package' => true,
'phpdoc_separation' => array(
'groups' => array(
array(
'phpdoc_separation' => [
'groups' => [
[
'author',
),
array(
],
[
'deprecated',
'see',
),
array(
],
[
'param',
'return',
'throws',
),
),
),
))
],
],
],
])
->setRiskyAllowed(true)
->setCacheFile('.php-cs-fixer.cache')
->setFinder($finder)
;
Expand Down

0 comments on commit bf38ec7

Please sign in to comment.