Add CI files

pull/2458/head
jmontoyaa 8 years ago
parent c558014fa7
commit a1cf751b2a
  1. 2
      .gitattributes
  2. 3
      .php_cs
  3. 46
      .php_cs.dist

2
.gitattributes vendored

@ -5,6 +5,8 @@
.scrutinizer.yml export-ignore
.styleci.yml export-ignore
.travis.yml export-ignore
.php_cs.dist export-ignore
.php_cs export-ignore
codesize.xml export-ignore
phpcs.xml export-ignore

@ -0,0 +1,3 @@
<?php
return require_once __DIR__.'/.php_cs.dist';

@ -0,0 +1,46 @@
<?php
$header = '/* For licensing terms, see /license.txt */';
$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => [
'syntax' => 'short',
],
'header_comment' => [
'header' => $header,
],
'no_extra_consecutive_blank_lines' => true,
'no_php4_constructor' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'@PHP56Migration' => true,
'@PHP56Migration:risky' => true,
'@PHPUnit57Migration:risky' => true,
// To be tested before insertion:
// 'strict_comparison' => true,
// 'strict_param' => true,
// 'php_unit_strict' => true,
];
$finder = PhpCsFixer\Finder::create()
->exclude('app')
->exclude('documentation')
->exclude('vendor')
->exclude('tests')
->exclude('web')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
//'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;
Loading…
Cancel
Save