|
18 | 18 | 'nullable_type_declaration_for_default_null_value' => true, |
19 | 19 | // Operators - when multiline - must always be at the beginning or at the end of the line. |
20 | 20 | 'operator_linebreak' => true, |
| 21 | + // Sort union types and intersection types using configured order. |
| 22 | + 'ordered_types' => true, |
21 | 23 | // Calls to PHPUnit\Framework\TestCase static methods must all be of the same type, either $this->, self:: or static:: |
22 | 24 | 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], |
23 | 25 | // PHPDoc annotation descriptions should not be a sentence. |
|
44 | 46 | 'phpdoc_var_annotation_correct_order' => true, |
45 | 47 | // @var and @type annotations of classy properties should not contain the name. |
46 | 48 | 'phpdoc_var_without_name' => true, |
| 49 | + // There MUST NOT be more than one property or constant declared per statement. |
| 50 | + 'single_class_element_per_statement' => true, |
47 | 51 | // Convert double quotes to single quotes for simple strings. |
48 | 52 | 'single_quote' => true, |
49 | 53 | // Arguments lists, array destructuring lists, arrays that are multi-line, match-lines and parameters lists must have a trailing comma. |
50 | 54 | // removed "match" and "parameters" for PHP7 |
51 | 55 | // see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8308 |
52 | 56 | 'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'array_destructuring', 'arrays']], |
| 57 | + // A single space or none should be around union type and intersection type operators. |
| 58 | + 'types_spaces' => true, |
53 | 59 | ]) |
54 | 60 | ->setFinder( |
55 | 61 | PhpCsFixer\Finder::create() |
|
0 commit comments