-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
45 lines (43 loc) · 1.23 KB
/
.php-cs-fixer.dist.php
File metadata and controls
45 lines (43 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'vendor',
'templates/templates_c',
'node_modules',
'cache',
'logs',
'tmp',
'build', // Exclude build directory with jsmin
])
->notPath([
'pdf/fpdf.php', // Third-party FPDF library
'cypress-session.php', // Test file that might have specific formatting
])
->notName('*.tpl')
->name('*.php');
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PhpCsFixer' => true,
// Override specific rules that are too strict for this legacy codebase
'operator_linebreak' => [
'only_booleans' => true,
'position' => 'beginning'
],
'string_implicit_backslashes' => false, // Disable for legacy FPDF compatibility
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
]
],
])
->setFinder($finder);