Skip to content

Commit efb130a

Browse files
committed
First commit
0 parents  commit efb130a

29 files changed

+3317
-0
lines changed

.codecov.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage:
2+
status:
3+
project: off
4+
patch: off

.gitattributes

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore everything.
5+
/* export-ignore
6+
7+
# Export white-listed production code only.
8+
/bin -export-ignore
9+
/src -export-ignore
10+
/composer.json -export-ignore
11+
/composer.lock -export-ignore
12+
/LICENSE -export-ignore

.github/CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at `[email protected]`. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

.github/CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/typisttech/imposter).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
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+
31+
32+
**Happy coding**!

.github/ISSUE_TEMPLATE.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- Provide a general summary of the issue in the Title above -->
2+
3+
## Detailed description
4+
5+
Provide a detailed description of the change or addition you are proposing.
6+
7+
Make it clear if the issue is a bug, an enhancement or just a question.
8+
9+
## Context
10+
11+
Why is this change important to you? How would you use it?
12+
13+
How can it benefit other users?
14+
15+
## Possible implementation
16+
17+
Not obligatory, but suggest an idea for implementing addition or change.
18+
19+
## Your environment
20+
21+
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
22+
23+
* Version used (e.g. PHP 5.6, HHVM 3):
24+
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
25+
* Link to your project:
26+
* ...
27+
* ...

.github/PULL_REQUEST_TEMPLATE.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
Describe your changes in detail.
6+
7+
## Motivation and context
8+
9+
Why is this change required? What problem does it solve?
10+
11+
If it fixes an open issue, please link to the issue here (if you write `fixes #num`
12+
or `closes #num`, the issue will be automatically closed when the pull is accepted.)
13+
14+
## How has this been tested?
15+
16+
Please describe in detail how you tested your changes.
17+
18+
Include details of your testing environment, and the tests you ran to
19+
see how your change affects other areas of the code, etc.
20+
21+
## Screenshots (if appropriate)
22+
23+
## Types of changes
24+
25+
What types of changes does your code introduce? Put an `x` in all the boxes that apply:
26+
- [ ] Bug fix (non-breaking change which fixes an issue)
27+
- [ ] New feature (non-breaking change which adds functionality)
28+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
29+
30+
## Checklist:
31+
32+
Go over all the following points, and put an `x` in all the boxes that apply.
33+
34+
Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our [continuous integration](http://www.phptherightway.com/#continuous-integration) server to make sure your [tests and code style pass](https://help.github.com/articles/about-required-status-checks/).
35+
36+
- [ ] I have read the **[CONTRIBUTING](CONTRIBUTING.md)** document.
37+
- [ ] My pull request addresses exactly one patch/feature.
38+
- [ ] I have created a branch for this patch/feature.
39+
- [ ] Each individual commit in the pull request is meaningful.
40+
- [ ] I have added tests to cover my changes.
41+
- [ ] If my change requires a change to the documentation, I have updated it accordingly.
42+
43+
If you're unsure about any of these, don't hesitate to ask. We're here to help!

.github_changelog_generator

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unreleased=true
2+
future-release=0.1.0

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Build ###
2+
/build/
3+
/release/
4+
5+
### Codeception ###
6+
/codeception.yml
7+
/tests/_output/
8+
/tests/_support/_generated/
9+
10+
### Composer ###
11+
/vendor/
12+
13+
### npm ###
14+
/node_modules/
15+
16+
### PhpStorm ###
17+
/.idea/

.scrutinizer.yml

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
filter:
2+
excluded_paths:
3+
- "tests/"
4+
5+
tools:
6+
external_code_coverage:
7+
enabled: true
8+
timeout: 900
9+
php_analyzer: true
10+
php_cpd: false
11+
php_code_coverage: true
12+
php_code_sniffer:
13+
config: { standard: psr2 }
14+
php_cs_fixer:
15+
config: { level: psr2 }
16+
php_loc: true
17+
php_mess_detector: true
18+
php_sim: true
19+
php_pdepend: true
20+
sensiolabs_security_checker: true
21+
22+
checks:
23+
php:
24+
verify_property_names: true
25+
verify_argument_usable_as_reference: true
26+
verify_access_scope_valid: true
27+
variable_existence: true
28+
useless_calls: true
29+
use_statement_alias_conflict: true
30+
use_self_instead_of_fqcn: true
31+
uppercase_constants: true
32+
unused_variables: true
33+
unused_properties: true
34+
unused_parameters: true
35+
unused_methods: true
36+
unreachable_code: true
37+
too_many_arguments: true
38+
symfony_request_injection: true
39+
switch_fallthrough_commented: true
40+
sql_injection_vulnerabilities: true
41+
single_namespace_per_use: true
42+
simplify_boolean_return: true
43+
side_effects_or_types: true
44+
security_vulnerabilities: true
45+
return_in_constructor: true
46+
return_doc_comments: true
47+
return_doc_comment_if_not_inferrable: true
48+
require_scope_for_properties: true
49+
require_scope_for_methods: true
50+
require_php_tag_first: true
51+
remove_extra_empty_lines: true
52+
psr2_switch_declaration: true
53+
psr2_class_declaration: true
54+
property_assignments: true
55+
properties_in_camelcaps: true
56+
prefer_while_loop_over_for_loop: true
57+
precedence_mistakes: true
58+
precedence_in_conditions: true
59+
phpunit_assertions: true
60+
php5_style_constructor: true
61+
parse_doc_comments: true
62+
parameters_in_camelcaps: true
63+
parameter_non_unique: true
64+
parameter_doc_comments: true
65+
param_doc_comment_if_not_inferrable: true
66+
overriding_private_members: true
67+
overriding_parameter: true
68+
optional_parameters_at_the_end: true
69+
one_class_per_file: true
70+
non_commented_empty_catch_block: true
71+
no_unnecessary_if: true
72+
no_unnecessary_final_modifier: true
73+
no_underscore_prefix_in_properties: true
74+
no_underscore_prefix_in_methods: true
75+
no_trait_type_hints: true
76+
no_trailing_whitespace: true
77+
no_short_variable_names:
78+
minimum: '3'
79+
no_short_open_tag: true
80+
no_short_method_names:
81+
minimum: '3'
82+
no_property_on_interface: true
83+
no_non_implemented_abstract_methods: true
84+
no_long_variable_names:
85+
maximum: '20'
86+
no_goto: true
87+
no_global_keyword: true
88+
no_exit: true
89+
no_eval: true
90+
no_error_suppression: true
91+
no_empty_statements: true
92+
no_duplicate_arguments: true
93+
no_debug_code: true
94+
no_commented_out_code: true
95+
newline_at_end_of_file: true
96+
naming_conventions:
97+
local_variable: '^[a-z][a-zA-Z0-9]*$'
98+
abstract_class_name: ^Abstract|Factory$
99+
utility_class_name: '(Factory|Utils?)$'
100+
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
101+
property_name: '^[a-z][a-zA-Z0-9]*$'
102+
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
103+
parameter_name: '^[a-z][a-zA-Z0-9]*$'
104+
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
105+
type_name: '^[A-Z][a-zA-Z0-9]*$'
106+
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
107+
isser_method_name: '^(?:is|has|should|may|supports)'
108+
more_specific_types_in_doc_comments: true
109+
missing_arguments: true
110+
method_calls_on_non_object: true
111+
line_length:
112+
max_length: '120'
113+
instanceof_class_exists: true
114+
function_in_camel_caps: true
115+
foreach_usable_as_reference: true
116+
foreach_traversable: true
117+
fix_use_statements:
118+
remove_unused: true
119+
preserve_multiple: false
120+
preserve_blanklines: false
121+
order_alphabetically: true
122+
fix_line_ending: true
123+
fix_doc_comments: true
124+
encourage_single_quotes: true
125+
encourage_shallow_comparison: true
126+
encourage_postdec_operator: true
127+
duplication: true
128+
deprecated_code_usage: true
129+
deadlock_detection_in_loops: true
130+
custom_coding_standard:
131+
ruleset_path: ruleset.xml
132+
comparison_always_same_result: true
133+
code_rating: true
134+
closure_use_not_conflicting: true
135+
closure_use_modifiable: true
136+
classes_in_camel_caps: true
137+
check_method_contracts:
138+
verify_interface_like_constraints: true
139+
verify_documented_constraints: true
140+
verify_parent_constraints: true
141+
catch_class_exists: true
142+
call_to_parent_method: true
143+
blank_line_after_namespace_declaration: true
144+
avoid_useless_overridden_methods: true
145+
avoid_usage_of_logical_operators: true
146+
avoid_unnecessary_concatenation: true
147+
avoid_todo_comments: true
148+
avoid_superglobals: true
149+
avoid_perl_style_comments: true
150+
avoid_multiple_statements_on_same_line: true
151+
avoid_length_functions_in_loops: true
152+
avoid_fixme_comments: true
153+
avoid_entity_manager_injection: true
154+
avoid_duplicate_types: true
155+
avoid_corrupting_byteorder_marks: true
156+
avoid_conflicting_incrementers: true
157+
avoid_closing_tag: true
158+
avoid_aliased_php_functions: true
159+
assignment_of_null_return: true
160+
argument_type_checks: true
161+
align_assignments: true

.stickler.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
linters:
2+
phpcs:
3+
standard: './ruleset.xml'

.styleci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
preset: psr2
2+
3+
finder:
4+
exclude:
5+
- "tests/_data"

0 commit comments

Comments
 (0)