forked from thephpleague/csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- The package uses PHP CS Fixer to validate the coding standard - Improve Travis settings - Improve Scrutinizer settings
- Loading branch information
Showing
26 changed files
with
216 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
$header = <<<'EOF' | ||
This file is part of League\CSV, a CSV manipulation library | ||
@copyright 2015 Ignace Nyamagana Butera. All rights reserved | ||
@license MIT See LICENSE.md at the root of the project for more info | ||
EOF; | ||
|
||
Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); | ||
|
||
return Symfony\CS\Config\Config::create() | ||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) | ||
->fixers([ | ||
'ordered_use', | ||
'unused_use', | ||
'remove_lines_between_uses', | ||
'remove_leading_slash_use', | ||
'phpdoc_no_empty_return', | ||
'phpdoc_params', | ||
'phpdoc_to_comment', | ||
'phpdoc_order', | ||
'short_array_syntax', | ||
'single_array_no_trailing_comma', | ||
'multiline_array_trailing_comma', | ||
'concat_without_spaces', | ||
'single_quote', | ||
'ternary_spaces', | ||
'operators_spaces', | ||
'new_with_braces', | ||
'-psr0', | ||
]) | ||
->finder( | ||
Symfony\CS\Finder\DefaultFinder::create() | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/test') | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
sudo: false | ||
|
||
matrix: | ||
include: | ||
- php: 5.4 | ||
env: | ||
- COLLECT_COVERAGE=true | ||
- php: 5.5 | ||
env: | ||
- COLLECT_COVERAGE=true | ||
- php: 5.6 | ||
env: | ||
- COLLECT_COVERAGE=true | ||
- EXECUTE_CS_CHECK=true | ||
- php: 7.0 | ||
- php: hhvm | ||
allow_failures: | ||
- php: 7.0 | ||
fast_finish: true | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- composer self-update | ||
- composer validate | ||
|
||
before_script: | ||
- travis_retry composer self-update | ||
- travis_retry composer update --no-interaction --prefer-source | ||
install: | ||
- travis_retry composer install --prefer-dist | ||
|
||
script: | ||
- phpunit --coverage-text --coverage-clover=coverage.clover | ||
- if [ "$COLLECT_COVERAGE" != "true" ]; then vendor/bin/phpunit; fi | ||
- if [ "$COLLECT_COVERAGE" == "true" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi | ||
- if [ "$EXECUTE_CS_CHECK" == "true" ]; then vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi | ||
|
||
after_script: | ||
- bash -c 'if [[ "$TRAVIS_PHP_VERSION" != "hhvm" && "$TRAVIS_PHP_VERSION" != "7.0" ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi;' | ||
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi | ||
- if [ "$COLLECT_COVERAGE" == "true" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.