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

Commit c200c2e

Browse files
committed
Updated to 1.1.8 version
1 parent 609bd0d commit c200c2e

29 files changed

+668
-663
lines changed

.gitattributes

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

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

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:
@@ -27,7 +31,7 @@ php:
2731
- 7.2
2832
- hhvm
2933
- nightly
30-
34+
3135
matrix:
3236
fast_finish: true
3337
include:
@@ -48,7 +52,8 @@ script:
4852
- phpunit
4953
- |
5054
if [[ "$PHPCS" ]] ; then
51-
phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php')
55+
phpcs --standard=phpcs.xml $(find . -name '*.php')
56+
phpmd src,tests text ./phpmd.xml
5257
fi
5358
phpunit --coverage-clover=coverage.xml
5459

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.8 - 2017-11-08
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.7 - 2017-10-26
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: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,6 @@ Para ejecutar las [pruebas](tests) necesitarás [Composer](http://getcomposer.or
621621

622622
$ cd PHP-Database
623623

624-
$ mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS phpunit CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY ''; GRANT ALL ON phpunit.* TO 'travis'@'127.0.0.1'; FLUSH PRIVILEGES;"
625-
626624
$ composer install
627625

628626
Ejecutar pruebas unitarias con [PHPUnit](https://phpunit.de/):
@@ -633,35 +631,43 @@ Ejecutar pruebas de estándares de código [PSR2](http://www.php-fig.org/psr/psr
633631

634632
$ composer phpcs
635633

634+
Ejecutar pruebas con [PHP Mess Detector](https://phpmd.org/) para detectar inconsistencias en el estilo de codificación:
635+
636+
$ composer phpmd
637+
636638
Ejecutar todas las pruebas anteriores:
637639

638640
$ composer tests
639641

640642
## ☑ Tareas pendientes
641643

642-
- [x] Completar tests
644+
- [ ] Añadir nueva funcionalidad
645+
- [ ] Mejorar pruebas
646+
- [ ] Mejorar documentación
643647
- [ ] Refactorizar código
644-
- [ ] Agregar métodos para consultas con SQL joins
645-
- [ ] Completar proveedor para MSSQL
646-
- [x] Mejorar la documentación
647648

648649
## Manejador de excepciones
649650

650651
Esta biblioteca utiliza [control de excepciones](src/Exception) que puedes personalizar a tu gusto.
651652

652653
## Contribuir
653654

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

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

662668
## Repositorio
663669

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

666672
## Licencia
667673

0 commit comments

Comments
 (0)