Skip to content

Commit dc7a921

Browse files
authored
php71-80-support (#15)
* php71-80-support * SimpleNormalizable
1 parent 5093d30 commit dc7a921

22 files changed

Lines changed: 700 additions & 230 deletions

.editorconfig

Lines changed: 336 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,336 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
indent_size = 4
5+
indent_style = space
6+
insert_final_newline = true
7+
max_line_length = 120
8+
tab_width = 4
9+
ij_continuation_indent_size = 8
10+
ij_formatter_off_tag = @formatter:off
11+
ij_formatter_on_tag = @formatter:on
12+
ij_formatter_tags_enabled = false
13+
ij_smart_tabs = false
14+
ij_visual_guides = none
15+
ij_wrap_on_typing = false
16+
17+
[*.feature]
18+
indent_size = 2
19+
ij_gherkin_keep_indents_on_empty_lines = false
20+
21+
[.editorconfig]
22+
ij_editorconfig_align_group_field_declarations = false
23+
ij_editorconfig_space_after_colon = false
24+
ij_editorconfig_space_after_comma = true
25+
ij_editorconfig_space_before_colon = false
26+
ij_editorconfig_space_before_comma = false
27+
ij_editorconfig_spaces_around_assignment_operators = true
28+
29+
[{*.ant, *.fxml, *.jhm, *.jnlp, *.jrxml, *.rng, *.tld, *.wsdl, *.xml, *.xsd, *.xsl, *.xslt, *.xul, phpunit.xml.dist}]
30+
ij_xml_align_attributes = true
31+
ij_xml_align_text = false
32+
ij_xml_attribute_wrap = normal
33+
ij_xml_block_comment_at_first_column = true
34+
ij_xml_keep_blank_lines = 2
35+
ij_xml_keep_indents_on_empty_lines = false
36+
ij_xml_keep_line_breaks = true
37+
ij_xml_keep_line_breaks_in_text = true
38+
ij_xml_keep_whitespaces = false
39+
ij_xml_keep_whitespaces_around_cdata = preserve
40+
ij_xml_keep_whitespaces_inside_cdata = false
41+
ij_xml_line_comment_at_first_column = true
42+
ij_xml_space_after_tag_name = false
43+
ij_xml_space_around_equals_in_attribute = false
44+
ij_xml_space_inside_empty_tag = false
45+
ij_xml_text_wrap = normal
46+
47+
[{*.bash, *.sh, *.zsh}]
48+
indent_size = 2
49+
tab_width = 2
50+
ij_shell_binary_ops_start_line = false
51+
ij_shell_keep_column_alignment_padding = false
52+
ij_shell_minify_program = false
53+
ij_shell_redirect_followed_by_space = false
54+
ij_shell_switch_cases_indented = false
55+
ij_shell_use_unix_line_separator = true
56+
57+
[{*.ctp, *.hphp, *.inc, *.module, *.php, *.php4, *.php5, *.phtml}]
58+
ij_continuation_indent_size = 4
59+
ij_php_align_assignments = false
60+
ij_php_align_class_constants = true
61+
ij_php_align_group_field_declarations = false
62+
ij_php_align_inline_comments = false
63+
ij_php_align_key_value_pairs = false
64+
ij_php_align_multiline_array_initializer_expression = false
65+
ij_php_align_multiline_binary_operation = false
66+
ij_php_align_multiline_chained_methods = false
67+
ij_php_align_multiline_extends_list = true
68+
ij_php_align_multiline_for = true
69+
ij_php_align_multiline_parameters = true
70+
ij_php_align_multiline_parameters_in_calls = false
71+
ij_php_align_multiline_ternary_operation = false
72+
ij_php_align_phpdoc_comments = false
73+
ij_php_align_phpdoc_param_names = false
74+
ij_php_anonymous_brace_style = end_of_line
75+
ij_php_api_weight = 28
76+
ij_php_array_initializer_new_line_after_left_brace = false
77+
ij_php_array_initializer_right_brace_on_new_line = false
78+
ij_php_array_initializer_wrap = off
79+
ij_php_assignment_wrap = off
80+
ij_php_attributes_wrap = off
81+
ij_php_author_weight = 28
82+
ij_php_binary_operation_sign_on_next_line = false
83+
ij_php_binary_operation_wrap = off
84+
ij_php_blank_lines_after_class_header = 0
85+
ij_php_blank_lines_after_function = 1
86+
ij_php_blank_lines_after_imports = 1
87+
ij_php_blank_lines_after_opening_tag = 0
88+
ij_php_blank_lines_after_package = 1
89+
ij_php_blank_lines_around_class = 1
90+
ij_php_blank_lines_around_constants = 0
91+
ij_php_blank_lines_around_field = 0
92+
ij_php_blank_lines_around_method = 1
93+
ij_php_blank_lines_before_class_end = 0
94+
ij_php_blank_lines_before_imports = 1
95+
ij_php_blank_lines_before_method_body = 0
96+
ij_php_blank_lines_before_package = 1
97+
ij_php_blank_lines_before_return_statement = 1
98+
ij_php_blank_lines_between_imports = 0
99+
ij_php_block_brace_style = end_of_line
100+
ij_php_call_parameters_new_line_after_left_paren = false
101+
ij_php_call_parameters_right_paren_on_new_line = false
102+
ij_php_call_parameters_wrap = off
103+
ij_php_catch_on_new_line = false
104+
ij_php_category_weight = 28
105+
ij_php_class_brace_style = next_line
106+
ij_php_comma_after_last_array_element = true
107+
ij_php_concat_spaces = true
108+
ij_php_copyright_weight = 28
109+
ij_php_deprecated_weight = 28
110+
ij_php_do_while_brace_force = never
111+
ij_php_else_if_style = as_is
112+
ij_php_else_on_new_line = false
113+
ij_php_example_weight = 28
114+
ij_php_extends_keyword_wrap = off
115+
ij_php_extends_list_wrap = off
116+
ij_php_fields_default_visibility = private
117+
ij_php_filesource_weight = 28
118+
ij_php_finally_on_new_line = false
119+
ij_php_for_brace_force = never
120+
ij_php_for_statement_new_line_after_left_paren = false
121+
ij_php_for_statement_right_paren_on_new_line = false
122+
ij_php_for_statement_wrap = off
123+
ij_php_force_short_declaration_array_style = true
124+
ij_php_getters_setters_naming_style = camel_case
125+
ij_php_getters_setters_order_style = getters_first
126+
ij_php_global_weight = 28
127+
ij_php_group_use_wrap = on_every_item
128+
ij_php_if_brace_force = never
129+
ij_php_if_lparen_on_next_line = false
130+
ij_php_if_rparen_on_next_line = false
131+
ij_php_ignore_weight = 28
132+
ij_php_import_sorting = alphabetic
133+
ij_php_indent_break_from_case = true
134+
ij_php_indent_case_from_switch = true
135+
ij_php_indent_code_in_php_tags = false
136+
ij_php_internal_weight = 28
137+
ij_php_keep_blank_lines_after_lbrace = 0
138+
ij_php_keep_blank_lines_before_right_brace = 0
139+
ij_php_keep_blank_lines_in_code = 1
140+
ij_php_keep_blank_lines_in_declarations = 0
141+
ij_php_keep_control_statement_in_one_line = true
142+
ij_php_keep_first_column_comment = true
143+
ij_php_keep_indents_on_empty_lines = false
144+
ij_php_keep_line_breaks = true
145+
ij_php_keep_rparen_and_lbrace_on_one_line = false
146+
ij_php_keep_simple_classes_in_one_line = false
147+
ij_php_keep_simple_methods_in_one_line = false
148+
ij_php_lambda_brace_style = end_of_line
149+
ij_php_license_weight = 28
150+
ij_php_line_comment_add_space = false
151+
ij_php_line_comment_at_first_column = true
152+
ij_php_link_weight = 28
153+
ij_php_lower_case_boolean_const = true
154+
ij_php_lower_case_keywords = true
155+
ij_php_lower_case_null_const = true
156+
ij_php_method_brace_style = next_line
157+
ij_php_method_call_chain_wrap = off
158+
ij_php_method_parameters_new_line_after_left_paren = false
159+
ij_php_method_parameters_right_paren_on_new_line = false
160+
ij_php_method_parameters_wrap = off
161+
ij_php_method_weight = 28
162+
ij_php_modifier_list_wrap = false
163+
ij_php_multiline_chained_calls_semicolon_on_new_line = false
164+
ij_php_namespace_brace_style = 1
165+
ij_php_new_line_after_php_opening_tag = false
166+
ij_php_null_type_position = in_the_end
167+
ij_php_package_weight = 28
168+
ij_php_param_weight = 0
169+
ij_php_parameters_attributes_wrap = off
170+
ij_php_parentheses_expression_new_line_after_left_paren = false
171+
ij_php_parentheses_expression_right_paren_on_new_line = false
172+
ij_php_phpdoc_blank_line_before_tags = false
173+
ij_php_phpdoc_blank_lines_around_parameters = true
174+
ij_php_phpdoc_keep_blank_lines = true
175+
ij_php_phpdoc_param_spaces_between_name_and_description = 1
176+
ij_php_phpdoc_param_spaces_between_tag_and_type = 1
177+
ij_php_phpdoc_param_spaces_between_type_and_name = 1
178+
ij_php_phpdoc_use_fqcn = false
179+
ij_php_phpdoc_wrap_long_lines = true
180+
ij_php_place_assignment_sign_on_next_line = false
181+
ij_php_place_parens_for_constructor = 0
182+
ij_php_property_read_weight = 28
183+
ij_php_property_weight = 28
184+
ij_php_property_write_weight = 28
185+
ij_php_return_type_on_new_line = false
186+
ij_php_return_weight = 1
187+
ij_php_see_weight = 28
188+
ij_php_since_weight = 28
189+
ij_php_sort_phpdoc_elements = true
190+
ij_php_space_after_colon = true
191+
ij_php_space_after_colon_in_named_argument = true
192+
ij_php_space_after_colon_in_return_type = true
193+
ij_php_space_after_comma = true
194+
ij_php_space_after_for_semicolon = true
195+
ij_php_space_after_quest = true
196+
ij_php_space_after_type_cast = true
197+
ij_php_space_after_unary_not = false
198+
ij_php_space_before_array_initializer_left_brace = false
199+
ij_php_space_before_catch_keyword = true
200+
ij_php_space_before_catch_left_brace = true
201+
ij_php_space_before_catch_parentheses = true
202+
ij_php_space_before_class_left_brace = true
203+
ij_php_space_before_closure_left_parenthesis = true
204+
ij_php_space_before_colon = true
205+
ij_php_space_before_colon_in_named_argument = false
206+
ij_php_space_before_colon_in_return_type = false
207+
ij_php_space_before_comma = false
208+
ij_php_space_before_do_left_brace = true
209+
ij_php_space_before_else_keyword = true
210+
ij_php_space_before_else_left_brace = true
211+
ij_php_space_before_finally_keyword = true
212+
ij_php_space_before_finally_left_brace = true
213+
ij_php_space_before_for_left_brace = true
214+
ij_php_space_before_for_parentheses = true
215+
ij_php_space_before_for_semicolon = false
216+
ij_php_space_before_if_left_brace = true
217+
ij_php_space_before_if_parentheses = true
218+
ij_php_space_before_method_call_parentheses = false
219+
ij_php_space_before_method_left_brace = true
220+
ij_php_space_before_method_parentheses = false
221+
ij_php_space_before_quest = true
222+
ij_php_space_before_short_closure_left_parenthesis = true
223+
ij_php_space_before_switch_left_brace = true
224+
ij_php_space_before_switch_parentheses = true
225+
ij_php_space_before_try_left_brace = true
226+
ij_php_space_before_unary_not = false
227+
ij_php_space_before_while_keyword = true
228+
ij_php_space_before_while_left_brace = true
229+
ij_php_space_before_while_parentheses = true
230+
ij_php_space_between_ternary_quest_and_colon = false
231+
ij_php_spaces_around_additive_operators = true
232+
ij_php_spaces_around_arrow = false
233+
ij_php_spaces_around_assignment_in_declare = false
234+
ij_php_spaces_around_assignment_operators = true
235+
ij_php_spaces_around_bitwise_operators = true
236+
ij_php_spaces_around_equality_operators = true
237+
ij_php_spaces_around_logical_operators = true
238+
ij_php_spaces_around_multiplicative_operators = true
239+
ij_php_spaces_around_null_coalesce_operator = true
240+
ij_php_spaces_around_relational_operators = true
241+
ij_php_spaces_around_shift_operators = true
242+
ij_php_spaces_around_unary_operator = false
243+
ij_php_spaces_around_var_within_brackets = false
244+
ij_php_spaces_within_array_initializer_braces = false
245+
ij_php_spaces_within_brackets = false
246+
ij_php_spaces_within_catch_parentheses = false
247+
ij_php_spaces_within_for_parentheses = false
248+
ij_php_spaces_within_if_parentheses = false
249+
ij_php_spaces_within_method_call_parentheses = false
250+
ij_php_spaces_within_method_parentheses = false
251+
ij_php_spaces_within_parentheses = false
252+
ij_php_spaces_within_short_echo_tags = true
253+
ij_php_spaces_within_switch_parentheses = false
254+
ij_php_spaces_within_while_parentheses = false
255+
ij_php_special_else_if_treatment = false
256+
ij_php_subpackage_weight = 28
257+
ij_php_ternary_operation_signs_on_next_line = false
258+
ij_php_ternary_operation_wrap = off
259+
ij_php_throws_weight = 2
260+
ij_php_todo_weight = 28
261+
ij_php_unknown_tag_weight = 28
262+
ij_php_upper_case_boolean_const = false
263+
ij_php_upper_case_null_const = false
264+
ij_php_uses_weight = 28
265+
ij_php_var_weight = 28
266+
ij_php_variable_naming_style = camel_case
267+
ij_php_version_weight = 28
268+
ij_php_while_brace_force = never
269+
ij_php_while_on_new_line = false
270+
271+
[{*.har, *.jsb2, *.jsb3, *.json, .babelrc, .eslintrc, .stylelintrc, bowerrc, composer.lock, jest.config}]
272+
indent_size = 2
273+
ij_json_keep_blank_lines_in_code = 0
274+
ij_json_keep_indents_on_empty_lines = false
275+
ij_json_keep_line_breaks = true
276+
ij_json_space_after_colon = true
277+
ij_json_space_after_comma = true
278+
ij_json_space_before_colon = true
279+
ij_json_space_before_comma = false
280+
ij_json_spaces_within_braces = false
281+
ij_json_spaces_within_brackets = false
282+
ij_json_wrap_long_lines = false
283+
284+
[{*.htm, *.html, *.ng, *.sht, *.shtm, *.shtml}]
285+
ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3
286+
ij_html_align_attributes = true
287+
ij_html_align_text = false
288+
ij_html_attribute_wrap = normal
289+
ij_html_block_comment_at_first_column = true
290+
ij_html_do_not_align_children_of_min_lines = 0
291+
ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p
292+
ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot
293+
ij_html_enforce_quotes = false
294+
ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
295+
ij_html_keep_blank_lines = 2
296+
ij_html_keep_indents_on_empty_lines = false
297+
ij_html_keep_line_breaks = true
298+
ij_html_keep_line_breaks_in_text = true
299+
ij_html_keep_whitespaces = false
300+
ij_html_keep_whitespaces_inside = span, pre, textarea
301+
ij_html_line_comment_at_first_column = true
302+
ij_html_new_line_after_last_attribute = never
303+
ij_html_new_line_before_first_attribute = never
304+
ij_html_quote_style = double
305+
ij_html_remove_new_line_before_tags = br
306+
ij_html_space_after_tag_name = false
307+
ij_html_space_around_equality_in_attribute = false
308+
ij_html_space_inside_empty_tag = false
309+
ij_html_text_wrap = normal
310+
ij_html_uniform_ident = false
311+
312+
[{*.markdown, *.md}]
313+
ij_markdown_force_one_space_after_blockquote_symbol = true
314+
ij_markdown_force_one_space_after_header_symbol = true
315+
ij_markdown_force_one_space_after_list_bullet = true
316+
ij_markdown_force_one_space_between_words = true
317+
ij_markdown_keep_indents_on_empty_lines = false
318+
ij_markdown_max_lines_around_block_elements = 1
319+
ij_markdown_max_lines_around_header = 1
320+
ij_markdown_max_lines_between_paragraphs = 1
321+
ij_markdown_min_lines_around_block_elements = 1
322+
ij_markdown_min_lines_around_header = 1
323+
ij_markdown_min_lines_between_paragraphs = 1
324+
325+
[{*.yaml, *.yml}]
326+
indent_size = 2
327+
ij_yaml_align_values_properties = do_not_align
328+
ij_yaml_autoinsert_sequence_marker = true
329+
ij_yaml_block_mapping_on_new_line = false
330+
ij_yaml_indent_sequence_value = true
331+
ij_yaml_keep_indents_on_empty_lines = false
332+
ij_yaml_keep_line_breaks = true
333+
ij_yaml_sequence_on_new_line = false
334+
ij_yaml_space_before_colon = false
335+
ij_yaml_spaces_within_braces = true
336+
ij_yaml_spaces_within_brackets = true

.github/workflows/main.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,46 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
84
push:
95
branches: [ main ]
106
pull_request:
117
branches: [ main ]
128

13-
# Allows you to run this workflow manually from the Actions tab
149
workflow_dispatch:
1510

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1711
jobs:
18-
# This workflow contains a single job called "build"
1912
build:
20-
# The type of runner that the job will run on
2113
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
14+
strategy:
15+
matrix:
16+
php-versions: [ '7.3', '7.4', '8.0' ]
17+
phpunit-versions: [ 'latest' ]
18+
phpstan-versions: [ 'latest' ]
19+
include:
20+
- php-versions: '7.1'
21+
phpunit-versions: '7.5.20'
22+
phpstan-versions: [ 'latest' ]
23+
- php-versions: '7.2'
24+
phpunit-versions: '8.5.15'
25+
phpstan-versions: [ 'latest' ]
2426
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2627
- uses: actions/checkout@v2
2728

2829
- name: Setup PHP
2930
uses: shivammathur/setup-php@v2
3031
with:
31-
php-version: '8.0'
32+
php-version: ${{ matrix.php-versions }}
3233
coverage: xdebug
34+
tools: composer:v2, phpunit:${{ matrix.phpunit-versions }}, phpstan:${{ matrix.phpstan-versions }}
3335

3436
- name: Install dependencies
35-
run: composer update --prefer-dist --no-progress
37+
run: composer update --prefer-dist --no-progress --no-dev
3638

3739
- name: phpStan
38-
run: vendor/bin/phpstan analyse
40+
run: phpstan analyse
3941

4042
- name: phpUnit
41-
run: vendor/bin/phpunit
43+
run: phpunit --coverage-clover clover.xml --bootstrap="./tests/bootstrap.php" --whitelist src tests
4244

4345
- name: Codecov
4446
uses: codecov/codecov-action@v1.3.2

0 commit comments

Comments
 (0)