Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #5892 NewWithBracesFixer - option to remove braces (jrmajor)
This PR was merged into the master branch. Discussion ---------- NewWithBracesFixer - option to remove braces ~Although PSR-12 states that “when instantiating a new class, parentheses MUST always be present”, this rule clearly does not apply to anonymous classes, as there are three examples of anonymous classes in PSR-12 and none of them has parentheses.~ This PR adds `named_class` and `anonymous_class` boolean options to `NewWithBracesFixer`. By default, both of them are set to true, which matches current behavior. ~However, I've changed the configuration in PSR-12 to `['anonymous_class' => false]`, as this is the code style used in all examples.~ Commits ------- 877624a NewWithBracesFixer - add no braces support
- Loading branch information
Showing
5 changed files
with
508 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.