Skip to content

Commit 89ed24c

Browse files
authored
Merge pull request #5 from violet-php/fix-ci-run
Fix linting rules in ci
2 parents 31661f6 + 5bbad87 commit 89ed24c

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build/
22
vendor/
3+
.php-cs-fixer.cache
34
.phpunit.result.cache
45
composer.lock

.php_cs renamed to .php-cs-fixer.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@
44
->in(__DIR__ . '/src')
55
->in(__DIR__ . '/tests');
66

7-
return \PhpCsFixer\Config::create()
7+
return (new PhpCsFixer\Config())
88
->setRiskyAllowed(true)
99
->setRules([
10-
'@PSR2' => true,
10+
'@PSR12' => true,
1111

1212
'array_syntax' => [
1313
'syntax' => 'short'
1414
],
15-
'binary_operator_spaces' => [
16-
'align_double_arrow' => null,
17-
'align_equals' => false,
18-
],
15+
'binary_operator_spaces' => true,
1916
'blank_line_after_opening_tag' => true,
2017
'cast_spaces' => true,
18+
'class_attributes_separation' => ['elements' => ['method' => 'one']],
2119
'combine_consecutive_unsets' => true,
2220
'concat_space' => [
2321
'spacing' => 'one'
@@ -27,13 +25,12 @@
2725
'ereg_to_preg' => true,
2826
'function_to_constant' => true,
2927
'function_typehint_space' => true,
30-
'hash_to_slash_comment' => true,
3128
'heredoc_to_nowdoc' => true,
3229
'include' => true,
3330
'is_null' => true,
3431
'lowercase_cast' => true,
3532
'magic_constant_casing' => true,
36-
'method_separation' => true,
33+
'multiline_whitespace_before_semicolons' => true,
3734
'modernize_types_casting' => true,
3835
'native_function_casing' => true,
3936
'new_with_braces' => true,
@@ -43,12 +40,11 @@
4340
'no_empty_comment' => true,
4441
'no_empty_phpdoc' => true,
4542
'no_empty_statement' => true,
46-
'no_extra_consecutive_blank_lines' => true,
43+
'no_extra_blank_lines' => true,
4744
'no_leading_import_slash' => true,
4845
'no_leading_namespace_whitespace' => true,
4946
'no_mixed_echo_print' => true,
5047
'no_multiline_whitespace_around_double_arrow' => true,
51-
'no_multiline_whitespace_before_semicolons' => true,
5248
'no_php4_constructor' => true,
5349
'no_short_bool_cast' => true,
5450
'no_singleline_whitespace_before_semicolons' => true,
@@ -73,7 +69,7 @@
7369
'phpdoc_add_missing_param_annotation' => true,
7470
'phpdoc_annotation_without_dot' => true,
7571
'phpdoc_indent' => true,
76-
'phpdoc_inline_tag' => true,
72+
'phpdoc_inline_tag_normalizer' => true,
7773
'phpdoc_no_access' => true,
7874
'phpdoc_no_alias_tag' => true,
7975
'phpdoc_no_package' => true,
@@ -84,19 +80,21 @@
8480
'phpdoc_types' => true,
8581
'phpdoc_var_without_name' => true,
8682
'pow_to_exponentiation' => true,
87-
'psr4' => true,
83+
'psr_autoloading' => true,
8884
'return_type_declaration' => true,
8985
'self_accessor' => true,
9086
'short_scalar_cast' => true,
9187
'single_blank_line_before_namespace' => true,
88+
'single_line_comment_style' => true,
9289
'single_quote' => true,
9390
'space_after_semicolon' => true,
9491
'standardize_not_equals' => true,
9592
'strict_comparison' => true,
9693
'strict_param' => true,
9794
'ternary_operator_spaces' => true,
98-
'trailing_comma_in_multiline_array' => true,
95+
'trailing_comma_in_multiline' => true,
9996
'trim_array_spaces' => true,
97+
'visibility_required' => ['elements' => ['property', 'method']],
10098
'whitespace_after_comma_in_array' => true,
10199
])
102100
->setFinder($finder);

0 commit comments

Comments
 (0)