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

Commit 464d7d8

Browse files
committed
Updated to 1.1.4 version
1 parent e292f01 commit 464d7d8

File tree

17 files changed

+503
-279
lines changed

17 files changed

+503
-279
lines changed

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/tests export-ignore
22
/resources export-ignore
3-
/vendor export-ignore
43
/node_modules export-ignore
54
.gitattributes export-ignore
65
package-lock.json export-ignore
@@ -9,11 +8,12 @@ gulpfile.js export-ignore
98
_config.yml export-ignore
109
.travis.yml export-ignore
1110
CHANGELOG.md export-ignore
12-
phpunit.xml.dist export-ignore
1311
CONDUCT.md export-ignore
1412
contributors.txt export-ignore
1513
README.md export-ignore
1614
README-ES.md export-ignore
1715
.editorconfig export-ignore
1816
composer.lock export-ignore
19-
phpcs.ruleset.xml export-ignore
17+
phpcs.xml export-ignore
18+
phpunit.xml export-ignore
19+
phpmd.xml export-ignore

.gitignore

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
phpunit.xml
2-
composer.phar
3-
composer.lock
4-
package-lock.json
5-
composer-test.lock
1+
.git*/
62
vendor/
7-
build/artifacts/
8-
artifacts/
93
node_modules/
10-
docs/_build
114
docs/*.pyc
12-
.git*/
5+
docs/_build
6+
build/artifacts/
7+
composer.phar
8+
package-lock.json
9+
composer.lock
10+
composer-test.lock
11+
phpcbf-fixed.diff
1312
.idea
1413
.DS_STORE
14+
.php_cs.cache

.php_cs.dist

Lines changed: 120 additions & 0 deletions
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

Lines changed: 7 additions & 2 deletions
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

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

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

CONDUCT.md

Lines changed: 63 additions & 12 deletions
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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP Logger library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/logger/v/stable)](https://packagist.org/packages/josantonius/logger) [![Total Downloads](https://poser.pugx.org/josantonius/logger/downloads)](https://packagist.org/packages/josantonius/logger) [![Latest Unstable Version](https://poser.pugx.org/josantonius/logger/v/unstable)](https://packagist.org/packages/josantonius/logger) [![License](https://poser.pugx.org/josantonius/logger/license)](https://packagist.org/packages/josantonius/logger) [![Travis](https://travis-ci.org/Josantonius/PHP-Logger.svg)](https://travis-ci.org/Josantonius/PHP-Logger)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/Logger/v/stable)](https://packagist.org/packages/josantonius/Logger) [![Latest Unstable Version](https://poser.pugx.org/josantonius/Logger/v/unstable)](https://packagist.org/packages/josantonius/Logger) [![License](https://poser.pugx.org/josantonius/Logger/license)](LICENSE) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a3b8254dfc74493fb162fc322e083f88)](https://www.codacy.com/app/Josantonius/PHP-Logger?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Josantonius/PHP-Logger&amp;utm_campaign=Badge_Grade) [![Total Downloads](https://poser.pugx.org/josantonius/Logger/downloads)](https://packagist.org/packages/josantonius/Logger) [![Travis](https://travis-ci.org/Josantonius/PHP-Logger.svg)](https://travis-ci.org/Josantonius/PHP-Logger) [![PSR2](https://img.shields.io/badge/PSR-2-1abc9c.svg)](http://www.php-fig.org/psr/psr-2/) [![PSR4](https://img.shields.io/badge/PSR-4-9b59b6.svg)](http://www.php-fig.org/psr/psr-4/) [![CodeCov](https://codecov.io/gh/Josantonius/PHP-Logger/branch/master/graph/badge.svg)](https://codecov.io/gh/Josantonius/PHP-Logger)
44

55
[Spanish version](README-ES.md)
66

@@ -269,28 +269,39 @@ Ejecutar pruebas de estándares de código [PSR2](http://www.php-fig.org/psr/psr
269269
270270
$ composer phpcs
271271
272+
Ejecutar pruebas con [PHP Mess Detector](https://phpmd.org/) para detectar inconsistencias en el estilo de codificación:
273+
274+
$ composer phpmd
275+
272276
Ejecutar todas las pruebas anteriores:
273277
274278
$ composer tests
275279
276280
## ☑ Tareas pendientes
277281
278-
- [x] Completar tests
279-
- [x] Mejorar la documentación
282+
- [ ] Añadir nueva funcionalidad
283+
- [ ] Mejorar pruebas
284+
- [ ] Mejorar documentación
285+
- [ ] Refactorizar código
280286
281287
## Contribuir
282288
283-
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
284-
1. Bifurca la rama del repositorio en GitHub para iniciar la operación de ajuste.
285-
1. Escribe una o más pruebas para la nueva característica o expón el error.
286-
1. Haz cambios en el código para implementar la característica o reparar el fallo.
287-
1. Envía pull request para fusionar los cambios y que sean publicados.
289+
Si deseas colaborar, puedes echar un vistazo a la lista de
290+
[issues](https://github.com/Josantonius/PHP-Logger/issues) o [tareas pendientes](#-tareas-pendientes).
291+
292+
**Pull requests**
288293
289-
Esto está pensado para proyectos grandes y de larga duración.
294+
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
295+
* Ejecuta el comando `composer install` para instalar dependencias.
296+
Esto también instalará las [dependencias de desarrollo](https://getcomposer.org/doc/03-cli.md#install).
297+
* Ejecuta el comando `composer fix` para estandarizar el código.
298+
* Ejecuta las [pruebas](#tests).
299+
* Crea una nueva rama (**branch**), **commit**, **push** y envíame un
300+
[pull request](https://help.github.com/articles/using-pull-requests).
290301
291302
## Repositorio
292303
293-
Los archivos de este repositorio se crearon y subieron automáticamente con [Reposgit Creator](https://github.com/Josantonius/BASH-Reposgit).
304+
La estructura de archivos de este repositorio se creó con [PHP-Skeleton](https://github.com/Josantonius/PHP-Skeleton).
294305
295306
## Licencia
296307

0 commit comments

Comments
 (0)