StyleCI & PHP Coding Standards Fixer > update configuration

This commit is contained in:
Meritoo
2018-06-16 14:15:35 +02:00
parent c443ef22d7
commit c99a099c31
3 changed files with 25 additions and 20 deletions

View File

@@ -1,13 +1,6 @@
<?php
$finder = PhpCsFixer\Finder::create()
/*
* Do not verify:
* - all DependencyInjection/Configuration classes: the Configuration.php files
* - autoloader from /app directory: autoload.php
*/
->notPath('/DependencyInjection\/Configuration\.php/')
->notPath('/autoload\.php/')
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
@@ -16,15 +9,20 @@ $finder = PhpCsFixer\Finder::create()
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'phpdoc_summary' => false,
'phpdoc_separation' => false,
'phpdoc_align' => false,
'cast_spaces' => false,
'binary_operator_spaces' => [
'align_double_arrow' => true,
],
'blank_line_before_return' => false,
'cast_spaces' => false,
// "concat_space" instead of "concat_with_spaces" option used by StyleCI
'concat_space' => [
'spacing' => 'one',
],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => false,
'phpdoc_order' => true,
'phpdoc_separation' => false,
'phpdoc_summary' => false,
'trim_array_spaces' => false,
])
->setFinder($finder);

View File

@@ -1,9 +1,15 @@
preset: recommended
preset: symfony
enabled:
- binary_operator_spaces
- concat_with_spaces
- phpdoc_add_missing_param_annotation
- phpdoc_order
disabled:
- phpdoc_annotation_without_dot
- phpdoc_summary
- blank_line_before_return
- cast_spaces
- concat_without_spaces
- phpdoc_align
- phpdoc_separation
- phpdoc_summary
- trim_array_spaces
- array_indentation

View File

@@ -5,4 +5,5 @@ Common and useful classes, methods, exceptions etc.
1. Add this changelog
2. Reorganize documentation & update [Readme](README.md)
3. Docker > use project-related binaries globally
3. Docker: use project-related binaries globally
4. StyleCI & PHP Coding Standards Fixer: update configuration