1 Star 0 Fork 0

wfdaj/tempest-framework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.php-cs-fixer.dist.php 4.22 KB
一键复制 编辑 原始数据 按行查看 历史
<?php
declare(strict_types=1);
$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.cache.php')
->notPath('Tempest/Router/src/Route.php') // phpcs doesn't yet support property hooks in interfaces
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setCacheFile('.cache/fixer/cs-fixer.cache')
->setRules([
'@PSR12' => true,
'@PHP84Migration' => true,
'ordered_attributes' => true,
'ordered_traits' => true,
'attribute_empty_parentheses' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false
],
'get_class_to_class_keyword' => true,
'cast_spaces' => true,
'single_space_around_construct' => true,
'heredoc_indentation' => true,
'types_spaces' => true,
'single_quote' => true,
'no_short_bool_cast' => true,
'explicit_string_variable' => true,
'no_extra_blank_lines' => [
'tokens' => [
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'square_brace_block',
'switch',
'throw',
'use',
],
],
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => [
'class',
'function',
'const',
],
],
'no_unused_imports' => true,
'no_unneeded_import_alias' => true,
'blank_line_between_import_groups' => false,
'single_import_per_statement' => true,
'no_leading_import_slash' => true,
'fully_qualified_strict_types' => [
'import_symbols' => true,
'phpdoc_tags' => [],
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => [
'elements' => ['arrays', 'arguments', 'parameters', 'match'],
],
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
'declare_strict_types' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
// Test styling
'php_unit_data_provider_name' => [
'prefix' => 'provide_',
'suffix' => '_cases',
],
'php_unit_data_provider_return_type' => true,
'php_unit_data_provider_static' => [
'force' => true,
],
'php_unit_dedicate_assert_internal_type' => true,
'php_unit_internal_class' => true,
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'php_unit_expectation' => [
'target' => 'newest',
],
'php_unit_mock' => [
'target' => 'newest',
],
'php_unit_mock_short_will_return' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_size_class' => false,
'php_unit_test_annotation' => [
'style' => 'prefix',
],
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
])
->setFinder($finder);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wfdaj/tempest-framework.git
git@gitee.com:wfdaj/tempest-framework.git
wfdaj
tempest-framework
tempest-framework
main

搜索帮助