Skip to content

Commit

Permalink
Add php-cs-fixer.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 1, 2015
1 parent d01f62f commit 9a42579
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/build.xml export-ignore
Expand Down
25 changes: 25 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->files()
->in(__DIR__.'/src')
->ignoreDotFiles(true)
->ignoreVCS(true);

return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers([
'-psr0',
'concat_without_spaces',
'duplicate_semicolon',
'empty_return',
'extra_empty_lines',
'unused_use',
'single_array_no_trailing_comma',
'remove_leading_slash_use',
'remove_lines_between_uses',
'short_array_syntax',
'spaces_cast',
'whitespacy_lines',
])
->finder($finder);

0 comments on commit 9a42579

Please sign in to comment.