respect-validation/.php_cs
Henrique Moody f7a4180541
Run PHP Coding Standards Fixer on Travis
If after executing php-cs-fixer any file must be changed the build
should not pass.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-05-27 16:08:42 +02:00

31 lines
867 B
PHP

<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@PHP71Migration:risky' => true,
'phpdoc_align' => false,
'phpdoc_summary' => false,
'mb_str_functions' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'array_syntax' => ['syntax' => 'short'],
'no_short_echo_tag' => true,
])
->setCacheFile(
sprintf(
'%s/.php_cs.cache',
getenv('TRAVIS') ? getenv('HOME').'/.php-cs-fixer' : __DIR__
)
)
->setFinder(
PhpCsFixer\Finder::create()
->in(['library', 'tests'])
->name('*.php')
->name('*.phpt')
);