|
| 1 | +<?php |
| 2 | +$header = <<<'EOF' |
| 3 | +This file is part of PHPUnit. |
| 4 | +
|
| 5 | +(c) Sebastian Bergmann <[email protected]> |
| 6 | +
|
| 7 | +For the full copyright and license information, please view the LICENSE |
| 8 | +file that was distributed with this source code. |
| 9 | +EOF; |
| 10 | + |
| 11 | +return PhpCsFixer\Config::create() |
| 12 | + ->setRiskyAllowed(true) |
| 13 | + ->setRules( |
| 14 | + [ |
| 15 | + 'array_syntax' => ['syntax' => 'short'], |
| 16 | + 'binary_operator_spaces' => [ |
| 17 | + 'align_double_arrow' => true, |
| 18 | + 'align_equals' => true |
| 19 | + ], |
| 20 | + 'blank_line_after_namespace' => true, |
| 21 | + 'blank_line_before_return' => true, |
| 22 | + 'braces' => true, |
| 23 | + 'cast_spaces' => true, |
| 24 | + 'concat_space' => ['spacing' => 'one'], |
| 25 | + 'elseif' => true, |
| 26 | + 'encoding' => true, |
| 27 | + 'full_opening_tag' => true, |
| 28 | + 'function_declaration' => true, |
| 29 | + 'header_comment' => ['header' => $header, 'separate' => 'none'], |
| 30 | + 'indentation_type' => true, |
| 31 | + 'line_ending' => true, |
| 32 | + 'lowercase_constants' => true, |
| 33 | + 'lowercase_keywords' => true, |
| 34 | + 'method_argument_space' => true, |
| 35 | + 'no_alias_functions' => true, |
| 36 | + 'no_blank_lines_after_class_opening' => true, |
| 37 | + 'no_blank_lines_after_phpdoc' => true, |
| 38 | + 'no_closing_tag' => true, |
| 39 | + 'no_empty_phpdoc' => true, |
| 40 | + 'no_empty_statement' => true, |
| 41 | + 'no_extra_consecutive_blank_lines' => true, |
| 42 | + 'no_leading_namespace_whitespace' => true, |
| 43 | + 'no_singleline_whitespace_before_semicolons' => true, |
| 44 | + 'no_spaces_after_function_name' => true, |
| 45 | + 'no_spaces_inside_parenthesis' => true, |
| 46 | + 'no_trailing_comma_in_list_call' => true, |
| 47 | + 'no_trailing_whitespace' => true, |
| 48 | + 'no_unused_imports' => true, |
| 49 | + 'no_whitespace_in_blank_line' => true, |
| 50 | + 'phpdoc_align' => true, |
| 51 | + 'phpdoc_indent' => true, |
| 52 | + 'phpdoc_no_access' => true, |
| 53 | + 'phpdoc_no_empty_return' => true, |
| 54 | + 'phpdoc_no_package' => true, |
| 55 | + 'phpdoc_scalar' => true, |
| 56 | + 'phpdoc_separation' => true, |
| 57 | + 'phpdoc_to_comment' => true, |
| 58 | + 'phpdoc_trim' => true, |
| 59 | + 'phpdoc_types' => true, |
| 60 | + 'phpdoc_var_without_name' => true, |
| 61 | + 'self_accessor' => true, |
| 62 | + 'simplified_null_return' => true, |
| 63 | + 'single_blank_line_at_eof' => true, |
| 64 | + 'single_import_per_statement' => true, |
| 65 | + 'single_line_after_imports' => true, |
| 66 | + 'single_quote' => true, |
| 67 | + 'ternary_operator_spaces' => true, |
| 68 | + 'trim_array_spaces' => true, |
| 69 | + 'visibility_required' => true, |
| 70 | + ] |
| 71 | + ) |
| 72 | + ->setFinder( |
| 73 | + PhpCsFixer\Finder::create() |
| 74 | + ->files() |
| 75 | + ->in(__DIR__ . '/build') |
| 76 | + ->in(__DIR__ . '/src') |
| 77 | + ->in(__DIR__ . '/tests/Framework') |
| 78 | + ->in(__DIR__ . '/tests/Runner') |
| 79 | + ->in(__DIR__ . '/tests/Util') |
| 80 | + ->name('*.php') |
| 81 | + ); |
0 commit comments