Skip to content

Commit

Permalink
Use 'new_with_parentheses' => ['anonymous_class' => false], to comply…
Browse files Browse the repository at this point in the history
… PER-2
  • Loading branch information
alies-dev committed Aug 8, 2024
1 parent 00a7208 commit 5f52814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer-rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
return [
// 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
'@PER-CS2.0' => true, // https://www.php-fig.org/per/coding-style/}
'new_with_parentheses' => ['anonymous_class' => false], // @todo remove after migration to PHP-CS-Fixer v4.0, see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8148
// overrides for PER-CS2.0
'concat_space' => ['spacing' => 'none'], // make strings shorter "'hello' . $name . '!'" => "'hello'.$name.'!'"
'blank_line_after_opening_tag' => false, // it makes "<?php declare(strict_types=1);" multiline (and more verbose)
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"squizlabs/php_codesniffer": "^3.10"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.59",
"phpunit/phpunit": "^10.5",
"friendsofphp/php-cs-fixer": "^3.62",
"phpunit/phpunit": "^10.5 || ^11.3",
"vimeo/psalm": "^5.25"
},
"minimum-stability": "dev",
Expand All @@ -29,7 +29,8 @@
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"sort-packages": true
},
"scripts": {
"cs": "@cs:fix",
Expand Down

0 comments on commit 5f52814

Please sign in to comment.