Skip to content

Commit 1fa886d

Browse files
committed
Require parentheses for new() calls (even for anon. classes)
1 parent 5f52814 commit 1fa886d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.php-cs-fixer-rules.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
return [
1111
// 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
1212
'@PER-CS2.0' => true, // https://www.php-fig.org/per/coding-style/}
13-
'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
13+
'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
1414
// overrides for PER-CS2.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)

0 commit comments

Comments
 (0)