Skip to content

Commit 2779f13

Browse files
committed
Update PHP-CS-Fixer rules to use PER-CS 3.0 ruleset
1 parent f7f1514 commit 2779f13

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.php-cs-fixer-rules.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* $config->setRules($rules);
99
*/
1010
return [
11-
// Basic PER Coding Style 2.0 ruleset plus our overrides for it, see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/ruleSets/PER-CS2.0.rst
12-
'@PER-CS2.0' => true, // https://www.php-fig.org/per/coding-style/}
11+
// Basic PER Coding Style 3.0 ruleset plus our overrides for it, see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/ruleSets/PER-CS3x0.rst
12+
'@PER-CS3x0' => true, // https://www.php-fig.org/per/coding-style/
1313
'new_with_parentheses' => ['anonymous_class' => true], // It will be changed in PHP-CS-Fixer v4.0 (but we want to enforce it), see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8148
14-
// overrides for PER-CS2.0
14+
// overrides for PER-CS2.0/PER-CS3.0
1515
'concat_space' => ['spacing' => 'none'], // make strings shorter "'hello' . $name . '!'" => "'hello'.$name.'!'"
1616
'blank_line_after_opening_tag' => false, // it makes "<?php declare(strict_types=1);" multiline (and more verbose)
1717

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"squizlabs/php_codesniffer": "^4.0"
1111
},
1212
"require-dev": {
13-
"friendsofphp/php-cs-fixer": "^3.87",
13+
"friendsofphp/php-cs-fixer": "^3.88",
1414
"phpunit/phpunit": "^12.3",
1515
"vimeo/psalm": "^6.13"
1616
},

0 commit comments

Comments
 (0)