Skip to content

Commit

Permalink
Hello php-cs-fixer
Browse files Browse the repository at this point in the history
- php-cs-fixer added to require-dev
- config file added
  • Loading branch information
im-denisenko committed Jan 29, 2015
1 parent 302d023 commit 7b56732
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .php_cs
@@ -0,0 +1,19 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(['lib', 'test']);

$config = Symfony\CS\Config\Config::create()
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
// [contrib] Multi-line whitespace before closing semicolon are prohibited.
'multiline_spaces_before_semicolon',
// [contrib] There should be no blank lines before a namespace declaration.
'no_blank_lines_before_namespace',
// [contrib] Ordering use statements.
'ordered_use',
])
->finder($finder);

return $config;
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -18,7 +18,8 @@
"require-dev": {
"munkie/elasticsearch-thrift-php": "1.4.*",
"phpunit/phpunit": "4.1.*",
"guzzlehttp/guzzle": "4.2.*"
"guzzlehttp/guzzle": "4.2.*",
"fabpot/php-cs-fixer": "~1.4"
},
"suggest": {
"munkie/elasticsearch-thrift-php": "Allow using thrift transport",
Expand Down

0 comments on commit 7b56732

Please sign in to comment.