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

Commit ebf3dd1

Browse files
committedNov 9, 2017
Updated to 1.1.5 version
1 parent ed9ef5d commit ebf3dd1

16 files changed

+385
-143
lines changed
 

‎.gitattributes

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
/tests export-ignore
2-
.gitattributes export-ignore
3-
.gitignore export-ignore
4-
_config.yml export-ignore
5-
.travis.yml export-ignore
62
CHANGELOG.md export-ignore
7-
phpunit.xml.dist export-ignore
8-
CONDUCT.md export-ignore
9-
contributors.txt export-ignore
103
README.md export-ignore
11-
phpcs.ruleset.xml export-ignore
124
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
139
.editorconfig export-ignore
14-
composer.lock export-ignore
10+
.gitattributes export-ignore
11+
.gitignore export-ignore

‎.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-
vendor/
7-
docs/_build
8-
docs/*.pyc
9-
.git*/
9+
phpcbf-fixed.diff
1010
.idea
1111
.DS_STORE
12+
.php_cs.cache

‎.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");

‎.travis.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: php
22

33
sudo: false
44

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

711
branches:
@@ -18,7 +22,7 @@ php:
1822
- 7.2
1923
- hhvm
2024
- nightly
21-
25+
2226
matrix:
2327
fast_finish: true
2428
include:
@@ -37,7 +41,8 @@ script:
3741
- phpunit
3842
- |
3943
if [[ "$PHPCS" ]] ; then
40-
phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php')
44+
phpcs --standard=phpcs.xml $(find . -name '*.php')
45+
phpmd src,tests text ./phpmd.xml
4146
fi
4247
phpunit --coverage-clover=coverage.xml
4348

‎CHANGELOG.md

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

3+
## 1.1.5 - 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.4 - 2017-11-02
412

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

‎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

‎README-ES.md

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

289289
$ composer phpcs
290290

291+
Ejecutar pruebas con [PHP Mess Detector](https://phpmd.org/) para detectar inconsistencias en el estilo de codificación:
292+
293+
$ composer phpmd
294+
291295
Ejecutar todas las pruebas anteriores:
292296

293297
$ composer tests
294298

295299
## ☑ Tareas pendientes
296300

297-
- [x] Completar tests
298-
- [x] Mejorar la documentación
299-
- [ ] Completar tests para PUT
300-
- [ ] Completar tests para DEL
301+
- [ ] Añadir nueva funcionalidad
302+
- [ ] Mejorar pruebas
303+
- [ ] Mejorar documentación
304+
- [ ] Refactorizar código
301305

302306
## Contribuir
303307

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

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

312321
## Repositorio
313322

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

316325
## Licencia
317326

0 commit comments

Comments
 (0)
This repository has been archived.