-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
199 additions
and
167 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 |
---|---|---|
@@ -1,39 +1,29 @@ | ||
<?php | ||
|
||
$fileHeaderComment = <<<COMMENT | ||
This file is part of the EasyDeploy project. | ||
(c) Javier Eguiluz <javier.eguiluz@gmail.com> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
COMMENT; | ||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true) | ||
->exclude(array('doc', 'vendor')) | ||
->files() | ||
->name('*.php') | ||
; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setUsingCache(true) | ||
->setRiskyAllowed(true) | ||
->setFinder($finder) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'], | ||
'linebreak_after_opening_tag' => true, | ||
'list_syntax' => ['syntax' => 'short'], | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'binary_operator_spaces' => array( | ||
'align_double_arrow' => false, | ||
), | ||
'combine_consecutive_unsets' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'pow_to_exponentiation' => true, | ||
'random_api_migration' => true, | ||
'return_type_declaration' => ['space_before' => 'one'], | ||
'semicolon_after_instruction' => true, | ||
'phpdoc_summary' => false, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'ternary_to_null_coalescing' => true, | ||
]) | ||
->setCacheFile(__DIR__.'/.php_cs.cache') | ||
; |
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,42 @@ | ||
language: php | ||
|
||
sudo: false | ||
|
||
git: | ||
depth: 1 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: nightly | ||
env: | ||
- SYMFONY_VERSION="dev-master" | ||
- CHECK_PHP_SYNTAX="no" | ||
- php: 7.1 | ||
env: | ||
- SYMFONY_VERSION="3.2.*" | ||
- CHECK_PHP_SYNTAX="yes" | ||
allow_failures: | ||
- php: nightly | ||
|
||
before_install: | ||
- stty cols 120 | ||
- INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo memory_limit = -1 >> $INI_FILE | ||
- echo session.gc_probability = 0 >> $INI_FILE | ||
- echo opcache.enable_cli = 1 >> $INI_FILE | ||
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini | ||
- composer self-update | ||
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; | ||
|
||
install: | ||
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then composer require --dev --no-update friendsofphp/php-cs-fixer; fi; | ||
- composer update --prefer-dist --no-interaction --no-suggest --no-progress --ansi | ||
|
||
script: | ||
- vendor/bin/phpunit | ||
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then php vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix; 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
Oops, something went wrong.