From c99a099c317a9937a0745a587c09b5eb145057d9 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Sat, 16 Jun 2018 14:15:35 +0200 Subject: [PATCH] StyleCI & PHP Coding Standards Fixer > update configuration --- .php_cs.dist | 26 ++++++++++++-------------- .styleci.yml | 16 +++++++++++----- CHANGELOG.md | 3 ++- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index 4e1c7bd..fe6e788 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -1,13 +1,6 @@ notPath('/DependencyInjection\/Configuration\.php/') - ->notPath('/autoload\.php/') ->in([ __DIR__ . '/src', __DIR__ . '/tests', @@ -15,16 +8,21 @@ $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' => [ + '@Symfony' => true, + 'binary_operator_spaces' => [ 'align_double_arrow' => true, ], - 'concat_space' => [ + '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); diff --git a/.styleci.yml b/.styleci.yml index ee9083c..e8497fb 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index b08450d..e566c8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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