Skip to content

Commit b75ffba

Browse files
committed
Use PER-CS2.0 ruleset for php-cs-fixer
1 parent 6f0a512 commit b75ffba

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.php-cs-fixer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
$config = new PhpCsFixer\Config();
1111
return $config->setRules([
12-
'@Symfony' => true,
13-
12+
'@PER-CS2.0' => true,
13+
'@PER-CS2.0:risky' => true,
1414
'array_syntax' => ['syntax' => 'short'],
1515
'linebreak_after_opening_tag' => true,
1616
'ordered_imports' => true,
1717
'phpdoc_order' => true,
1818
])
1919
->setFinder($finder)
20+
->setRiskyAllowed(true)
2021
;

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"psr/http-factory": "^1.0"
3030
},
3131
"require-dev": {
32-
"friendsofphp/php-cs-fixer": "^3",
32+
"friendsofphp/php-cs-fixer": "^3.45",
3333
"phpunit/phpunit": "^9 || ^10.5",
3434
"guzzlehttp/psr7": "^2",
3535
"php-mock/php-mock-phpunit": "^2.6",
@@ -46,6 +46,7 @@
4646
}
4747
},
4848
"scripts": {
49+
"codestyle": "php-cs-fixer fix",
4950
"coverage": "phpunit --coverage-html=\".phpunit.cache/code-coverage\"",
5051
"phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon",
5152
"test": "phpunit"

0 commit comments

Comments
 (0)