-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.php-cs-fixer.php
35 lines (31 loc) · 938 Bytes
/
.php-cs-fixer.php
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
<?php
/**
* $ composer global require friendsofphp/php-cs-fixer
*
* $ php-cs-fixer fix
*
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
*
*/
$finder = PhpCsFixer\Finder::create()
->exclude('build')
->exclude('cache')
->exclude('vendor')
->exclude('storage')
// ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__)
->ignoreVCS(true);
$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'@Symfony:risky'=>true,
'array_syntax' => array('syntax' => 'short'),
'declare_strict_types' => true, // @PHP70Migration:risky, @PHP71Migration:risky
'ternary_to_null_coalescing' => true, // @PHP70Migration, @PHP71Migration
'void_return' => true, // @PHP71Migration:risky
'ordered_imports' => true,
])
->setCacheFile(__DIR__.'/.php_cs.cache')
->setFinder($finder)
->setRiskyAllowed(true)
;