1 Star 0 Fork 26

googoler / Discuz-Q-Web-Admin

forked from Discuz / Discuz-Q-Web-Admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.php_cs 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
对信 提交于 2022-10-01 22:27 . UniApp 后端
<?php
$header = <<<'EOF'
Copyright (C) 2020 Tencent Cloud.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/app')
->in(__DIR__.'/framework')
->in(__DIR__.'/database');
$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'header_comment' => [
'commentType' => 'PHPDoc',
'header' => $header,
],
'array_syntax' => [
'syntax' => 'short'
],
'single_quote' => true,
'class_attributes_separation' => true,
'no_unused_imports' => true,
'standardize_not_equals' => true,
])
->setFinder($finder)
;
// special handling of fabbot.io service if it's using too old PHP CS Fixer version
if (false !== getenv('FABBOT_IO')) {
try {
PhpCsFixer\FixerFactory::create()
->registerBuiltInFixers()
->registerCustomFixers($config->getCustomFixers())
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules()));
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) {
$config->setRules([]);
} catch (UnexpectedValueException $e) {
$config->setRules([]);
} catch (InvalidArgumentException $e) {
$config->setRules([]);
}
}
return $config;
JavaScript
1
https://gitee.com/googoler/discuz-q-web-admin.git
git@gitee.com:googoler/discuz-q-web-admin.git
googoler
discuz-q-web-admin
Discuz-Q-Web-Admin
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891