42 | {% for groupName, rules in rulesets %}
43 |
44 |
47 |
52 |
53 | {% endfor %}
54 |
55 | {% endblock %}
56 | {% endembed %}
57 | {% endif %}
58 |
59 | {% embed 'default/_form.html.twig' with { 'title': 'custom_css.add_rule_help'|trans, 'form': form, 'reset': false } %}
60 | {% block form_body %}
61 | {{ form_rest(form) }}
62 | {% endblock %}
63 | {% endembed %}
64 |
65 | {% endblock %}
66 |
--------------------------------------------------------------------------------
/.php-cs-fixer.dist.php:
--------------------------------------------------------------------------------
1 | setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
14 | ->setRiskyAllowed(true)
15 | ->setRules([
16 | 'encoding' => true,
17 | 'full_opening_tag' => true,
18 | 'blank_line_after_namespace' => true,
19 | 'control_structure_braces' => true,
20 | 'control_structure_continuation_position' => ['position' => 'same_line'],
21 | 'declare_parentheses' => true,
22 | 'no_multiple_statements_per_line' => true,
23 | 'statement_indentation' => true,
24 | 'class_definition' => true,
25 | 'elseif' => true,
26 | 'function_declaration' => true,
27 | 'indentation_type' => true,
28 | 'line_ending' => true,
29 | 'constant_case' => ['case' => 'lower'],
30 | 'lowercase_keywords' => true,
31 | 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
32 | 'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
33 | 'no_php4_constructor' => true,
34 | 'ordered_imports' => true,
35 | 'no_break_comment' => true,
36 | 'no_closing_tag' => true,
37 | 'no_spaces_after_function_name' => true,
38 | 'spaces_inside_parentheses' => ['space' => 'none'],
39 | 'no_trailing_whitespace' => true,
40 | 'no_trailing_whitespace_in_comment' => true,
41 | 'single_blank_line_at_eof' => true,
42 | 'single_class_element_per_statement' => ['elements' => ['property']],
43 | 'single_import_per_statement' => true,
44 | 'single_line_after_imports' => true,
45 | 'switch_case_semicolon_to_colon' => true,
46 | 'switch_case_space' => true,
47 | 'array_syntax' => [
48 | 'syntax' => 'short'
49 | ],
50 | 'binary_operator_spaces' => true,
51 | 'blank_line_after_opening_tag' => true,
52 | 'blank_line_before_statement' => [
53 | 'statements' => ['return'],
54 | ],
55 | 'cast_spaces' => true,
56 | 'class_attributes_separation' => ['elements' => ['method' => 'one']],
57 | 'concat_space' => ['spacing' => 'one'],
58 | 'declare_equal_normalize' => true,
59 | 'type_declaration_spaces' => ['elements' => ['function', 'property']],
60 | 'include' => true,
61 | 'lowercase_cast' => true,
62 | 'lowercase_static_reference' => true,
63 | 'magic_constant_casing' => true,
64 | 'native_function_casing' => true,
65 | 'new_with_parentheses' => true,
66 | 'no_blank_lines_after_class_opening' => true,
67 | 'no_blank_lines_after_phpdoc' => true,
68 | 'no_empty_comment' => true,
69 | 'no_empty_phpdoc' => true,
70 | 'no_empty_statement' => true,
71 | 'no_extra_blank_lines' => ['tokens' => [
72 | 'curly_brace_block',
73 | 'extra',
74 | 'parenthesis_brace_block',
75 | 'square_brace_block',
76 | 'throw',
77 | 'use',
78 | ]],
79 | 'no_leading_import_slash' => true,
80 | 'no_leading_namespace_whitespace' => true,
81 | 'no_mixed_echo_print' => ['use' => 'echo'],
82 | 'no_multiline_whitespace_around_double_arrow' => true,
83 | 'no_short_bool_cast' => true,
84 | 'no_singleline_whitespace_before_semicolons' => true,
85 | 'no_spaces_around_offset' => true,
86 | 'no_trailing_comma_in_singleline' => true,
87 | 'no_unneeded_braces' => true,
88 | 'no_unneeded_final_method' => true,
89 | 'no_unused_imports' => true,
90 | 'no_whitespace_before_comma_in_array' => true,
91 | 'no_whitespace_in_blank_line' => true,
92 | 'normalize_index_brace' => true,
93 | 'object_operator_without_whitespace' => true,
94 | 'php_unit_fqcn_annotation' => true,
95 | 'phpdoc_align' => [
96 | 'align' => 'left',
97 | 'tags' => [
98 | 'method',
99 | 'param',
100 | 'property',
101 | 'return',
102 | 'throws',
103 | 'type',
104 | 'var',
105 | ],
106 | ],
107 | 'phpdoc_annotation_without_dot' => true,
108 | 'phpdoc_indent' => true,
109 | 'phpdoc_inline_tag_normalizer' => true,
110 | 'phpdoc_no_access' => true,
111 | 'phpdoc_no_alias_tag' => true,
112 | 'phpdoc_no_empty_return' => false,
113 | 'phpdoc_no_package' => true,
114 | 'phpdoc_no_useless_inheritdoc' => true,
115 | 'phpdoc_return_self_reference' => true,
116 | 'phpdoc_scalar' => true,
117 | 'phpdoc_separation' => false,
118 | 'phpdoc_single_line_var_spacing' => true,
119 | 'phpdoc_summary' => false,
120 | 'phpdoc_to_comment' => true,
121 | 'phpdoc_trim' => true,
122 | 'phpdoc_types' => true,
123 | 'phpdoc_var_without_name' => true,
124 | 'protected_to_private' => true,
125 | 'return_type_declaration' => true,
126 | 'semicolon_after_instruction' => true,
127 | 'short_scalar_cast' => true,
128 | 'blank_lines_before_namespace' => ['min_line_breaks' => 2, 'max_line_breaks' => 2],
129 | 'single_line_comment_style' => [
130 | 'comment_types' => ['hash'],
131 | ],
132 | 'single_quote' => true,
133 | 'space_after_semicolon' => [
134 | 'remove_in_empty_for_expressions' => true,
135 | ],
136 | 'standardize_increment' => true,
137 | 'standardize_not_equals' => true,
138 | 'ternary_operator_spaces' => true,
139 | 'trailing_comma_in_multiline' => false,
140 | 'trim_array_spaces' => true,
141 | 'unary_operator_spaces' => true,
142 | 'whitespace_after_comma_in_array' => true,
143 | 'yoda_style' => false,
144 | 'ternary_to_null_coalescing' => true,
145 | 'visibility_required' => ['elements' => [
146 | 'const',
147 | 'method',
148 | 'property',
149 | ]],
150 | 'native_function_invocation' => [
151 | 'include' => [
152 | '@compiler_optimized'
153 | ],
154 | 'scope' => 'namespaced'
155 | ],
156 | 'native_type_declaration_casing' => true,
157 | 'no_alias_functions' => [
158 | 'sets' => [
159 | '@internal'
160 | ]
161 | ],
162 | ])
163 | ->setFinder(
164 | PhpCsFixer\Finder::create()
165 | ->in([
166 | __DIR__
167 | ])->exclude([
168 | __DIR__ . '/Resources/',
169 | __DIR__ . '/vendor/',
170 | __DIR__ . '/.github/',
171 | ])
172 | )
173 | ->setFormat('checkstyle')
174 | ;
175 |
176 | return $fixer;
177 |
--------------------------------------------------------------------------------