Skip to content

Commit 2529d85

Browse files
authored
Merge pull request #1 from eclipxe13/master
Release 1.0.0
2 parents 6bc609e + 24c3902 commit 2529d85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1704
-1
lines changed

.gitattributes

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Do not put this files on a distribution package (by .gitignore)
5+
/vendor export-ignore
6+
/build export-ignore
7+
/composer.lock export-ignore
8+
9+
# Do not put this files on a distribution package
10+
/docs/ export-ignore
11+
/tests/ export-ignore
12+
/.gitattributes export-ignore
13+
/.gitignore export-ignore
14+
/.php_cs.dist export-ignore
15+
/.scrutinizer.yml export-ignore
16+
/.travis.yml export-ignore
17+
/phpcs.xml.dist export-ignore
18+
/phpunit.xml.dist export-ignore

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# do not include this files on git
2+
/vendor
3+
/build
4+
/composer.lock
5+
.phpunit.result.cache

.php_cs.dist

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
return PhpCsFixer\Config::create()
6+
->setRiskyAllowed(true)
7+
->setCacheFile(__DIR__.'/build/.php_cs.cache')
8+
->setRules([
9+
'@PSR2' => true,
10+
'@PHP70Migration' => true,
11+
'@PHP70Migration:risky' => true,
12+
'@PHP71Migration' => true,
13+
'@PHP71Migration:risky' => true,
14+
// symfony
15+
'class_attributes_separation' => true,
16+
'whitespace_after_comma_in_array' => true,
17+
'no_empty_statement' => true,
18+
'no_extra_blank_lines' => true,
19+
'function_typehint_space' => true,
20+
'no_alias_functions' => true,
21+
'trailing_comma_in_multiline_array' => true,
22+
'new_with_braces' => true,
23+
'no_blank_lines_after_class_opening' => true,
24+
'no_blank_lines_after_phpdoc' => true,
25+
'object_operator_without_whitespace' => true,
26+
'binary_operator_spaces' => true,
27+
'phpdoc_scalar' => true,
28+
'self_accessor' => true,
29+
'no_trailing_comma_in_singleline_array' => true,
30+
'single_quote' => true,
31+
'no_singleline_whitespace_before_semicolons' => true,
32+
'no_unused_imports' => true,
33+
'no_whitespace_in_blank_line' => true,
34+
'yoda_style' => ['equal' => true, 'identical' => true, 'less_and_greater' => null],
35+
'standardize_not_equals' => true,
36+
// contrib
37+
'concat_space' => ['spacing' => 'one'],
38+
'not_operator_with_successor_space' => true,
39+
'single_blank_line_before_namespace' => true,
40+
'linebreak_after_opening_tag' => true,
41+
'blank_line_after_opening_tag' => true,
42+
'ordered_imports' => true,
43+
'array_syntax' => ['syntax' => 'short'],
44+
])
45+
->setFinder(
46+
PhpCsFixer\Finder::create()
47+
->in(__DIR__)
48+
->exclude(['vendor', 'build'])
49+
)
50+
;

.phplint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# config file for phplint
2+
# see https://github.com/overtrue/phplint
3+
4+
path: ./
5+
cache: build/phplint.cache
6+
jobs: 10
7+
extensions:
8+
- php
9+
exclude:
10+
- vendor
11+
- build

.scrutinizer.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
filter:
2+
excluded_paths:
3+
- 'tests/'
4+
- 'vendor/'
5+
6+
build:
7+
nodes:
8+
analysis:
9+
environment:
10+
php:
11+
version: 7.3
12+
project_setup:
13+
override: true
14+
tests:
15+
override:
16+
- php-scrutinizer-run --enable-security-analysis
17+
- phpcs-run --standard=phpcs.xml.dist src/ tests/
18+
- command: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
19+
coverage:
20+
file: coverage.clover
21+
format: clover

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: php
2+
3+
# This triggers builds to run on the new TravisCI infrastructure.
4+
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
5+
sudo: false
6+
7+
# php compatibility
8+
php:
9+
- 7.2
10+
- 7.3
11+
12+
cache:
13+
- directories:
14+
- $HOME/.composer
15+
16+
before_script:
17+
- travis_retry composer install --no-interaction --prefer-dist
18+
- phpenv config-rm xdebug.ini
19+
- mkdir -p build
20+
21+
script:
22+
- vendor/bin/phplint
23+
- vendor/bin/php-cs-fixer fix --verbose
24+
- vendor/bin/phpcbf --colors -sp src/ tests/
25+
- vendor/bin/phpunit --testdox --verbose
26+
- vendor/bin/phpstan.phar analyse --no-progress --level max src/ tests/
27+
28+
notifications:
29+
email: false

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant 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 making 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 eclipxe13@gmail.com. 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/

CONTRIBUTING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing
2+
3+
Contributions are welcome. We accept pull requests on [GitHub](https://github.com/phpcfdi/cfdi-expresiones).
4+
5+
This project adheres to a
6+
[Contributor Code of Conduct](https://github.com/phpcfdi/cfdi-expresiones/blob/master/CODE_OF_CONDUCT.md).
7+
By participating in this project and its community, you are expected to uphold this code.
8+
9+
## Team members
10+
11+
* [Carlos C Soto](https://github.com/eclipxe13) - original author and maintainer
12+
* [GitHub constributors](https://github.com/phpcfdi/cfdi-expresiones/graphs/contributors)
13+
14+
## Communication Channels
15+
16+
You can find help and discussion in the following places:
17+
18+
* GitHub Issues: <https://github.com/phpcfdi/cfdi-expresiones/issues>
19+
20+
## Reporting Bugs
21+
22+
Bugs are tracked in our project's [issue tracker](https://github.com/phpcfdi/cfdi-expresiones/issues).
23+
24+
When submitting a bug report, please include enough information for us to reproduce the bug.
25+
A good bug report includes the following sections:
26+
27+
* Expected outcome
28+
* Actual outcome
29+
* Steps to reproduce, including sample code
30+
* Any other information that will help us debug and reproduce the issue, including stack traces, system/environment information, and screenshots
31+
32+
**Please do not include passwords or any personally identifiable information in your bug report and sample code.**
33+
34+
## Fixing Bugs
35+
36+
We welcome pull requests to fix bugs!
37+
38+
If you see a bug report that you'd like to fix, please feel free to do so.
39+
Following the directions and guidelines described in the "Adding New Features"
40+
section below, you may create bugfix branches and send us pull requests.
41+
42+
## Adding New Features
43+
44+
If you have an idea for a new feature, it's a good idea to check out our
45+
[issues](https://github.com/phpcfdi/cfdi-expresiones/issues) or active
46+
[pull requests](https://github.com/phpcfdi/cfdi-expresiones/pulls)
47+
first to see if the feature is already being worked on.
48+
If not, feel free to submit an issue first, asking whether the feature is beneficial to the project.
49+
This will save you from doing a lot of development work only to have your feature rejected.
50+
We don't enjoy rejecting your hard work, but some features just don't fit with the goals of the project.
51+
52+
When you do begin working on your feature, here are some guidelines to consider:
53+
54+
* Your pull request description should clearly detail the changes you have made.
55+
* Follow our code style using `squizlabs/php_codesniffer` and `friendsofphp/php-cs-fixer`.
56+
* Please **write tests** for any new features you add.
57+
* Please **ensure that tests pass** before submitting your pull request. We have Travis CI automatically running tests for pull requests. However, running the tests locally will help save time.
58+
* **Use topic/feature branches.** Please do not ask us to pull from your master branch.
59+
* **Submit one feature per pull request.** If you have multiple features you wish to submit, please break them up into separate pull requests.
60+
* **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 before submitting.
61+
62+
## Check the code style
63+
64+
If you are having issues with coding standars use `php-cs-fixer` and `phpcbf`
65+
66+
```shell
67+
vendor/bin/php-cs-fixer fix -v
68+
vendor/bin/phpcbf src/ tests/
69+
```
70+
71+
## Running Tests
72+
73+
The following tests must pass before we will accept a pull request.
74+
If any of these do not pass, it will result in a complete build failure.
75+
Before you can run these, be sure to `composer install` or `composer update`.
76+
77+
```shell
78+
vendor/bin/parallel-lint src/ tests/
79+
vendor/bin/phpcs -sp src/ tests/
80+
vendor/bin/php-cs-fixer fix -v --dry-run
81+
vendor/bin/phpunit --coverage-text
82+
```

LICENSE

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

0 commit comments

Comments
 (0)