forked from GwendolenLynch/msgphp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php_cs.dist
More file actions
30 lines (26 loc) · 767 Bytes
/
.php_cs.dist
File metadata and controls
30 lines (26 loc) · 767 Bytes
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
<?php
use PhpCsFixer\{Config, Finder};
$cacheDir = __DIR__ . '/var/cache';
$rules = [
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit60Migration:risky' => true,
'single_import_per_statement' => false,
'array_syntax' => ['syntax' => 'short'],
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
];
if (!is_dir($cacheDir)) {
mkdir($cacheDir, 0770, true);
}
return Config::create()
->setUsingCache(true)
->setCacheFile($cacheDir . '/php_cs.cache')
->setRules($rules)
->setRiskyAllowed(true)
->setFinder(Finder::create()->in(__DIR__))
;