23 Star 90 Fork 26

inhere/php-console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.php-cs-fixer.php 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
Inhere 提交于 2021-09-26 20:45 . style: run cs fix for all php files
<?php
$header = <<<'EOF'
The file is part of inhere/console
@author https://github.com/inhere
@homepage https://github.com/inhere/php-console
@license https://github.com/inhere/php-console/blob/master/LICENSE
EOF;
$rules = [
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short'
],
'list_syntax' => [
'syntax' => 'short'
],
'class_attributes_separation' => true,
'declare_strict_types' => true,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
],
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'bottom'
],
'no_unused_imports' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
'single_quote' => true,
'standardize_not_equals' => true,
'void_return' => true, // add :void for method
];
$finder = PhpCsFixer\Finder::create()
->exclude('docs')
->exclude('vendor')
->exclude('resource')
->in(__DIR__);
return (new PhpCsFixer\Config)
->setRiskyAllowed(true)
->setRules($rules)
->setFinder($finder)
->setUsingCache(false);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/inhere/php-console.git
git@gitee.com:inhere/php-console.git
inhere
php-console
php-console
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385