Skip to content

Commit

Permalink
style guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
hackzilla committed Jan 16, 2016
1 parent 15871c4 commit 5c42a28
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
20 changes: 5 additions & 15 deletions .php_cs
@@ -1,19 +1,9 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->in([__DIR__])
;
require_once __DIR__.'/vendor/sllh/php-cs-fixer-styleci-bridge/autoload.php';

use SLLH\StyleCIBridge\ConfigBridge;

return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'-psr0',
'newline_after_open_tag',
'ordered_use',
'long_array_syntax',
'php_unit_construct',
'php_unit_strict'
])
->setUsingCache(true)
->finder($finder)
return ConfigBridge::create()
->setUsingCache(true) // Enable the cache
;
13 changes: 13 additions & 0 deletions .styleci.yml
@@ -0,0 +1,13 @@
preset: symfony

enabled:
- align_double_arrow
- newline_after_open_tag
- ordered_use
- short_array_syntax
- php_unit_construct
- php_unit_strict

disabled:
- unalign_double_arrow
- unalign_equals
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -21,7 +21,9 @@
"knplabs/knp-paginator-bundle": "~2.3"
},
"require-dev": {
"symfony/form": "~2.7"
"symfony/form": "~2.7",
"symfony/phpunit-bridge": "^2.7 || ^3.0",
"sllh/php-cs-fixer-styleci-bridge": "^1.5"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 5c42a28

Please sign in to comment.