mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-05 13:07:52 +00:00
3ac658c397
* Add new cs-fixer rules and run them * Do not align double arrows/equals
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
return PhpCsFixer\Config::create()
|
|
->setRules([
|
|
'@PSR2' => true,
|
|
'array_syntax' => ['syntax' => 'short'],
|
|
'binary_operator_spaces' => ['align_double_arrow' => false, 'align_equals' => false],
|
|
'blank_line_after_opening_tag' => true,
|
|
'blank_line_before_return' => true,
|
|
'cast_spaces' => true,
|
|
'concat_space' => ['spacing' => 'none'],
|
|
'declare_strict_types' => true,
|
|
'method_separation' => true,
|
|
'no_blank_lines_after_class_opening' => true,
|
|
'no_spaces_around_offset' => ['positions' => ['inside', 'outside']],
|
|
'no_unneeded_control_parentheses' => true,
|
|
'no_unused_imports' => true,
|
|
'phpdoc_align' => true,
|
|
'phpdoc_no_access' => true,
|
|
'phpdoc_separation' => true,
|
|
'pre_increment' => true,
|
|
'single_quote' => true,
|
|
'trim_array_spaces' => true,
|
|
'single_blank_line_before_namespace' => true,
|
|
])
|
|
->setFinder(
|
|
PhpCsFixer\Finder::create()
|
|
->in(__DIR__ . '/src')
|
|
->in(__DIR__ . '/tests')
|
|
)
|
|
->setRiskyAllowed(true)
|
|
->setUsingCache(false);
|