|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = Symfony\CS\Finder\DefaultFinder::create() |
| 4 | + ->exclude('files') |
| 5 | + ->exclude('vendor') |
| 6 | + ->in(__DIR__); |
| 7 | + |
| 8 | +return Symfony\CS\Config\Config::create() |
| 9 | + ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) |
| 10 | + ->fixers([ |
| 11 | + /** |
| 12 | + * symfony |
| 13 | + */ |
| 14 | + // Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline. |
| 15 | + 'blankline_after_open_tag', |
| 16 | + // Remove duplicated semicolons. |
| 17 | + 'duplicate_semicolon', |
| 18 | + // Removes extra empty lines. |
| 19 | + 'extra_empty_lines', |
| 20 | + // PHP multi-line arrays should have a trailing comma. |
| 21 | + 'multiline_array_trailing_comma', |
| 22 | + // There should be no empty lines after class opening brace. |
| 23 | + 'no_blank_lines_after_class_opening', |
| 24 | + // There should not be blank lines between docblock and the documented element. |
| 25 | + 'no_empty_lines_after_phpdocs', |
| 26 | + // Phpdocs short descriptions should end in either a full stop, exclamation mark, or question mark. |
| 27 | + 'phpdoc_short_description', |
| 28 | + // Phpdocs should start and end with content, excluding the very first and last line of the docblocks. |
| 29 | + 'phpdoc_trim', |
| 30 | + // Removes line breaks between use statements. |
| 31 | + 'remove_lines_between_uses', |
| 32 | + // An empty line feed should precede a return statement. |
| 33 | + 'return', |
| 34 | + // There should be exactly one blank line before a namespace declaration. |
| 35 | + 'single_blank_line_before_namespace', |
| 36 | + // Convert double quotes to single quotes for simple strings. |
| 37 | + 'single_quote', |
| 38 | + // Unused use statements must be removed. |
| 39 | + 'unused_use', |
| 40 | + |
| 41 | + /** |
| 42 | + * contrib |
| 43 | + */ |
| 44 | + // Concatenation should be used with at least one whitespace around. |
| 45 | + 'concat_with_spaces', |
| 46 | + // Ensure there is no code on the same line as the PHP open tag. |
| 47 | + 'newline_after_open_tag', |
| 48 | + // Ordering use statements. |
| 49 | + 'ordered_use', |
| 50 | + ]) |
| 51 | + ->setUsingCache(true) |
| 52 | + ->finder($finder); |
0 commit comments