Skip to content

Commit 22c12d8

Browse files
Update the rules and CS version
1 parent c769351 commit 22c12d8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # pin@v2
177177
with:
178178
coverage: none
179-
tools: php-cs-fixer:3.8.0
179+
tools: php-cs-fixer:3.49.0
180180

181181
- name: Cache analysis data
182182
id: finishPrepare

.php-cs-fixer.dist.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<?php
22

33
$finder = PhpCsFixer\Finder::create()
4-
->exclude('node_modules')
5-
->exclude('_templates')
64
->in(__DIR__);
75

86
$config = new PhpCsFixer\Config();
97
return $config
108
->setRules([
11-
'@PSR1' => true,
12-
'@PSR2' => true,
9+
'@PSR12' => true,
1310
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
1411
'array_indentation' => true,
1512
'array_syntax' => ['syntax' => 'short'],
1613
'cast_spaces' => ['space' => 'none'],
17-
'class_keyword_remove' => false,
14+
// 'class_keyword_remove' => true, // replaces static::class with 'static' (won't work)
1815
'combine_consecutive_issets' => true,
1916
'combine_consecutive_unsets' => true,
2017
'combine_nested_dirname' => true,
@@ -45,6 +42,7 @@
4542
'no_unused_imports' => true,
4643
'no_useless_return' => true,
4744
'ordered_imports' => ['sort_algorithm' => 'alpha'],
45+
// 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], // adds params in the wrong order
4846
'phpdoc_align' => ['align' => 'left'],
4947
'phpdoc_indent' => true,
5048
'phpdoc_scalar' => true,

0 commit comments

Comments
 (0)