1 Star 0 Fork 0

TeddyPHP/teddy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.php-cs-fixer.php 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
Fung Wing Kit 提交于 2022-04-06 17:30 . commit
<?php declare(strict_types=1);
/**
* This file is part of Teddy Framework.
*
* @author Fung Wing Kit <wengee@gmail.com>
* @version 2022-04-06 17:30:34 +0800
*/
date_default_timezone_set('Asia/Shanghai');
$timestamp = date('Y-m-d H:i:s O');
$header = <<<EOF
This file is part of Teddy Framework.
@author Fung Wing Kit <wengee@gmail.com>
@version {$timestamp}
EOF;
$finder = PhpCsFixer\Finder::create()
->exclude('/vendor/*')
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'bottom',
],
'blank_line_after_opening_tag' => false,
'linebreak_after_opening_tag' => false,
'binary_operator_spaces' => [
'operators' => [
'=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
],
],
])
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(false)
;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/teddyphp/teddy.git
git@gitee.com:teddyphp/teddy.git
teddyphp
teddy
teddy
master

搜索帮助