-
-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
38 lines (35 loc) · 1.08 KB
/
.php-cs-fixer.php
File metadata and controls
38 lines (35 loc) · 1.08 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
<?php
/**
* PHP-CS-Fixer configuration for OpenML.
*
* Enforces PSR-12 coding style across the openml_OS application directory.
* Run checks: composer run cs:check
* Auto-fix: composer run cs:fix
*/
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR12' => true,
'@PHP74Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'single_quote' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'no_trailing_whitespace' => true,
'no_extra_blank_lines' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/openml_OS')
->exclude([
'libraries',
'third_party',
'vendor',
'cache',
'logs',
])
->name('*.php')
)
->setUsingCache(true)
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');