|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +$header = <<<'EOF' |
| 6 | + This file is part of the Numverify API Client for PHP. |
| 7 | +
|
| 8 | + (c) 2024 Eric Sizemore <admin@secondversion.com> |
| 9 | + (c) 2018-2021 Mark Rogoyski |
| 10 | +
|
| 11 | + @license The MIT License |
| 12 | +
|
| 13 | + For the full copyright and license information, please view the LICENSE.md |
| 14 | + file that was distributed with this source code. |
| 15 | + EOF; |
| 16 | + |
3 | 17 | $config = new PhpCsFixer\Config(); |
4 | 18 |
|
5 | 19 | $config |
6 | 20 | ->setRiskyAllowed(true) |
7 | 21 | ->setRules([ |
8 | | - '@PER-CS' => true, |
9 | | - '@PSR12' => true, |
10 | | - '@PHP82Migration' => true, |
11 | | - 'array_syntax' => ['syntax' => 'short'], |
12 | | - 'php_unit_internal_class' => ['types' => ['normal', 'final']], |
13 | | - 'php_unit_namespaced' => true, |
14 | | - 'php_unit_expectation' => true, |
15 | | - 'php_unit_strict' => ['assertions' => ['assertAttributeEquals', 'assertAttributeNotEquals', 'assertEquals', 'assertNotEquals']], |
16 | | - 'align_multiline_comment' => true, |
17 | | - 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], |
18 | | - 'binary_operator_spaces' => [ |
| 22 | + '@PER-CS' => true, |
| 23 | + '@PSR12' => true, |
| 24 | + '@PHP82Migration' => true, |
| 25 | + 'array_syntax' => ['syntax' => 'short'], |
| 26 | + 'php_unit_internal_class' => ['types' => ['normal', 'final']], |
| 27 | + 'php_unit_namespaced' => true, |
| 28 | + 'php_unit_expectation' => true, |
| 29 | + 'php_unit_strict' => ['assertions' => ['assertAttributeEquals', 'assertAttributeNotEquals', 'assertEquals', 'assertNotEquals']], |
| 30 | + 'php_unit_set_up_tear_down_visibility' => true, |
| 31 | + 'phpdoc_align' => true, |
| 32 | + 'phpdoc_indent' => true, |
| 33 | + 'phpdoc_inline_tag_normalizer' => true, |
| 34 | + 'phpdoc_no_access' => true, |
| 35 | + 'phpdoc_no_alias_tag' => true, |
| 36 | + 'phpdoc_no_empty_return' => true, |
| 37 | + 'phpdoc_no_package' => true, |
| 38 | + 'phpdoc_param_order' => true, |
| 39 | + 'phpdoc_return_self_reference' => true, |
| 40 | + 'phpdoc_scalar' => true, |
| 41 | + 'phpdoc_separation' => true, |
| 42 | + 'phpdoc_single_line_var_spacing' => true, |
| 43 | + 'phpdoc_summary' => true, |
| 44 | + 'phpdoc_tag_casing' => true, |
| 45 | + 'phpdoc_tag_type' => true, |
| 46 | + 'phpdoc_to_comment' => false, |
| 47 | + 'phpdoc_trim' => true, |
| 48 | + 'phpdoc_trim_consecutive_blank_line_separation' => true, |
| 49 | + 'phpdoc_var_without_name' => true, |
| 50 | + 'phpdoc_no_useless_inheritdoc' => true, |
| 51 | + 'align_multiline_comment' => true, |
| 52 | + 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], |
| 53 | + 'binary_operator_spaces' => [ |
19 | 54 | 'operators' => [ |
20 | | - '=>' => 'align', |
21 | | - '=' => 'align', |
| 55 | + '*=' => 'align_single_space_minimal', |
| 56 | + '+=' => 'align_single_space_minimal', |
| 57 | + '-=' => 'align_single_space_minimal', |
| 58 | + '/=' => 'align_single_space_minimal', |
| 59 | + '=' => 'align_single_space_minimal', |
| 60 | + '=>' => 'align_single_space_minimal', |
22 | 61 | ], |
23 | 62 | ], |
| 63 | + 'heredoc_to_nowdoc' => true, |
24 | 64 | 'ordered_imports' => false, |
| 65 | + 'declare_equal_normalize' => ['space' => 'none'], |
| 66 | + 'declare_parentheses' => true, |
| 67 | + 'declare_strict_types' => true, |
25 | 68 | 'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true], |
| 69 | + 'header_comment' => ['comment_type' => 'PHPDoc', 'header' => $header, 'separate' => 'top'], |
26 | 70 | ]) |
27 | 71 | ->setLineEnding("\n") |
28 | 72 | ->setFinder( |
29 | 73 | PhpCsFixer\Finder::create() |
30 | 74 | ->in(__DIR__ . '/src') |
31 | 75 | ->in(__DIR__ . '/tests') |
32 | | - ->append([__DIR__ . '/rector.php', __DIR__ . '/.php-cs-fixer.dist.php']) |
33 | 76 | ) |
34 | 77 | ; |
35 | 78 |
|
|
0 commit comments