Skip to content

Commit 39d9b1a

Browse files
authored
Merge pull request #3 from C0rTeZ13/ensitech-273
ENSITECH-273
2 parents e2ece3b + 7b04aa3 commit 39d9b1a

28 files changed

+650
-450
lines changed

.gitattributes

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
# Path-based git attributes
2-
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3-
41
* text=auto eol=lf
52

6-
# Ignore all test and documentation with "export-ignore".
7-
/.editorconfig export-ignore
8-
/.gitattributes export-ignore
9-
/.gitignore export-ignore
10-
/.scrutinizer.yml export-ignore
11-
/.travis.yml export-ignore
12-
/PULL_REQUEST_TEMPLATE.md export-ignore
13-
/ISSUE_TEMPLATE.md export-ignore
14-
/phpcs.xml.dist export-ignore
15-
/phpunit.xml.dist export-ignore
16-
/tests export-ignore
17-
/docs export-ignore
3+
/.github export-ignore
4+
/tests export-ignore
5+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.php-cs-fixer.cache export-ignore
9+
/.php-cs-fixer.dist.php export-ignore
10+
/.phpunit.result.cache export-ignore
11+
/composer.lock export-ignore
12+
/phpstan.neon.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/rector.php export-ignore

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,24 @@
22

33
Contributions are **welcome** and will be fully **credited**.
44

5-
We accept contributions via Pull Requests on [Github](https://github.com/osteel/openapi-httpfoundation-testing).
6-
5+
We accept contributions via Pull Requests on Github.
76

87
## Pull Requests
98

10-
- **[PSR-12 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
9+
- **[PSR-12 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md)** - Fix the code's style with `composer fix`.
10+
11+
- **[PHPStan level 9](https://phpstan.org/user-guide/rule-levels)** - Check compliance with `composer type`.
1112

12-
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
- **Add tests!** - Your contribution won't be accepted if it doesn't have tests – Run the test suite with `composer test`.
1314

1415
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
1516

1617
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
1718

18-
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
- **Create feature branches** - Don't ask us to pull from your main branch.
1920

2021
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
2122

22-
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23-
24-
25-
## Running Tests
26-
27-
``` bash
28-
$ composer test
29-
```
30-
23+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.
3124

3225
**Happy coding**!

ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<!-- Provide a general summary of the issue in the Title above -->
22

3+
> **Warning**
4+
> Are you sure your issue is caused by this package? Almost all reported issues come from a misunderstanding of the [OpenAPI specification](https://swagger.io/specification/). Please make sure that your answer isn't there before posting.
5+
36
## Detailed description
47

58
Provide a detailed description of the change or addition you are proposing.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Report something that is broken
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- PLEASE READ THIS: Are you sure your issue is caused by this package? Almost all reported issues come from a misunderstanding of the [OpenAPI specification](https://swagger.io/specification/). Please make sure that your answer isn't there before posting -->
11+
12+
**Package version**
13+
[e.g. 0.1]
14+
15+
**Describe the bug**
16+
A clear and concise description of what the bug is.
17+
18+
**To Reproduce**
19+
Steps to reproduce the behaviour:
20+
1. Go to '...'
21+
2. Run '...'
22+
3. '...'
23+
24+
**Expected behaviour**
25+
A clear and concise description of what you expected to happen.
26+
27+
**Additional context**
28+
Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Summary <!-- a couple of lines summarising the work -->
2+
3+
## Explanation <!-- deeper explanation to guide reviewers -->
4+
5+
## Checklist <!-- fill in the space between brackets with an x to tick the box -->
6+
7+
- [ ] I have provided a summary and an explanation
8+
- [ ] I have reviewed the PR myself and left comments to provide context
9+
- [ ] I have covered the changes with tests as appropriate
10+
- [ ] I have made sure static analysis and other checks are successful

.github/workflows/ci.yml

Whitespace-only changes.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ vendor
55
phpcs.xml
66
phpunit.xml
77
.phpunit.result.cache
8+
.php-cs-fixer.cache
89
.idea

.php-cs-fixer.dist.php

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__ . '/src')
5+
->in(__DIR__ . '/tests');
6+
;
7+
8+
$config = new PhpCsFixer\Config();
9+
return $config->setRules([
10+
'@PSR12' => true,
11+
'align_multiline_comment' => [
12+
'comment_type' => 'all_multiline',
13+
],
14+
'array_indentation' => true,
15+
'assign_null_coalescing_to_coalesce_equal' => true,
16+
'binary_operator_spaces' => [
17+
'default' => 'single_space',
18+
],
19+
'cast_spaces' => [
20+
'space' => 'single',
21+
],
22+
'class_attributes_separation' => [
23+
'elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none', 'case' => 'none'],
24+
],
25+
'class_reference_name_casing' => true,
26+
'clean_namespace' => true,
27+
'combine_consecutive_issets' => true,
28+
'concat_space' => [
29+
'spacing' => 'one',
30+
],
31+
'declare_parentheses' => true,
32+
'explicit_indirect_variable' => true,
33+
'explicit_string_variable' => true,
34+
'fully_qualified_strict_types' => true,
35+
'type_declaration_spaces' => true,
36+
'general_phpdoc_tag_rename' => [
37+
'replacements' => ['inheritDocs' => 'inheritDoc'],
38+
],
39+
'global_namespace_import' => [
40+
'import_classes' => true,
41+
'import_constants' => true,
42+
'import_functions' => true,
43+
],
44+
'heredoc_indentation' => [
45+
'indentation' => 'same_as_start',
46+
],
47+
'include' => true,
48+
'integer_literal_case' => true,
49+
'lambda_not_used_import' => true,
50+
'linebreak_after_opening_tag' => true,
51+
'list_syntax' => [
52+
'syntax' => 'short',
53+
],
54+
'magic_constant_casing' => true,
55+
'magic_method_casing' => true,
56+
'method_chaining_indentation' => true,
57+
'multiline_comment_opening_closing' => true,
58+
'multiline_whitespace_before_semicolons' => [
59+
'strategy' => 'no_multi_line',
60+
],
61+
'native_function_casing' => true,
62+
'native_type_declaration_casing' => true,
63+
'no_alias_language_construct_call' => true,
64+
'no_alternative_syntax' => true,
65+
'no_blank_lines_after_phpdoc' => true,
66+
'no_empty_comment' => true,
67+
'no_empty_phpdoc' => true,
68+
'no_empty_statement' => true,
69+
'no_extra_blank_lines' => [
70+
'tokens' => ['extra'],
71+
],
72+
'no_leading_namespace_whitespace' => true,
73+
'no_multiline_whitespace_around_double_arrow' => true,
74+
'no_null_property_initialization' => true,
75+
'no_short_bool_cast' => true,
76+
'no_singleline_whitespace_before_semicolons' => true,
77+
'no_spaces_around_offset' => true,
78+
'no_superfluous_phpdoc_tags' => [
79+
'allow_mixed' => false,
80+
'allow_unused_params' => false,
81+
'remove_inheritdoc' => false,
82+
],
83+
'no_trailing_comma_in_singleline' => [
84+
'elements' => ['arguments', 'array_destructuring', 'array', 'group_import'],
85+
],
86+
'no_unneeded_control_parentheses' => [
87+
'statements' => [
88+
'break',
89+
'clone',
90+
'continue',
91+
'echo_print',
92+
'negative_instanceof',
93+
'others', 'return',
94+
'switch_case',
95+
'yield',
96+
'yield_from',
97+
],
98+
],
99+
'no_unneeded_braces' => [
100+
'namespaces' => false,
101+
],
102+
'no_unneeded_import_alias' => true,
103+
'no_unset_cast' => true,
104+
'no_unused_imports' => true,
105+
'no_useless_concat_operator' => true,
106+
'no_useless_else' => true,
107+
'no_useless_nullsafe_operator' => true,
108+
'no_useless_return' => true,
109+
'no_whitespace_before_comma_in_array' => [
110+
'after_heredoc' => false,
111+
],
112+
'normalize_index_brace' => true,
113+
'not_operator_with_successor_space' => true,
114+
'nullable_type_declaration_for_default_null_value' => [
115+
'use_nullable_type_declaration' => true,
116+
],
117+
'object_operator_without_whitespace' => true,
118+
'operator_linebreak' => [
119+
'only_booleans' => false,
120+
'position' => 'beginning',
121+
],
122+
'ordered_interfaces' => [
123+
'direction' => 'ascend',
124+
'order' => 'alpha',
125+
],
126+
'php_unit_method_casing' => [
127+
'case' => 'snake_case',
128+
],
129+
'phpdoc_align' => [
130+
'align' => 'vertical',
131+
'tags' => ['method', 'param', 'property', 'property-read', 'property-write', 'return', 'throws', 'type', 'var'],
132+
],
133+
'phpdoc_annotation_without_dot' => true,
134+
'phpdoc_indent' => true,
135+
'phpdoc_inline_tag_normalizer' => [
136+
'tags' => ['example', 'id', 'internal', 'inheritdoc', 'inheritdocs', 'link', 'source', 'toc', 'tutorial'],
137+
],
138+
'phpdoc_line_span' => [
139+
'const' => 'single',
140+
'method' => 'single',
141+
'property' => 'single',
142+
],
143+
'phpdoc_no_alias_tag' => [
144+
'replacements' => ['type' => 'var', 'link' => 'see'],
145+
],
146+
'phpdoc_no_useless_inheritdoc' => true,
147+
'phpdoc_order' => [
148+
'order' => ['param', 'return', 'throws'],
149+
],
150+
'phpdoc_order_by_value' => [
151+
'annotations' => [
152+
'author',
153+
'covers',
154+
'coversNothing',
155+
'dataProvider',
156+
'depends',
157+
'group',
158+
'internal',
159+
'method',
160+
'mixin',
161+
'property',
162+
'property-read',
163+
'property-write',
164+
'requires',
165+
'throws',
166+
'uses',
167+
],
168+
],
169+
'phpdoc_return_self_reference' => [
170+
'replacements' => [
171+
'this' => 'self',
172+
'@this' => 'self',
173+
'$self' => 'self',
174+
'@self' => 'self',
175+
'$static' => 'static',
176+
'@static' => 'static',
177+
],
178+
],
179+
'phpdoc_scalar' => [
180+
'types' => ['boolean', 'callback', 'double', 'integer', 'real', 'str'],
181+
],
182+
'phpdoc_separation' => true,
183+
'phpdoc_single_line_var_spacing' => true,
184+
'phpdoc_summary' => true,
185+
'phpdoc_tag_casing' => [
186+
'tags' => ['inheritDoc'],
187+
],
188+
'phpdoc_tag_type' => true,
189+
'phpdoc_to_comment' => [
190+
'ignored_tags' => ['var'],
191+
],
192+
'phpdoc_trim' => true,
193+
'phpdoc_trim_consecutive_blank_line_separation' => true,
194+
'phpdoc_types' => [
195+
'groups' => ['alias', 'meta', 'simple'],
196+
],
197+
'phpdoc_var_annotation_correct_order' => true,
198+
'phpdoc_var_without_name' => true,
199+
'protected_to_private' => true,
200+
'return_assignment' => true,
201+
'self_static_accessor' => true,
202+
'semicolon_after_instruction' => true,
203+
'simple_to_complex_string_variable' => true,
204+
'simplified_if_return' => true,
205+
'simplified_null_return' => true,
206+
'single_line_comment_spacing' => true,
207+
'single_line_comment_style' => [
208+
'comment_types' => ['asterisk', 'hash'],
209+
],
210+
'single_quote' => [
211+
'strings_containing_single_quote_chars' => false,
212+
],
213+
'single_space_around_construct' => true,
214+
'space_after_semicolon' => [
215+
'remove_in_empty_for_expressions' => true,
216+
],
217+
'standardize_increment' => true,
218+
'standardize_not_equals' => true,
219+
'switch_case_semicolon_to_colon' => true,
220+
'switch_continue_to_break' => true,
221+
'ternary_to_null_coalescing' => true,
222+
'trailing_comma_in_multiline' => true,
223+
'trim_array_spaces' => true,
224+
'types_spaces' => [
225+
'space' => 'none',
226+
'space_multiple_catch' => null,
227+
],
228+
'unary_operator_spaces' => true,
229+
'whitespace_after_comma_in_array' => true,
230+
'yoda_style' => [
231+
'always_move_variable' => false,
232+
'equal' => false,
233+
'identical' => false,
234+
'less_and_greater' => false,
235+
],
236+
])
237+
->setFinder($finder)
238+
;

0 commit comments

Comments
 (0)