symfony

Форк
0
/
.php-cs-fixer.dist.php 
67 строк · 2.7 Кб
1
<?php
2

3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
if (!file_exists(__DIR__.'/src')) {
13
    exit(0);
14
}
15

16
$fileHeaderComment = <<<'EOF'
17
This file is part of the Symfony package.
18

19
(c) Fabien Potencier <fabien@symfony.com>
20

21
For the full copyright and license information, please view the LICENSE
22
file that was distributed with this source code.
23
EOF;
24

25
return (new PhpCsFixer\Config())
26
    ->setRules([
27
        '@PHP71Migration' => true,
28
        '@PHPUnit75Migration:risky' => true,
29
        '@Symfony' => true,
30
        '@Symfony:risky' => true,
31
        'protected_to_private' => false,
32
        'header_comment' => ['header' => $fileHeaderComment],
33
        'nullable_type_declaration' => true,
34
        'trailing_comma_in_multiline' => ['elements' => ['arrays', 'match', 'parameters']],
35
    ])
36
    ->setRiskyAllowed(true)
37
    ->setFinder(
38
        (new PhpCsFixer\Finder())
39
            ->in(__DIR__.'/src')
40
            ->append([__FILE__])
41
            ->notPath('#/Fixtures/#')
42
            ->exclude([
43
                // explicit trigger_error tests
44
                'Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/',
45
                'Symfony/Component/Emoji/Resources/',
46
                'Symfony/Component/Intl/Resources/data/',
47
            ])
48
            // explicit tests for ommited @param type, against `no_superfluous_phpdoc_tags`
49
            ->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php')
50
            ->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php')
51
            // Support for older PHPunit version
52
            ->notPath('Symfony/Bridge/PhpUnit/SymfonyTestsListener.php')
53
            ->notPath('#Symfony/Bridge/PhpUnit/.*Mock\.php#')
54
            ->notPath('#Symfony/Bridge/PhpUnit/.*Legacy#')
55
            // explicit trigger_error tests
56
            ->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
57
            // stop removing spaces on the end of the line in strings
58
            ->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php')
59
            // auto-generated proxies
60
            ->notPath('Symfony/Component/Cache/Traits/RelayProxy.php')
61
            ->notPath('Symfony/Component/Cache/Traits/Redis5Proxy.php')
62
            ->notPath('Symfony/Component/Cache/Traits/Redis6Proxy.php')
63
            ->notPath('Symfony/Component/Cache/Traits/RedisCluster5Proxy.php')
64
            ->notPath('Symfony/Component/Cache/Traits/RedisCluster6Proxy.php')
65
    )
66
    ->setCacheFile('.php-cs-fixer.cache')
67
;
68

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.