1 Star 0 Fork 1

LarvaTech / laravel-geoip

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.php-cs-fixer.php 2.80 KB
一键复制 编辑 原始数据 按行查看 历史
方圆百里找对手 提交于 2022-04-06 16:15 . 1.3.0
<?php
$header = <<<'EOF'
This is NOT a freeware, use is subject to license terms.
@copyright Copyright (c) 2010-2099 Jinan Larva Information Technology Co., Ltd.
EOF;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@DoctrineAnnotation' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'bottom',
'location' => 'after_open',
],
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => [
'declare',
],
],
'blank_line_after_opening_tag' => true,
'compact_nullable_typehint' => true,
'declare_equal_normalize' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'new_with_braces' => true,
'no_unused_imports' => false,
'no_blank_lines_after_class_opening' => true,
'no_leading_import_slash' => true,
'no_whitespace_in_blank_line' => true,
'single_trait_insert_per_statement' => false,
'ordered_class_elements' => [
'order' => [
'use_trait',
],
],
'ordered_imports' => [
'imports_order' => [
'class', 'function', 'const',
],
'sort_algorithm' => 'none',
],
'list_syntax' => [
'syntax' => 'short'
],
'phpdoc_align' => [
'align' => 'left',
],
'constant_case' => [
'case' => 'lower',
],
'return_type_declaration' => true,
'short_scalar_cast' => true,
'single_blank_line_before_namespace' => true,
'ternary_operator_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => [
'elements' => [
'const',
'method',
'property',
],
],
'combine_consecutive_unsets' => true,
'linebreak_after_opening_tag' => true,
'phpdoc_separation' => false,
'single_quote' => true,
'standardize_not_equals' => true,
'multiline_comment_opening_closing' => true,
'ternary_to_null_coalescing' => true,
//'declare_strict_types' => true,//激进,强制打开严格模式
])->setFinder(
PhpCsFixer\Finder::create()
->exclude('bootstrap')
->exclude('config')
->exclude('database')
->exclude('lang')
->exclude('node_modules')
->exclude('public')
->exclude('storage')
->exclude('vendor')
->exclude('resources')
->exclude('routes')
->in(__DIR__)
)->setUsingCache(false);
PHP
1
https://gitee.com/larvatech/laravel-geoip.git
git@gitee.com:larvatech/laravel-geoip.git
larvatech
laravel-geoip
laravel-geoip
master

搜索帮助