Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

* text=auto eol=lf

# Ignore all test and documentation with "export-ignore".
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/PULL_REQUEST_TEMPLATE.md export-ignore
/ISSUE_TEMPLATE.md export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
/.github export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.cache export-ignore
/.php-cs-fixer.dist.php export-ignore
/.phpunit.result.cache export-ignore
/composer.lock export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/rector.php export-ignore
21 changes: 7 additions & 14 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,24 @@

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

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

We accept contributions via Pull Requests on Github.

## Pull Requests

- **[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``.
- **[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`.

- **[PHPStan level 9](https://phpstan.org/user-guide/rule-levels)** - Check compliance with `composer type`.

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

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

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

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

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

- **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.


## Running Tests

``` bash
$ composer test
```

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.

**Happy coding**!
3 changes: 3 additions & 0 deletions ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!-- Provide a general summary of the issue in the Title above -->

> **Warning**
> 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.

## Detailed description

Provide a detailed description of the change or addition you are proposing.
Expand Down
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Report something that is broken
title: ''
labels: ''
assignees: ''

---

<!-- 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 -->

**Package version**
[e.g. 0.1]

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Run '...'
3. '...'

**Expected behaviour**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Summary <!-- a couple of lines summarising the work -->

## Explanation <!-- deeper explanation to guide reviewers -->

## Checklist <!-- fill in the space between brackets with an x to tick the box -->

- [ ] I have provided a summary and an explanation
- [ ] I have reviewed the PR myself and left comments to provide context
- [ ] I have covered the changes with tests as appropriate
- [ ] I have made sure static analysis and other checks are successful
Empty file added .github/workflows/ci.yml
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ vendor
phpcs.xml
phpunit.xml
.phpunit.result.cache
.php-cs-fixer.cache
.idea
238 changes: 238 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
'array_indentation' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
],
'cast_spaces' => [
'space' => 'single',
],
'class_attributes_separation' => [
'elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none', 'case' => 'none'],
],
'class_reference_name_casing' => true,
'clean_namespace' => true,
'combine_consecutive_issets' => true,
'concat_space' => [
'spacing' => 'one',
],
'declare_parentheses' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fully_qualified_strict_types' => true,
'type_declaration_spaces' => true,
'general_phpdoc_tag_rename' => [
'replacements' => ['inheritDocs' => 'inheritDoc'],
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'heredoc_indentation' => [
'indentation' => 'same_as_start',
],
'include' => true,
'integer_literal_case' => true,
'lambda_not_used_import' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => [
'syntax' => 'short',
],
'magic_constant_casing' => true,
'magic_method_casing' => true,
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_function_casing' => true,
'native_type_declaration_casing' => true,
'no_alias_language_construct_call' => true,
'no_alternative_syntax' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => [
'tokens' => ['extra'],
],
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_null_property_initialization' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => false,
'allow_unused_params' => false,
'remove_inheritdoc' => false,
],
'no_trailing_comma_in_singleline' => [
'elements' => ['arguments', 'array_destructuring', 'array', 'group_import'],
],
'no_unneeded_control_parentheses' => [
'statements' => [
'break',
'clone',
'continue',
'echo_print',
'negative_instanceof',
'others', 'return',
'switch_case',
'yield',
'yield_from',
],
],
'no_unneeded_braces' => [
'namespaces' => false,
],
'no_unneeded_import_alias' => true,
'no_unset_cast' => true,
'no_unused_imports' => true,
'no_useless_concat_operator' => true,
'no_useless_else' => true,
'no_useless_nullsafe_operator' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => [
'after_heredoc' => false,
],
'normalize_index_brace' => true,
'not_operator_with_successor_space' => true,
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
'object_operator_without_whitespace' => true,
'operator_linebreak' => [
'only_booleans' => false,
'position' => 'beginning',
],
'ordered_interfaces' => [
'direction' => 'ascend',
'order' => 'alpha',
],
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'phpdoc_align' => [
'align' => 'vertical',
'tags' => ['method', 'param', 'property', 'property-read', 'property-write', 'return', 'throws', 'type', 'var'],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => ['example', 'id', 'internal', 'inheritdoc', 'inheritdocs', 'link', 'source', 'toc', 'tutorial'],
],
'phpdoc_line_span' => [
'const' => 'single',
'method' => 'single',
'property' => 'single',
],
'phpdoc_no_alias_tag' => [
'replacements' => ['type' => 'var', 'link' => 'see'],
],
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => [
'order' => ['param', 'return', 'throws'],
],
'phpdoc_order_by_value' => [
'annotations' => [
'author',
'covers',
'coversNothing',
'dataProvider',
'depends',
'group',
'internal',
'method',
'mixin',
'property',
'property-read',
'property-write',
'requires',
'throws',
'uses',
],
],
'phpdoc_return_self_reference' => [
'replacements' => [
'this' => 'self',
'@this' => 'self',
'$self' => 'self',
'@self' => 'self',
'$static' => 'static',
'@static' => 'static',
],
],
'phpdoc_scalar' => [
'types' => ['boolean', 'callback', 'double', 'integer', 'real', 'str'],
],
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => true,
'phpdoc_tag_casing' => [
'tags' => ['inheritDoc'],
],
'phpdoc_tag_type' => true,
'phpdoc_to_comment' => [
'ignored_tags' => ['var'],
],
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => [
'groups' => ['alias', 'meta', 'simple'],
],
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true,
'protected_to_private' => true,
'return_assignment' => true,
'self_static_accessor' => true,
'semicolon_after_instruction' => true,
'simple_to_complex_string_variable' => true,
'simplified_if_return' => true,
'simplified_null_return' => true,
'single_line_comment_spacing' => true,
'single_line_comment_style' => [
'comment_types' => ['asterisk', 'hash'],
],
'single_quote' => [
'strings_containing_single_quote_chars' => false,
],
'single_space_around_construct' => true,
'space_after_semicolon' => [
'remove_in_empty_for_expressions' => true,
],
'standardize_increment' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_continue_to_break' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'types_spaces' => [
'space' => 'none',
'space_multiple_catch' => null,
],
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => [
'always_move_variable' => false,
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
])
->setFinder($finder)
;
Loading
Loading