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

Add travis tests #14

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated PHP-CS-Fixer config
  • Loading branch information
javiereguiluz committed Mar 31, 2018
commit b43231ef90cda2794744105e09be191d3b6b20b7
40 changes: 15 additions & 25 deletions .php_cs
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')
;