Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostly implement psr2 code standards #11

Merged
merged 29 commits into from
Dec 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
096fbd9
Commence the pain
AD7six Dec 17, 2014
35e0602
Initial psr2 fixes
AD7six Dec 17, 2014
d8aa345
add an editor config file
AD7six Dec 17, 2014
6bce1e7
Doc block indentation
AD7six Dec 17, 2014
e859776
Basic fixes to bake templates
AD7six Dec 17, 2014
e09bd77
Fix end braces in tempalte files
AD7six Dec 17, 2014
38d3778
The fixer renamed all the class tests to match the filename
AD7six Dec 17, 2014
cc823b2
Correct braces in expectation
AD7six Dec 17, 2014
ff7eb3e
Manually apply tab->spaces
AD7six Dec 17, 2014
a4a037b
Indent with spaces, not tabs
AD7six Dec 17, 2014
d606c3c
Some tabs that got away
AD7six Dec 17, 2014
04095bc
Replace tab characters in strings
AD7six Dec 17, 2014
1534a7d
Remove duplicate test file
AD7six Dec 17, 2014
590fbee
Missing one space of indentation
AD7six Dec 17, 2014
c59b369
Some more tabs that got away
AD7six Dec 17, 2014
2bb0e6b
Run phpcs's fixer
AD7six Dec 17, 2014
324df97
Apply allow rules before doing anything
AD7six Dec 23, 2014
4510165
Delete unwanted blank lines
AD7six Dec 23, 2014
98d45cc
Merge branch 'master' into psr2
AD7six Dec 23, 2014
0acd690
Merge branch 'master' into psr2
AD7six Dec 23, 2014
16156d4
Whitespace fix
AD7six Dec 23, 2014
15d57a7
Fix line length related psr fails
AD7six Dec 23, 2014
e34fb99
Fix delete method test fails
AD7six Dec 23, 2014
3ebd0fd
Tests should not be baking into the APP folder
AD7six Dec 23, 2014
8e8fdec
That blank line is a phpcs fail
AD7six Dec 23, 2014
250b31d
Correct tests test case to account for TESTS
AD7six Dec 23, 2014
9256cdf
Fix line-length phpcs errors in tests
AD7six Dec 23, 2014
a701c96
Move test classes to their own files
AD7six Dec 23, 2014
f01bcf3
Add phpcs build to allow failures list.
ADmad Dec 23, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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