Skip to content

Commit

Permalink
php-cs-fixer 2.0 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioBlazek committed Jul 18, 2017
1 parent 099c406 commit 275a482
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions .php_cs
@@ -1,28 +1,29 @@
<?php

return Symfony\CS\Config\Config::create()
->setUsingLinter(false)
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'concat_with_spaces',
'-concat_without_spaces',
'-empty_return',
'-phpdoc_params',
'-phpdoc_separation',
'-phpdoc_to_comment',
'-spaces_cast',
'-blankline_after_open_tag',
'-single_blank_line_before_namespace',
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => array('syntax' => 'long'),
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => false,
'phpdoc_order' => true,
'phpdoc_no_alias_tag' => false,
'psr4' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
])
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->setFinder(
PhpCsFixer\Finder::create()
->exclude(['vendor'])
->in(__DIR__)
->exclude([
'extension',
'vendor',
'Tests/_fixtures',
])
->files()->name('*.php')
)
;

0 comments on commit 275a482

Please sign in to comment.