Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit e73ae36

Browse files
committed
Updated to 1.1.6 version
1 parent 561285c commit e73ae36

16 files changed

+378
-79
lines changed

Diff for: .gitattributes

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
/tests export-ignore
2-
/src/bootstrap.php export-ignore
3-
/vendor export-ignore
4-
.gitattributes export-ignore
5-
.gitignore export-ignore
6-
_config.yml export-ignore
7-
.travis.yml export-ignore
82
CHANGELOG.md export-ignore
9-
phpunit.xml.dist export-ignore
10-
CONDUCT.md export-ignore
11-
contributors.txt export-ignore
123
README.md export-ignore
134
README-ES.md export-ignore
5+
phpcs.xml export-ignore
6+
phpunit.xml export-ignore
7+
phpmd.xml export-ignore
8+
.travis.yml export-ignore
149
.editorconfig export-ignore
15-
composer.lock export-ignore
10+
.gitattributes export-ignore
11+
.gitignore export-ignore

Diff for: .gitignore

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
phpunit.xml
1+
.git*/
2+
vendor/
3+
docs/*.pyc
4+
docs/_build
5+
build/artifacts/
26
composer.phar
37
composer.lock
48
composer-test.lock
5-
build/artifacts/
6-
artifacts/
7-
docs/_build
8-
docs/*.pyc
9-
.git*/
9+
phpcbf-fixed.diff
1010
.idea
1111
.DS_STORE
12+
.php_cs.cache

Diff for: .php_cs.dist

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?php
2+
return \PhpCsFixer\Config::create()
3+
->setRiskyAllowed(true)
4+
->setRules(array(
5+
'@PSR2' => true,
6+
'array_syntax' => ['syntax' => 'short'],
7+
'binary_operator_spaces' => ['align_equals' => false, 'align_double_arrow' => false],
8+
'blank_line_after_opening_tag' => true,
9+
'blank_line_after_namespace' => false,
10+
'blank_line_before_return' => true,
11+
'cast_spaces' => true,
12+
// 'class_keyword_remove' => true,
13+
'combine_consecutive_unsets' => true,
14+
'concat_space' => ['spacing' => 'one'],
15+
'declare_equal_normalize' => true,
16+
'declare_strict_types' => false,
17+
'dir_constant' => true,
18+
'ereg_to_preg' => true,
19+
'function_typehint_space' => true,
20+
// 'general_phpdoc_annotation_remove' => ['author', 'category', 'package', 'copyright', 'version'],
21+
'hash_to_slash_comment' => true,
22+
'heredoc_to_nowdoc' => true,
23+
'include' => true,
24+
'indentation_type' => true,
25+
// 'is_null' => ['use_yoda_style' => false],
26+
'linebreak_after_opening_tag' => true,
27+
'lowercase_cast' => true,
28+
// 'mb_str_functions' => true,
29+
'method_separation' => true,
30+
'modernize_types_casting' => true,
31+
'native_function_casing' => true,
32+
// 'native_function_invocation' => true,
33+
'new_with_braces' => false, //
34+
'no_alias_functions' => true,
35+
'no_blank_lines_after_class_opening' => true,
36+
'no_blank_lines_after_phpdoc' => true,
37+
'no_blank_lines_before_namespace' => true,
38+
'no_empty_comment' => true,
39+
'no_empty_phpdoc' => true,
40+
'no_empty_statement' => true,
41+
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'curly_brace_block', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'throw', 'use', 'useTrait'],
42+
'no_leading_import_slash' => true,
43+
'no_leading_namespace_whitespace' => true,
44+
'no_mixed_echo_print' => ['use' => 'echo'],
45+
'no_multiline_whitespace_around_double_arrow' => true,
46+
'no_multiline_whitespace_before_semicolons' => true,
47+
'no_php4_constructor' => true,
48+
'no_short_bool_cast' => true,
49+
'no_short_echo_tag' => false,
50+
'no_singleline_whitespace_before_semicolons' => true,
51+
'no_spaces_around_offset' => true,
52+
'no_trailing_comma_in_list_call' => true,
53+
'no_trailing_comma_in_singleline_array' => true,
54+
'no_trailing_whitespace' => true,
55+
'no_trailing_whitespace_in_comment' => true,
56+
'no_unneeded_control_parentheses' => true,
57+
'no_unreachable_default_argument_value' => true,
58+
'no_unused_imports' => true,
59+
'no_useless_else' => true,
60+
'no_useless_return' => true,
61+
'no_whitespace_before_comma_in_array' => true,
62+
'no_whitespace_in_blank_line' => true,
63+
'normalize_index_brace' => true,
64+
'not_operator_with_space' => false,
65+
'not_operator_with_successor_space' => true,
66+
'object_operator_without_whitespace' => true,
67+
'ordered_class_elements' => true,
68+
'ordered_imports' => true,
69+
'php_unit_construct' => true,
70+
'php_unit_dedicate_assert' => true,
71+
'php_unit_fqcn_annotation' => true,
72+
'php_unit_strict' => true,
73+
// 'phpdoc_add_missing_param_annotation' => true,
74+
'phpdoc_align' => true,
75+
'phpdoc_annotation_without_dot' => true,
76+
'phpdoc_indent' => true,
77+
'phpdoc_inline_tag' => true,
78+
'phpdoc_no_access' => true,
79+
'phpdoc_no_alias_tag' => ['property-read' => 'property', 'property-write' => 'property', 'type' => 'var'],
80+
'phpdoc_no_empty_return' => true,
81+
'phpdoc_no_package' => true,
82+
// 'phpdoc_no_useless_inheritdoc' => true,
83+
'phpdoc_order' => true,
84+
'phpdoc_return_self_reference' => true,
85+
'phpdoc_scalar' => true,
86+
'phpdoc_separation' => false,
87+
'phpdoc_single_line_var_spacing' => true,
88+
// 'phpdoc_summary' => true,
89+
'phpdoc_to_comment' => true,
90+
'phpdoc_trim' => true,
91+
'phpdoc_types' => true,
92+
'phpdoc_var_without_name' => true,
93+
'pow_to_exponentiation' => true,
94+
// 'pre_increment' => true,
95+
'protected_to_private' => true,
96+
'psr0' => true,
97+
'psr4' => true,
98+
'random_api_migration' => true,
99+
'return_type_declaration' => ['space_before' => 'one'],
100+
'self_accessor' => true,
101+
'short_scalar_cast' => true,
102+
// 'silenced_deprecation_error' => true,
103+
// 'simplified_null_return' => true,
104+
'single_blank_line_before_namespace' => false,
105+
'single_quote' => true,
106+
'space_after_semicolon' => true,
107+
'standardize_not_equals' => true,
108+
// 'strict_comparison' => true,
109+
'ternary_operator_spaces' => true,
110+
'strict_param' => true,
111+
'ternary_to_null_coalescing' => false,
112+
// 'trailing_comma_in_multiline_array' => true,
113+
'trim_array_spaces' => true,
114+
'unary_operator_spaces' => true,
115+
'whitespace_after_comma_in_array' => true
116+
))
117+
->setFinder(
118+
PhpCsFixer\Finder::create()
119+
->in(__DIR__)
120+
)->setLineEnding("\n");

Diff for: .travis.yml

+27-4
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,49 @@ language: php
22

33
sudo: false
44

5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
59
dist: trusty
610

11+
branches:
12+
only:
13+
- master
14+
715
git:
816
depth: 5
917

1018
php:
1119
- 5.6
1220
- 7.0
1321
- 7.1
22+
- 7.2
1423
- hhvm
1524
- nightly
16-
25+
1726
matrix:
1827
fast_finish: true
28+
include:
29+
- php: 7.1
30+
env: PHPCS=PSR2
31+
1932
allow_failures:
2033
- php: nightly
2134

2235
before_script:
23-
- composer self-update
24-
- composer install
36+
- export PATH="./vendor/bin:$PATH"
37+
- travis_retry composer self-update
38+
- travis_retry composer install --no-interaction --prefer-source --dev
2539

2640
script:
27-
- composer test
41+
- phpunit
42+
- |
43+
if [[ "$PHPCS" ]] ; then
44+
phpcs --standard=phpcs.xml $(find . -name '*.php')
45+
phpmd src,tests text ./phpmd.xml
46+
fi
47+
phpunit --coverage-clover=coverage.xml
48+
49+
after_success:
50+
- bash <(curl -s https://codecov.io/bash)

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## 1.1.6 - 2017-11-09
4+
5+
* Implemented `PHP Mess Detector` to detect inconsistencies in code styles.
6+
7+
* Implemented `PHP Code Beautifier and Fixer` to fixing errors automatically.
8+
9+
* Implemented `PHP Coding Standards Fixer` to organize PHP code automatically according to PSR standards.
10+
311
## 1.1.5 - 2017-11-02
412

513
* Implemented `PSR-4 autoloader standard` from all library files.

Diff for: CONDUCT.md

+63-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,73 @@
1-
# Contributor Code of Conduct
1+
# Contributor Covenant Code of Conduct
22

3-
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
3+
## Our Pledge
44

5-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
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
622

723
Examples of unacceptable behavior by participants include:
824

9-
* The use of sexualized language or imagery
10-
* Personal attacks
11-
* Trolling or insulting/derogatory comments
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
1228
* Public or private harassment
13-
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14-
* Other unethical or unprofessional conduct.
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 [INSERT EMAIL ADDRESS]. 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.
1563

16-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
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.
1767

18-
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations.
68+
## Attribution
1969

20-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
2172

22-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
73+
[homepage]: https://www.contributor-covenant.org

Diff for: README-ES.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -135,28 +135,39 @@ Ejecutar pruebas de estándares de código [PSR2](http://www.php-fig.org/psr/psr
135135

136136
$ composer phpcs
137137

138+
Ejecutar pruebas con [PHP Mess Detector](https://phpmd.org/) para detectar inconsistencias en el estilo de codificación:
139+
140+
$ composer phpmd
141+
138142
Ejecutar todas las pruebas anteriores:
139143

140144
$ composer tests
141145

142146
## ☑ Tareas pendientes
143147

144-
- [x] Completar tests
145-
- [x] Mejorar la documentación
148+
- [ ] Añadir nueva funcionalidad
149+
- [ ] Mejorar pruebas
150+
- [ ] Mejorar documentación
151+
- [ ] Refactorizar código
146152

147153
## Contribuir
148154

149-
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
150-
1. Bifurca la rama del repositorio en GitHub para iniciar la operación de ajuste.
151-
1. Escribe una o más pruebas para la nueva característica o expón el error.
152-
1. Haz cambios en el código para implementar la característica o reparar el fallo.
153-
1. Envía pull request para fusionar los cambios y que sean publicados.
155+
Si deseas colaborar, puedes echar un vistazo a la lista de
156+
[issues](https://github.com/Josantonius/PHP-LoadTime/issues) o [tareas pendientes](#-tareas-pendientes).
157+
158+
**Pull requests**
154159

155-
Esto está pensado para proyectos grandes y de larga duración.
160+
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
161+
* Ejecuta el comando `composer install` para instalar dependencias.
162+
Esto también instalará las [dependencias de desarrollo](https://getcomposer.org/doc/03-cli.md#install).
163+
* Ejecuta el comando `composer fix` para estandarizar el código.
164+
* Ejecuta las [pruebas](#tests).
165+
* Crea una nueva rama (**branch**), **commit**, **push** y envíame un
166+
[pull request](https://help.github.com/articles/using-pull-requests).
156167

157168
## Repositorio
158169

159-
Los archivos de este repositorio se crearon y subieron automáticamente con [Reposgit Creator](https://github.com/Josantonius/BASH-Reposgit).
170+
La estructura de archivos de este repositorio se creó con [PHP-Skeleton](https://github.com/Josantonius/PHP-Skeleton).
160171

161172
## Licencia
162173

0 commit comments

Comments
 (0)