Skip to content

Commit 634fb44

Browse files
committed
Update coding style rules
1 parent dc0e632 commit 634fb44

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,20 @@
1818
'binary_operator_spaces' => true,
1919
'blank_line_after_namespace' => true,
2020
'blank_line_after_opening_tag' => true,
21+
'blank_lines_before_namespace' => true,
2122
'blank_line_before_statement' => [
2223
'statements' => [
2324
'break', 'case', 'continue', 'declare', 'default', 'do', 'for',
2425
'if', 'foreach', 'return', 'switch', 'try', 'while',
2526
],
2627
],
27-
'braces' => [
28-
'allow_single_line_closure' => false,
29-
'position_after_control_structures' => 'same',
30-
'position_after_functions_and_oop_constructs' => 'next',
31-
],
3228
'cast_spaces' => ['space' => 'single'],
3329
'class_attributes_separation' => true,
3430
'combine_consecutive_issets' => true,
3531
'combine_consecutive_unsets' => true,
3632
'compact_nullable_typehint' => true,
3733
'concat_space' => ['spacing' => 'one'],
3834
'fully_qualified_strict_types' => true,
39-
'function_typehint_space' => true,
4035
'increment_style' => ['style' => 'pre'],
4136
'linebreak_after_opening_tag' => true,
4237
'list_syntax' => ['syntax' => 'short'],
@@ -65,8 +60,7 @@
6560
'no_spaces_around_offset' => true,
6661
'no_superfluous_phpdoc_tags' => false,
6762
'no_superfluous_elseif' => true,
68-
'no_trailing_comma_in_list_call' => true,
69-
'no_trailing_comma_in_singleline_array' => true,
63+
'no_trailing_comma_in_singleline' => true,
7064
'no_unneeded_control_parentheses' => true,
7165
'no_unneeded_curly_braces' => true,
7266
'no_unset_cast' => true,
@@ -114,12 +108,12 @@
114108
'semicolon_after_instruction' => true,
115109
'short_scalar_cast' => true,
116110
'simplified_null_return' => true,
117-
'single_blank_line_before_namespace' => true,
118111
'single_quote' => true,
119112
'single_line_comment_style' => true,
120113
'ternary_operator_spaces' => true,
121114
'ternary_to_null_coalescing' => true,
122115
'trim_array_spaces' => true,
116+
'type_declaration_spaces' => true,
123117
'unary_operator_spaces' => true,
124118
'whitespace_after_comma_in_array' => true,
125119
])->setFinder($finder);

build-ext

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ EOT
2222
chdir(__DIR__);
2323

2424
echo 'Reading config.m4 file... ';
25+
2526
$configM4Contents = file_get_contents(CONFIG_M4_PATH);
27+
2628
if (!$configM4Contents) {
2729
fwrite(STDERR, "Failed to read the config.m4 file!\n");
2830

2931
exit(1);
3032
}
33+
3134
echo "done.\n";
3235

3336
echo 'Applying libexec patch... ';
37+
3438
if (strpos($configM4Contents, EXECINFO_MATCH) === false) {
3539
fwrite(STDERR, "patch entrypoint not found!\n");
3640

@@ -39,12 +43,16 @@ if (strpos($configM4Contents, EXECINFO_MATCH) === false) {
3943
echo "already applied.\n";
4044
} else {
4145
$configM4Contents = str_replace(EXECINFO_MATCH, EXECINFO_MATCH . EXECINFO_PATCH, $configM4Contents);
46+
4247
echo "done.\n";
48+
4349
echo 'Saving config.m4 file... ';
50+
4451
if (!file_put_contents(CONFIG_M4_PATH, $configM4Contents)) {
4552
fwrite(STDERR, "Failed to write the config.m4 file\n");
4653

4754
exit(1);
4855
}
56+
4957
echo "done.\n";
5058
}

0 commit comments

Comments
 (0)