forked from sebastianbergmann/phpcpd
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.dist.php
42 lines (34 loc) · 1.32 KB
/
.php-cs-fixer.dist.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
36
37
38
39
40
41
42
<?php declare(strict_types=1);
$header = <<<'EOF'
This file is part of PHP Copy/Paste Detector (PHPCPD).
(c) Sebastian Bergmann <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->files()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests/unit');
$fileHeaderComment = <<<'EOF'
This file is part of PHP Copy/Paste Detector (PHPCPD).
(c) Sebastian Bergmann <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$config = new PhpCsFixer\Config;
$config->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'native_constant_invocation' => ['strict' => false],
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'header_comment' => ['header' => $fileHeaderComment],
'modernize_strpos' => true,
'get_class_to_class_keyword' => true,
]);
return $config;