update phpcs

This commit is contained in:
Robin Appelman 2026-07-15 14:42:24 +02:00
commit 9dbcdfb741
5 changed files with 23 additions and 18 deletions

19
.php-cs-fixer.dist.php Normal file
View file

@ -0,0 +1,19 @@
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
;
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'braces_position' => [
'functions_opening_brace' => 'same_line',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
],
'binary_operator_spaces' => ['operators' => ['=>' => 'align']],
])
->setIndent("\t")
->setFinder($finder)
;

View file

@ -1,15 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => false],
])
->setIndent("\t")
->setFinder($finder)
;

View file

@ -14,7 +14,7 @@
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.0",
"friendsofphp/php-cs-fixer": "^2",
"friendsofphp/php-cs-fixer": "^v3.95.13",
"phpstan/phpstan": "^2.2",
"psalm/phar": "^6.16.1",
"phpunit/phpunit": "^11"

View file

@ -13,8 +13,8 @@
pkgs = import nixpkgs {
inherit system;
};
phpPackages = pkgs.phpPackages;
phpPackage = pkgs.php.buildEnv {
phpPackages = pkgs.php82Packages;
phpPackage = pkgs.php82.buildEnv {
extensions = {
enabled,
all,

View file

@ -7,6 +7,7 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
ensureOverrideAttribute="false"
findUnusedCode="false"
phpVersion="8.2"
>
<projectFiles>
<directory name="src" />