9 Star 6 Fork 0

RockYang / herosphp-app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.php-cs-fixer.php 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
chenzifan 提交于 2022-09-14 09:45 . init demo app by v4.0.0
<?php
/**
* Php-Cs-Fixer config file
*/
use PhpCsFixer\Config;
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'class_attributes_separation' => [
'elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none' ],
],
'array_syntax' => [
'syntax' => 'short'
],
'list_syntax' => [
'syntax' => 'short'
],
// 'concat_space' => [
// 'spacing' => 'one'
// ],
'blank_line_before_statement' => [
'statements' => [
'declare',
],
],
'ordered_imports' => [
'imports_order' => [
'class', 'function', 'const',
],
'sort_algorithm' => 'alpha',
],
'combine_consecutive_unsets' => true,
'declare_strict_types' => false,
'linebreak_after_opening_tag' => true,
'lowercase_static_reference' => true,
'no_useless_else' => true,
//'not_operator_with_successor_space' => true,
'not_operator_with_space' => false,
'ordered_class_elements' => true,
'php_unit_strict' => false,
'phpdoc_separation' => false,
'multiline_comment_opening_closing' => true,
'single_quote' => true,
'no_unused_imports' => true,
'no_singleline_whitespace_before_semicolons' => true,
'self_accessor' => true,
'binary_operator_spaces' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_blank_lines_after_class_opening' => true,
'include' => true,
'no_trailing_comma_in_list_call' => true,
'no_leading_namespace_whitespace' => true,
'standardize_not_equals' => true,
])
// ->setFinder(
// PhpCsFixer\Finder::create()
// ->exclude('vendor')
// ->in(__DIR__)
// )
->setUsingCache(true);
1
https://gitee.com/blackfox/herosphp-app.git
git@gitee.com:blackfox/herosphp-app.git
blackfox
herosphp-app
herosphp-app
master

搜索帮助