Skip to content

Commit

Permalink
Merge pull request #11 from cakephp/psr2
Browse files Browse the repository at this point in the history
Mostly implement psr2 code standards
  • Loading branch information
AD7six committed Dec 23, 2014
2 parents 1b56811 + f01bcf3 commit bde546d
Show file tree
Hide file tree
Showing 112 changed files with 9,882 additions and 9,371 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ matrix:
- php: 5.4
env: RUN_COVERAGE=1 RUN_TESTS=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'

allow_failures:
- php: 5.4
env: RUN_CS=1 RUN_TESTS=0 INSTALL_DEPS=0

before_script:
- sh -c "if [ '$INSTALL_DEPS' = '1' ]; then composer self-update; fi"
- sh -c "if [ '$INSTALL_DEPS' = '1' ]; then composer install --no-interaction --dev; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then composer require cakephp/cakephp-codesniffer:*; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then composer require 'squizlabs/php_codesniffer=*'; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then mkdir -p build/logs; fi"

Expand All @@ -41,7 +44,7 @@ before_script:

script:
- sh -c "if [ '$RUN_TESTS' = '1' ]; then phpunit --stderr; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=CakePHP ./src ./tests; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src ./tests; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi"

Expand Down

0 comments on commit bde546d

Please sign in to comment.