mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
StyleCI & PHP Coding Standards Fixer > update configuration
This commit is contained in:
26
.php_cs.dist
26
.php_cs.dist
@@ -1,13 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$finder = PhpCsFixer\Finder::create()
|
$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([
|
->in([
|
||||||
__DIR__ . '/src',
|
__DIR__ . '/src',
|
||||||
__DIR__ . '/tests',
|
__DIR__ . '/tests',
|
||||||
@@ -15,16 +8,21 @@ $finder = PhpCsFixer\Finder::create()
|
|||||||
|
|
||||||
return PhpCsFixer\Config::create()
|
return PhpCsFixer\Config::create()
|
||||||
->setRules([
|
->setRules([
|
||||||
'@Symfony' => true,
|
'@Symfony' => true,
|
||||||
'phpdoc_summary' => false,
|
'binary_operator_spaces' => [
|
||||||
'phpdoc_separation' => false,
|
|
||||||
'phpdoc_align' => false,
|
|
||||||
'cast_spaces' => false,
|
|
||||||
'binary_operator_spaces' => [
|
|
||||||
'align_double_arrow' => true,
|
'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',
|
'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);
|
->setFinder($finder);
|
||||||
|
|||||||
16
.styleci.yml
16
.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:
|
disabled:
|
||||||
- phpdoc_annotation_without_dot
|
- blank_line_before_return
|
||||||
- phpdoc_summary
|
|
||||||
- cast_spaces
|
- cast_spaces
|
||||||
- concat_without_spaces
|
- phpdoc_align
|
||||||
|
- phpdoc_separation
|
||||||
|
- phpdoc_summary
|
||||||
- trim_array_spaces
|
- trim_array_spaces
|
||||||
- array_indentation
|
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ Common and useful classes, methods, exceptions etc.
|
|||||||
|
|
||||||
1. Add this changelog
|
1. Add this changelog
|
||||||
2. Reorganize documentation & update [Readme](README.md)
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user