加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.php_cs.dist 1.89 KB
一键复制 编辑 原始数据 按行查看 历史
PabloKowalczyk 提交于 2019-12-25 09:03 . Update dev tools (#277)
<?php
declare(strict_types=1);
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'protected_to_private' => false,
'combine_consecutive_unsets' => true,
'combine_consecutive_issets' => true,
'compact_nullable_typehint' => true,
'declare_strict_types' => true,
'dir_constant' => true,
'ereg_to_preg' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'function_to_constant' => true,
'is_null' => true,
'modernize_types_casting' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'native_function_invocation' => true,
'no_alias_functions' => true,
'no_homoglyph_names' => true,
'no_php4_constructor' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_expectation' => true,
'php_unit_mock' => true,
'php_unit_namespaced' => true,
'random_api_migration' => true,
'strict_comparison' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
'void_return' => true,
'concat_space' => [
'spacing' => 'one',
],
'single_line_throw' => false,
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/config')
->append(
[
__FILE__,
__DIR__ . '/composer-install.php',
]
)
)
;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化