-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9c636c6
Showing
27 changed files
with
3,765 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# for php-coveralls | ||
service_name: travis-ci | ||
src_dir: src | ||
coverage_clover: build/logs/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# EditorConfig is awesome: http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
max_line_length = 120 | ||
|
||
[*.{diff,md}] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{html,js,rb,scss,xml,yml,yaml,json,feature}] | ||
indent_size = 2 | ||
|
||
[*.txt] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
* eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
|
||
tests/ export-ignore | ||
phpunit.xml.dist export-ignore | ||
vendor/ export-ignore | ||
composer.lock export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php_cs export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vendor/ | ||
composer.lock | ||
/phpunit.xml | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
|
||
$config = PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
// '@PHP56Migration' => true, | ||
// '@PHPUnit60Migration:risky' => true, | ||
// '@Symfony' => true, | ||
// '@Symfony:risky' => true, | ||
// 'align_multiline_comment' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'blank_line_before_statement' => true, | ||
'binary_operator_spaces' => true, | ||
'cast_spaces' => true, | ||
'class_attributes_separation' => true, | ||
'combine_consecutive_issets' => true, | ||
'combine_consecutive_unsets' => true, | ||
'compact_nullable_typehint' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
// 'heredoc_to_nowdoc' => true, | ||
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'version']], | ||
'list_syntax' => ['syntax' => 'short'], | ||
'lowercase_cast' => true, | ||
'magic_constant_casing' => true, | ||
'mb_str_functions' => true, | ||
'method_argument_space' => ['ensure_fully_multiline' => true], | ||
'modernize_types_casting' => true, | ||
'native_function_casing' => true, | ||
'new_with_braces' => true, | ||
'no_empty_comment' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_statement' => true, | ||
'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], | ||
'no_homoglyph_names' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_mixed_echo_print' => true, | ||
'no_multiline_whitespace_around_double_arrow' => true, | ||
'no_null_property_initialization' => true, | ||
'no_short_echo_tag' => true, | ||
'no_short_bool_cast' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_spaces_around_offset' => true, | ||
'no_superfluous_elseif' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unneeded_control_parentheses' => true, | ||
'no_unneeded_curly_braces' => true, | ||
'no_unneeded_final_method' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_unused_imports' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'no_whitespace_before_comma_in_array' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'normalize_index_brace' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
// 'php_unit_strict' => true, | ||
// 'php_unit_test_class_requires_covers' => true, | ||
'phpdoc_add_missing_param_annotation' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_types_order' => true, | ||
'protected_to_private' => true, | ||
'return_type_declaration' => true, | ||
'self_accessor' => true, | ||
// 'semicolon_after_instruction' => false, | ||
'semicolon_after_instruction' => true, | ||
'short_scalar_cast' => true, | ||
'single_line_comment_style' => true, | ||
'single_quote' => true, | ||
'standardize_not_equals' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'ternary_to_null_coalescing' => true, | ||
'trailing_comma_in_multiline_array' => true, | ||
'trim_array_spaces' => true, | ||
'unary_operator_spaces' => true, | ||
'visibility_required' => ['property', 'method', 'const'], | ||
'void_return' => true, | ||
'yoda_style' => ['equal' => false, 'identical' => false], | ||
'object_operator_without_whitespace' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->in(__DIR__) | ||
); | ||
|
||
// special handling of fabbot.io service if it's using too old PHP CS Fixer version | ||
try { | ||
PhpCsFixer\FixerFactory::create() | ||
->registerBuiltInFixers() | ||
->registerCustomFixers($config->getCustomFixers()) | ||
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules())); | ||
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) { | ||
$config->setRules([]); | ||
} catch (UnexpectedValueException $e) { | ||
$config->setRules([]); | ||
} catch (InvalidArgumentException $e) { | ||
$config->setRules([]); | ||
} | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
sudo: false | ||
|
||
language: php | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.1 | ||
- php: 7.2 | ||
env: | ||
- EXECUTE_COVERAGE=true | ||
- EXECUTE_CS_CHECK=true | ||
- php: 7.3 | ||
allow_failures: | ||
- php: 7.3 | ||
|
||
notifications: | ||
email: false | ||
|
||
before_install: | ||
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
|
||
install: | ||
- composer self-update | ||
- composer install | ||
|
||
script: | ||
# PHPUnit | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then mkdir -p build/logs ; fi | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-text --coverage-clover=build/logs/coverage.xml ; else ./vendor/bin/phpunit ; fi | ||
# PHP CS Fixer | ||
- if [[ EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi | ||
|
||
after_success: | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then .vendor/bin/php-coveralls -v ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file | ||
using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
<!-- | ||
Types of changes | ||
Added - for new features. | ||
Changed - for changes in existing functionality. | ||
Deprecated - for soon-to-be removed features. | ||
Removed - for now removed features. | ||
Fixed - for any bug fixes. | ||
Security - in case of vulnerabilities. | ||
--> | ||
|
||
## [Unreleased] | ||
|
||
_TBD_ | ||
|
||
## 1.0.0 (2018-12-08) | ||
|
||
Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright 2016 Rebilly SRL | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.