加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.php-cs-fixer.php 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
chenzifan 提交于 2022-09-22 09:48 . herosphp upload
<?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);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化