php-cs-fixer : keep brace on the same line of function declaration
问题 Php cs fixer is doing : function foobar() { .... } and I want: function foobar() { .... } I can't see what is the config to keep braces on the same line in my config .php_cs file, nor on https://github.com/FriendsOfPHP/PHP-CS-Fixer. I'm using php-cs-fixerV2. My config file: https://pastebin.com/v03v9Lb5 回答1: You have PSR-2 enabled, which requires the braces on the next line. From the documentation it looks like you can set braces.position_after_functions_and_oop_constructs to same (default