Skip to content

Commit 1efcb10

Browse files
Merge pull request #1 from goldspecdigital/develop
v1.0.0
2 parents 8d11f3d + c6cb5a2 commit 1efcb10

File tree

18 files changed

+864
-5
lines changed

18 files changed

+864
-5
lines changed

.gitignore

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/.idea
2+
/.phpunit.result.cache
23

3-
# Created by https://www.gitignore.io/api/macos,phpstorm,composer
4-
# Edit at https://www.gitignore.io/?templates=macos,phpstorm,composer
4+
# Created by https://www.gitignore.io/api/macos,phpstorm,composer,visualstudiocode
5+
# Edit at https://www.gitignore.io/?templates=macos,phpstorm,composer,visualstudiocode
56

67
### Composer ###
78
composer.phar
89
/vendor/
910

1011
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
1112
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
12-
# composer.lock
13+
composer.lock
1314

1415
### macOS ###
1516
# General
@@ -121,4 +122,15 @@ fabric.properties
121122
# Sonarlint plugin
122123
.idea/sonarlint
123124

124-
# End of https://www.gitignore.io/api/macos,phpstorm,composer
125+
### VisualStudioCode ###
126+
.vscode/*
127+
!.vscode/settings.json
128+
!.vscode/tasks.json
129+
!.vscode/launch.json
130+
!.vscode/extensions.json
131+
132+
### VisualStudioCode Patch ###
133+
# Ignore all local history of files
134+
.history
135+
136+
# End of https://www.gitignore.io/api/macos,phpstorm,composer,visualstudiocode

.php_cs

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Config;
6+
use PhpCsFixer\Finder;
7+
8+
$finder = Finder::create()
9+
->in(__DIR__)
10+
->exclude([
11+
'media',
12+
'tests',
13+
'vendor',
14+
]);
15+
16+
$rules = [
17+
'@PSR1' => true,
18+
'@PSR2' => true,
19+
20+
'align_multiline_comment' => true,
21+
'array_indentation' => true,
22+
'array_syntax' => [
23+
'syntax' => 'short',
24+
],
25+
'blank_line_after_opening_tag' => true,
26+
'blank_line_before_statement' => [
27+
'statements' => ['return', 'throw'],
28+
],
29+
'cast_spaces' => [
30+
'space' => 'none',
31+
],
32+
'class_attributes_separation' => [
33+
'elements' => ['method', 'property'],
34+
],
35+
'combine_consecutive_issets' => true,
36+
'combine_consecutive_unsets' => true,
37+
'compact_nullable_typehint' => true,
38+
'concat_space' => [
39+
'spacing' => 'one',
40+
],
41+
'declare_equal_normalize' => true,
42+
'declare_strict_types' => true,
43+
'ereg_to_preg' => true,
44+
'fully_qualified_strict_types' => true,
45+
'function_to_constant' => true,
46+
'function_typehint_space' => true,
47+
'heredoc_indentation' => true,
48+
'heredoc_to_nowdoc' => true,
49+
'list_syntax' => true,
50+
'logical_operators' => true,
51+
'lowercase_cast' => true,
52+
'lowercase_static_reference' => true,
53+
'magic_constant_casing' => true,
54+
'magic_method_casing' => true,
55+
'mb_str_functions' => true,
56+
'method_chaining_indentation' => true,
57+
'modernize_types_casting' => true,
58+
'multiline_comment_opening_closing' => true,
59+
'multiline_whitespace_before_semicolons' => true,
60+
'native_function_casing' => true,
61+
'native_function_type_declaration_casing' => true,
62+
'new_with_braces' => true,
63+
'no_alias_functions' => true,
64+
'no_alternative_syntax' => true,
65+
'no_blank_lines_after_class_opening' => true,
66+
'no_blank_lines_after_phpdoc' => true,
67+
'no_break_comment' => [
68+
'comment_text' => 'No break.',
69+
],
70+
'no_empty_phpdoc' => true,
71+
'no_empty_statement' => true,
72+
'no_extra_blank_lines' => true,
73+
'no_leading_import_slash' => true,
74+
'no_leading_namespace_whitespace' => true,
75+
'no_mixed_echo_print' => true,
76+
'no_multiline_whitespace_around_double_arrow' => true,
77+
'no_php4_constructor' => true,
78+
'no_short_bool_cast' => true,
79+
'no_short_echo_tag' => true,
80+
'no_singleline_whitespace_before_semicolons' => true,
81+
'no_spaces_around_offset' => true,
82+
'no_unused_imports' => true,
83+
'no_whitespace_before_comma_in_array' => true,
84+
'no_whitespace_in_blank_line' => true,
85+
'normalize_index_brace' => true,
86+
'object_operator_without_whitespace' => true,
87+
'ordered_imports' => true,
88+
'phpdoc_add_missing_param_annotation' => true,
89+
'phpdoc_align' => [
90+
'align' => 'left',
91+
],
92+
'phpdoc_annotation_without_dot' => true,
93+
'phpdoc_indent' => true,
94+
'phpdoc_no_empty_return' => true,
95+
'phpdoc_no_package' => true,
96+
'phpdoc_order' => true,
97+
'phpdoc_scalar' => true,
98+
'phpdoc_single_line_var_spacing' => true,
99+
'phpdoc_summary' => true,
100+
'phpdoc_trim' => true,
101+
'phpdoc_trim_consecutive_blank_line_separation' => true,
102+
'phpdoc_types' => true,
103+
'phpdoc_types_order' => [
104+
'null_adjustment' => 'always_last',
105+
'sort_algorithm' => 'none',
106+
],
107+
'phpdoc_var_annotation_correct_order' => true,
108+
'phpdoc_var_without_name' => true,
109+
'random_api_migration' => true,
110+
'return_type_declaration' => true,
111+
'semicolon_after_instruction' => true,
112+
'set_type_to_cast' => true,
113+
'short_scalar_cast' => true,
114+
'simple_to_complex_string_variable' => true,
115+
'simplified_null_return' => true,
116+
'single_blank_line_before_namespace' => true,
117+
'single_line_comment_style' => true,
118+
'single_quote' => true,
119+
'single_trait_insert_per_statement' => true,
120+
'standardize_not_equals' => true,
121+
'ternary_operator_spaces' => true,
122+
'ternary_to_null_coalescing' => true,
123+
'trailing_comma_in_multiline_array' => true,
124+
'trim_array_spaces' => true,
125+
'unary_operator_spaces' => true,
126+
];
127+
128+
return Config::create()
129+
->setRules($rules)
130+
->setFinder($finder);

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Only run on the following branches.
2+
branches:
3+
only:
4+
- master
5+
- develop
6+
7+
# The language of the Travis CI container.
8+
language: php
9+
10+
# The versions of PHP to run builds against.
11+
php:
12+
- "7.1"
13+
- "7.2"
14+
- "7.3"
15+
16+
# Cache the vendor directory for quicker builds.
17+
cache:
18+
directories:
19+
- vendor
20+
21+
# Update composer and install the package dependencies.
22+
install:
23+
- composer self-update
24+
- composer install --no-interaction
25+
26+
# Run the code style and unit tests.
27+
script:
28+
- composer test:style
29+
- composer test:unit

CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish
4+
to make via issue, email, or any other method with the owners of this repository
5+
before making a change.
6+
7+
Please note we have a code of conduct, please follow it in all your interactions
8+
with the project.
9+
10+
## Pull Request Process
11+
12+
1. Ensure any install or build dependencies are removed and untracked.
13+
2. Update the `README.md` with details of changes to the interface along with an
14+
example or two.
15+
3. State whether or not the Pull Request is backwards compatible and if not,
16+
then state what the breaking changes are so that they can be documented in
17+
the release notes.
18+
4. Create the Pull Request and a reviewer will either accept and merge the Pull
19+
Request, then tag the new release, or alternatively the reviewer will request
20+
for more information regarding the Pull Request or even some changes for you
21+
to make before we can accept the Pull Request.
22+
23+
## Code of Conduct
24+
25+
### Our Pledge
26+
27+
In the interest of fostering an open and welcoming environment, we as
28+
contributors and maintainers pledge to making participation in our project and
29+
our community a harassment-free experience for everyone, regardless of age, body
30+
size, disability, ethnicity, gender identity and expression, level of experience,
31+
nationality, personal appearance, race, religion, or sexual identity and
32+
orientation.
33+
34+
### Our Standards
35+
36+
Examples of behavior that contributes to creating a positive environment
37+
include:
38+
39+
* Using welcoming and inclusive language
40+
* Being respectful of differing viewpoints and experiences
41+
* Gracefully accepting constructive criticism
42+
* Focusing on what is best for the community
43+
* Showing empathy towards other community members
44+
45+
Examples of unacceptable behavior by participants include:
46+
47+
* The use of sexualized language or imagery and unwelcome sexual attention or
48+
advances
49+
* Trolling, insulting/derogatory comments, and personal or political attacks
50+
* Public or private harassment
51+
* Publishing others' private information, such as a physical or electronic
52+
address, without explicit permission
53+
* Other conduct which could reasonably be considered inappropriate in a
54+
professional setting
55+
56+
### Our Responsibilities
57+
58+
Project maintainers are responsible for clarifying the standards of acceptable
59+
behavior and are expected to take appropriate and fair corrective action in
60+
response to any instances of unacceptable behavior.
61+
62+
Project maintainers have the right and responsibility to remove, edit, or
63+
reject comments, commits, code, wiki edits, issues, and other contributions
64+
that are not aligned to this Code of Conduct, or to ban temporarily or
65+
permanently any contributor for other behaviors that they deem inappropriate,
66+
threatening, offensive, or harmful.
67+
68+
### Scope
69+
70+
This Code of Conduct applies both within project spaces and in public spaces
71+
when an individual is representing the project or its community. Examples of
72+
representing a project or community include using an official project e-mail
73+
address, posting via an official social media account, or acting as an appointed
74+
representative at an online or offline event. Representation of a project may be
75+
further defined and clarified by project maintainers.
76+
77+
### Enforcement
78+
79+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
80+
reported by contacting the project team at [[email protected]](mailto:[email protected]).
81+
All complaints will be reviewed and investigated and will result in a response
82+
that is deemed necessary and appropriate to the circumstances. The project team
83+
is obligated to maintain confidentiality with regard to the reporter of an
84+
incident. Further details of specific enforcement policies may be posted
85+
separately.
86+
87+
Project maintainers who do not follow or enforce the Code of Conduct in good
88+
faith may face temporary or permanent repercussions as determined by other
89+
members of the project's leadership.
90+
91+
### Attribution
92+
93+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
94+
version 1.4, available at [http://contributor-covenant.org/version/1/4][version].
95+
96+
[homepage]: http://contributor-covenant.org
97+
[version]: http://contributor-covenant.org/version/1/4/

LICENSE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2019 - Present GoldSpec Digital Ltd
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
20+

0 commit comments

Comments
 (0)