Skip to content

Commit

Permalink
Add php fixer files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Jan 4, 2018
1 parent 4cb3e58 commit b6b9716
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

return require_once __DIR__.'/.php_cs.dist';
42 changes: 42 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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('tests')
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
//'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;

0 comments on commit b6b9716

Please sign in to comment.