Skip to content

Commit 5384ac6

Browse files
committedDec 9, 2022
Apply linting fixes
1 parent ed0cae4 commit 5384ac6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+359
-354
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ static-single
99
/build
1010
.phpunit.result.cache
1111
.php_cs.cache
12+
.php-cs-fixer.cache
1213
coverage.clover
1314
test-report.xml
1415

‎.php-cs-fixer.php

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->exclude('templates')
6+
->exclude('node_modules')
7+
->in(__DIR__);
8+
9+
$config = new PhpCsFixer\Config();
10+
$config->setRules([
11+
// Presets
12+
'@PSR2' => true,
13+
'@PHP80Migration' => true,
14+
'@PhpCsFixer' => true,
15+
16+
// Disable rules
17+
'explicit_string_variable' => false,
18+
'yoda_style' => false,
19+
'php_unit_internal_class' => false,
20+
'php_unit_test_class_requires_covers' => false,
21+
'phpdoc_align' => false,
22+
'multiline_whitespace_before_semicolons' => false,
23+
24+
// Namespace configuration
25+
'no_blank_lines_before_namespace' => true,
26+
'single_blank_line_before_namespace' => false,
27+
'blank_line_after_opening_tag' => false,
28+
'linebreak_after_opening_tag' => false,
29+
30+
// Options tweaks
31+
'echo_tag_syntax' => [
32+
'format' => 'short'
33+
],
34+
'concat_space' => ['spacing' => 'one'],
35+
'ordered_class_elements' => [
36+
'order' => [
37+
'use_trait',
38+
'constant_public',
39+
'constant_protected',
40+
'constant_private',
41+
'property_public',
42+
'property_protected',
43+
'property_private',
44+
'construct',
45+
'method'
46+
]
47+
]
48+
]);
49+
$config->setFinder($finder);
50+
51+
return $config;

0 commit comments

Comments
 (0)
Please sign in to comment.