@@ -21,11 +21,14 @@ public void apply(CodeStyleSettings settings) {
21
21
CommonCodeStyleSettings commonSettings = settings .getCommonSettings (getLanguage ());
22
22
commonSettings .KEEP_BLANK_LINES_IN_CODE = 1 ;
23
23
commonSettings .KEEP_BLANK_LINES_BEFORE_RBRACE = 0 ;
24
+
25
+ // Don't keep line breaks when reformatting
24
26
commonSettings .KEEP_LINE_BREAKS = false ;
27
+
25
28
commonSettings .KEEP_CONTROL_STATEMENT_IN_ONE_LINE = false ;
26
29
27
- commonSettings .CLASS_BRACE_STYLE = 1 ;
28
- commonSettings .METHOD_BRACE_STYLE = 1 ;
30
+ commonSettings .CLASS_BRACE_STYLE = CommonCodeStyleSettings . END_OF_LINE ;
31
+ commonSettings .METHOD_BRACE_STYLE = CommonCodeStyleSettings . END_OF_LINE ;
29
32
30
33
commonSettings .CATCH_ON_NEW_LINE = false ;
31
34
commonSettings .FINALLY_ON_NEW_LINE = false ;
@@ -43,12 +46,13 @@ public void apply(CodeStyleSettings settings) {
43
46
commonSettings .SPACE_WITHIN_SWITCH_PARENTHESES = true ;
44
47
commonSettings .SPACE_WITHIN_ARRAY_INITIALIZER_BRACES = true ;
45
48
commonSettings .SPACE_AFTER_TYPE_CAST = false ;
49
+ // Doesn't seem to exist?
46
50
// commonSettings.SPACES_AROUND_VAR_WITHIN_BRACKETS = false;
47
51
48
- commonSettings .IF_BRACE_FORCE = 3 ;
49
- commonSettings .FOR_BRACE_FORCE = 3 ;
50
- commonSettings .DOWHILE_BRACE_FORCE = 3 ;
51
- commonSettings .WHILE_BRACE_FORCE = 3 ;
52
+ commonSettings .IF_BRACE_FORCE = CommonCodeStyleSettings . FORCE_BRACES_ALWAYS ;
53
+ commonSettings .FOR_BRACE_FORCE = CommonCodeStyleSettings . FORCE_BRACES_ALWAYS ;
54
+ commonSettings .DOWHILE_BRACE_FORCE = CommonCodeStyleSettings . FORCE_BRACES_ALWAYS ;
55
+ commonSettings .WHILE_BRACE_FORCE = CommonCodeStyleSettings . FORCE_BRACES_ALWAYS ;
52
56
53
57
commonSettings .ARRAY_INITIALIZER_WRAP = 2 ;
54
58
commonSettings .ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE = true ;
@@ -81,9 +85,6 @@ public void apply(CodeStyleSettings settings) {
81
85
// Doesn't seem to exist?
82
86
// commonSettings.SOFT_MARGINS = 100;
83
87
84
- // Don't keep line breaks when reformatting
85
- commonSettings .KEEP_LINE_BREAKS = false ;
86
-
87
88
PhpCodeStyleSettings phpSettings = settings .getCustomSettings (PhpCodeStyleSettings .class );
88
89
phpSettings .LOWER_CASE_BOOLEAN_CONST = true ;
89
90
phpSettings .LOWER_CASE_NULL_CONST = true ;
0 commit comments