Skip to content

Commit

Permalink
Update the rules and CS version
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Feb 5, 2024
1 parent c769351 commit 22c12d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # pin@v2
with:
coverage: none
tools: php-cs-fixer:3.8.0
tools: php-cs-fixer:3.49.0

- name: Cache analysis data
id: finishPrepare
Expand Down
8 changes: 3 additions & 5 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('node_modules')
->exclude('_templates')
->in(__DIR__);

$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@PSR12' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'cast_spaces' => ['space' => 'none'],
'class_keyword_remove' => false,
// 'class_keyword_remove' => true, // replaces static::class with 'static' (won't work)
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'combine_nested_dirname' => true,
Expand Down Expand Up @@ -45,6 +42,7 @@
'no_unused_imports' => true,
'no_useless_return' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
// 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], // adds params in the wrong order
'phpdoc_align' => ['align' => 'left'],
'phpdoc_indent' => true,
'phpdoc_scalar' => true,
Expand Down

0 comments on commit 22c12d8

Please sign in to comment.